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:
authorGaudenz Alder <gaudenz@jgraph.com>2018-05-06 17:21:46 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2018-05-06 17:21:46 +0300
commit5aae4d412b34dd760d26e8ed778789bf995e9e76 (patch)
treebedba93199fb06df215280d2aca927749e57e72d
parente19fcd41bfd5b7ede9b94aeaa14bbef4b419c9d2 (diff)
8.6.0 releasev8.6.0
Former-commit-id: ea23fcc3ec70b9d3378850e4313d15b0c2c52c31
-rw-r--r--ChangeLog7
-rw-r--r--VERSION2
-rw-r--r--etc/build/build.xml5
-rw-r--r--etc/mxgraph/mxClient.js15
-rw-r--r--src/main/java/com/mxgraph/online/ProxyServlet.java22
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/connect/confluence/connect-dev.json270
-rw-r--r--src/main/webapp/connect/jira/connect-dev.json93
-rw-r--r--src/main/webapp/js/app.min.js2286
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js1513
-rw-r--r--src/main/webapp/js/atlas.min.js2600
-rw-r--r--src/main/webapp/js/diagramly/App.js32
-rw-r--r--src/main/webapp/js/diagramly/Devel.js1
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js10
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js2
-rw-r--r--src/main/webapp/js/diagramly/DriveClient.js2
-rw-r--r--src/main/webapp/js/diagramly/Editor.js3
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js125
-rw-r--r--src/main/webapp/js/diagramly/Init.js8
-rw-r--r--src/main/webapp/js/diagramly/Menus.js65
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js1287
-rw-r--r--src/main/webapp/js/diagramly/Pages.js14
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar-BPMN.js4
-rw-r--r--src/main/webapp/js/embed-static.min.js8
-rw-r--r--src/main/webapp/js/mxgraph/Editor.js19
-rw-r--r--src/main/webapp/js/mxgraph/EditorUi.js10
-rw-r--r--src/main/webapp/js/mxgraph/Format.js8
-rw-r--r--src/main/webapp/js/mxgraph/Graph.js21
-rw-r--r--src/main/webapp/js/mxgraph/Menus.js14
-rw-r--r--src/main/webapp/js/mxgraph/Sidebar.js96
-rw-r--r--src/main/webapp/js/reader.min.js8
-rw-r--r--src/main/webapp/js/viewer.min.js1513
-rw-r--r--src/main/webapp/resources/dia.txt1
-rw-r--r--src/main/webapp/resources/dia_am.txt1
-rw-r--r--src/main/webapp/resources/dia_ar.txt1
-rw-r--r--src/main/webapp/resources/dia_bg.txt1
-rw-r--r--src/main/webapp/resources/dia_bn.txt1
-rw-r--r--src/main/webapp/resources/dia_bs.txt1
-rw-r--r--src/main/webapp/resources/dia_ca.txt1
-rw-r--r--src/main/webapp/resources/dia_cs.txt1
-rw-r--r--src/main/webapp/resources/dia_da.txt1
-rw-r--r--src/main/webapp/resources/dia_de.txt3
-rw-r--r--src/main/webapp/resources/dia_el.txt1
-rw-r--r--src/main/webapp/resources/dia_eo.txt1
-rw-r--r--src/main/webapp/resources/dia_es.txt1
-rw-r--r--src/main/webapp/resources/dia_et.txt1
-rw-r--r--src/main/webapp/resources/dia_fa.txt1
-rw-r--r--src/main/webapp/resources/dia_fi.txt1
-rw-r--r--src/main/webapp/resources/dia_fil.txt1
-rw-r--r--src/main/webapp/resources/dia_fr.txt1
-rw-r--r--src/main/webapp/resources/dia_gu.txt1
-rw-r--r--src/main/webapp/resources/dia_he.txt1
-rw-r--r--src/main/webapp/resources/dia_hi.txt1
-rw-r--r--src/main/webapp/resources/dia_hr.txt1
-rw-r--r--src/main/webapp/resources/dia_hu.txt1
-rw-r--r--src/main/webapp/resources/dia_i18n.txt1
-rw-r--r--src/main/webapp/resources/dia_id.txt1
-rw-r--r--src/main/webapp/resources/dia_it.txt1
-rw-r--r--src/main/webapp/resources/dia_ja.txt1
-rw-r--r--src/main/webapp/resources/dia_kn.txt1
-rw-r--r--src/main/webapp/resources/dia_ko.txt1
-rw-r--r--src/main/webapp/resources/dia_lt.txt1
-rw-r--r--src/main/webapp/resources/dia_lv.txt1
-rw-r--r--src/main/webapp/resources/dia_ml.txt1
-rw-r--r--src/main/webapp/resources/dia_mr.txt1
-rw-r--r--src/main/webapp/resources/dia_ms.txt1
-rw-r--r--src/main/webapp/resources/dia_nl.txt1
-rw-r--r--src/main/webapp/resources/dia_no.txt1
-rw-r--r--src/main/webapp/resources/dia_pl.txt1
-rw-r--r--src/main/webapp/resources/dia_pt-br.txt1
-rw-r--r--src/main/webapp/resources/dia_pt.txt1
-rw-r--r--src/main/webapp/resources/dia_ro.txt1
-rw-r--r--src/main/webapp/resources/dia_ru.txt1
-rw-r--r--src/main/webapp/resources/dia_sk.txt1
-rw-r--r--src/main/webapp/resources/dia_sl.txt1
-rw-r--r--src/main/webapp/resources/dia_sr.txt1
-rw-r--r--src/main/webapp/resources/dia_sv.txt1
-rw-r--r--src/main/webapp/resources/dia_sw.txt1
-rw-r--r--src/main/webapp/resources/dia_ta.txt1
-rw-r--r--src/main/webapp/resources/dia_te.txt1
-rw-r--r--src/main/webapp/resources/dia_th.txt1
-rw-r--r--src/main/webapp/resources/dia_tr.txt1
-rw-r--r--src/main/webapp/resources/dia_uk.txt1
-rw-r--r--src/main/webapp/resources/dia_vi.txt1
-rw-r--r--src/main/webapp/resources/dia_zh-tw.txt1
-rw-r--r--src/main/webapp/resources/dia_zh.txt1
86 files changed, 6106 insertions, 4015 deletions
diff --git a/ChangeLog b/ChangeLog
index 57eaf515..78b60a82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+06-MAY-2018: 8.6.0
+
+- Fixes outline connect for BPMN shapes
+- Adds opacity to default style
+- Uses mxGraph 3.9.4 beta 5
+- Adds minimal UI
+
01-MAY-2018: 8.5.15
- Fixes showing device when no other storage options available
diff --git a/VERSION b/VERSION
index 90a4e35f..1acea15a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-8.5.15 \ No newline at end of file
+8.6.0 \ No newline at end of file
diff --git a/etc/build/build.xml b/etc/build/build.xml
index aa0f9f31..49acee1c 100644
--- a/etc/build/build.xml
+++ b/etc/build/build.xml
@@ -186,6 +186,7 @@
<file name="EditorUi.js" />
<file name="Pages.js" />
<file name="Trees.js" />
+ <file name="Minimal.js" />
</sources>
<sources dir="${basedir}">
@@ -258,6 +259,7 @@
<file name="Menus.js" />
<file name="Pages.js" />
<file name="Trees.js" />
+ <file name="Minimal.js" />
</sources>
<sources dir="${basedir}">
@@ -270,7 +272,7 @@
<filelist dir="${war.dir}/js/sanitizer" files="sanitizer.min.js"/>
<filelist dir="${war.dir}/js/deflate" files="pako.min.js"/>
<filelist dir="${basedir}" files="client.min.js,grapheditor.min.js,sidebar.min.js,.tmp1.js"/>
- </concat>
+ </concat>
<loadfile property="version" srcFile="../../VERSION"/>
<replace file="${basedir}/base.min.js" token="@DRAWIO-VERSION@" value="${version}"/>
@@ -343,6 +345,7 @@
<file name="Menus.js" />
<file name="Pages.js" />
<file name="Trees.js" />
+ <file name="Minimal.js" />
</sources>
</jscomp>
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index 64d9371d..b71e81ab 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -165,7 +165,7 @@ g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume
mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.buttons.appendChild(this.closeImg);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",a));this.destroyOnClose?this.destroy():
this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
mxWindow.prototype.isVisible=function(){return null!=this.div?"none"!=this.div.style.display:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
-mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||"none"==this.contentWrapper.style.display||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
mxForm.prototype.addText=function(a,b,c){var d=document.createElement("input");d.setAttribute("type",c||"text");d.value=b;return this.addField(a,d)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
@@ -175,22 +175,23 @@ function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=windo
mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}));mxEvent.addListener(a,"dragstart",function(a){mxEvent.consume(a)});this.eventConsumer=function(a,b){var c=b.getProperty("eventName"),d=b.getProperty("event");c!=mxEvent.MOUSE_DOWN&&d.consume()}}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;
mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;
-mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
+mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.checkEventSource=!0;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c,d){return a.getCellAt(b,c)};mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};mxDragSource.prototype.isActive=function(){return null!=this.mouseMoveHandler};
mxDragSource.prototype.reset=function(){null!=this.currentGraph&&(this.dragExit(this.currentGraph),this.currentGraph=null);this.removeDragElement();this.removeListeners();this.stopDrag()};
mxDragSource.prototype.mouseDown=function(a){this.enabled&&!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))};
-mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
-mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);this.checkEventSource&&mxClient.IS_SVG&&(this.dragElement.style.pointerEvents="none")};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
+mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.getElementForEvent=function(a){return mxEvent.isTouchEvent(a)||mxEvent.isPenEvent(a)?document.elementFromPoint(mxEvent.getClientX(a),mxEvent.getClientY(a)):mxEvent.getSource(a)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin(),g=this.getElementForEvent(b);if(this.checkEventSource)for(;null!=g&&g!=a.container;)g=g.parentNode;return null!=g&&c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null==b||this.graphContainsEvent(b,a)||(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility=
"hidden");else{var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}mxEvent.consume(a)};
mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)};
mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null};
-mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)};
-mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents="none");this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,
+this.eventConsumer)};mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x-a.panDx,c=mxEvent.getClientY(b)-c.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c,b),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==
this.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,
g=a.view.translate,k=a.gridSize/2,e=(a.snap(e/d-g.x-k)+g.x)*d,c=(a.snap(c/d-g.y-k)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};
-mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler.apply(this,arguments);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),k=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
g.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
diff --git a/src/main/java/com/mxgraph/online/ProxyServlet.java b/src/main/java/com/mxgraph/online/ProxyServlet.java
index 3391e606..feea694e 100644
--- a/src/main/java/com/mxgraph/online/ProxyServlet.java
+++ b/src/main/java/com/mxgraph/online/ProxyServlet.java
@@ -6,7 +6,6 @@ package com.mxgraph.online;
import java.io.BufferedInputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
@@ -73,13 +72,30 @@ public class ProxyServlet extends HttpServlet
response.setHeader("Expires", "0");
response.addHeader("Access-Control-Allow-Origin", dom);
- // Status code pass-through
+ // Status code pass-through and follow redirects
if (connection instanceof HttpURLConnection)
{
+ ((HttpURLConnection) connection).setInstanceFollowRedirects(true);
+
// Workaround for 451 response from Iconfinder CDN
((HttpURLConnection) connection).setRequestProperty("User-Agent", "draw.io");
+ int status = ((HttpURLConnection) connection).getResponseCode();
+ int counter = 0;
+
+ // Follows a maximum of 2 redirects
+ while (counter++ < 2 && (status == HttpURLConnection.HTTP_MOVED_PERM ||
+ status == HttpURLConnection.HTTP_MOVED_TEMP))
+ {
+ url = new URL(connection.getHeaderField("Location"));
+ connection = url.openConnection();
+ ((HttpURLConnection) connection).setInstanceFollowRedirects(true);
+
+ // Workaround for 451 response from Iconfinder CDN
+ ((HttpURLConnection) connection).setRequestProperty("User-Agent", "draw.io");
+ status = ((HttpURLConnection) connection).getResponseCode();
+ }
- response.setStatus(((HttpURLConnection) connection).getResponseCode());
+ response.setStatus(status);
}
String base64 = request.getParameter("base64");
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 643d0b53..8267f312 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 05/01/2018 05:13 PM
+# 05/06/2018 04:15 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/connect/confluence/connect-dev.json b/src/main/webapp/connect/confluence/connect-dev.json
new file mode 100644
index 00000000..507e5242
--- /dev/null
+++ b/src/main/webapp/connect/confluence/connect-dev.json
@@ -0,0 +1,270 @@
+{
+ "name": "Draw.io gaudenz",
+ "description": "Draw.io add-on for Confluence",
+ "key": "com.mxgraph.confluence.plugins.diagramly",
+ "baseUrl": "https://0056a3a4.ngrok.io",
+ "vendor":
+ {
+ "name": "JGraph Ltd.",
+ "url": "https://www.jgraph.com"
+ },
+ "links": {
+ "documentation": "https://support.draw.io/display/DFCC/draw.io+for+Confluence+Cloud"
+ },
+ "version": "1.4.8",
+ "authentication":
+ {
+ "type": "none"
+ },
+ "modules":
+ {
+ "generalPages": [
+ {
+ "key": "lightbox",
+ "url": "/connect/confluence/viewer-1-4-8.html?lightbox=1",
+ "name": {
+ "value": "Lightbox"
+ }
+ },
+ {
+ "key": "customContentViewer",
+ "url": "/connect/confluence/viewer-1-4-8.html?custom=1&contentId={content.id}",
+ "name": {
+ "value": "Draw.io Viewer"
+ }
+ }
+ ],
+ "customContent": [{
+ "key": "drawio-diagram",
+ "name": {
+ "value": "Draw.io Diagrams"
+ },
+ "uiSupport": {
+ "contentViewComponent": {
+ "moduleKey": "customContentViewer"
+ },
+ "icons": {
+ "item": {
+ "url": "/images/drawlogo48.png"
+ }
+ }
+ },
+ "apiSupport": {
+ "supportedContainerTypes": ["page", "comment", "space", "blogpost"],
+ "supportedChildTypes": ["attachment"],
+ "indexing": {
+ "enabled": true
+ }
+ }
+ }
+ ],
+ "dynamicContentMacros":
+ [
+ {
+ "name":
+ {
+ "i18n": "drawioMacro",
+ "value": "Draw.io Diagram"
+ },
+ "url": "/connect/confluence/viewer-1-4-8.html?ceoId=${page.id}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}&tbstyle=${tbstyle}&lbox=${lbox}&zoom=${zoom}&links=${links}&owningPageId=${pageId}",
+ "width": "100%",
+ "description":
+ {
+ "i18n": "description",
+ "value": "Inserts a new Draw.io Diagram"
+ }, "icon":
+ {
+ "width": 128,
+ "height": 128,
+ "url": "/images/drawlogo128.png"
+ },
+ "categories": [
+ "visuals"
+ ],
+ "outputType": "block",
+ "featured": true,
+ "key": "drawio",
+ "parameters":
+ [
+ {
+ "identifier": "diagramName",
+ "name":
+ {
+ "value": "Diagram name (do not change)"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "autoSize",
+ "name":
+ {
+ "value": "automatic size"
+ },
+ "type": "boolean"
+ },
+ {
+ "identifier": "PageId",
+ "name":
+ {
+ "value": "Parent page ID"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "baseUrl",
+ "name":
+ {
+ "value": "Confluence Base URL"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "width",
+ "name":
+ {
+ "value": "Diagram width"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "height",
+ "name":
+ {
+ "value": "Diagram Height"
+ },
+ "type": "string"
+ }
+ ],
+ "editor": {
+ "url": "/connect/confluence/macroEditor-1-4-8.html?ceoId=${page.id}&diagramName=${diagramName}",
+ "width": "100%",
+ "height": "100%",
+ "editTitle":
+ {
+ "value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
+ },
+ "insertTitle":
+ {
+ "value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
+ }
+ },
+ "imagePlaceholder": {
+ "width": 500,
+ "height": 300,
+ "url": "/connectImage",
+ "applyChrome": false
+ },
+ "renderModes": {
+ "default": {
+ "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}"
+ }
+ }
+ },
+ {
+ "name":
+ {
+ "i18n": "drawioMacro",
+ "value": "Legacy macro - do not use"
+ },
+ "url": "/connect/confluence/viewer.html?ceoId=${page.id}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}",
+ "width": "100%",
+ "description":
+ {
+ "i18n": "description",
+ "value": "Do not use"
+ }, "icon":
+ {
+ "width": 80,
+ "height": 80,
+ "url": "/images/stop-flat-icon-80.png"
+ },
+ "categories": [
+ "visuals"
+ ],
+ "outputType": "block",
+ "featured": false,
+ "key": "drawio-macro",
+ "parameters":
+ [
+ {
+ "identifier": "diagramName",
+ "name":
+ {
+ "value": "Diagram name (do not change)"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "autoSize",
+ "name":
+ {
+ "value": "automatic size"
+ },
+ "type": "boolean"
+ },
+ {
+ "identifier": "PageId",
+ "name":
+ {
+ "value": "Parent page ID"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "baseUrl",
+ "name":
+ {
+ "value": "Confluence Base URL"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "width",
+ "name":
+ {
+ "value": "Diagram width"
+ },
+ "type": "string"
+ },
+ {
+ "identifier": "height",
+ "name":
+ {
+ "value": "Diagram Height"
+ },
+ "type": "string"
+ }
+ ],
+ "editor": {
+ "url": "/connect/confluence/macroEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
+ "editTitle": {
+ "value": "Edit MarkDown",
+ "i18n": "macro.md.edit"
+ },
+ "insertTitle": {
+ "value": "Insert New MarkDown",
+ "i18n": "macro.md.insert"
+ },
+ "width": "100%",
+ "height": "100%"
+ },
+ "imagePlaceholder": {
+ "width": 500,
+ "height": 300,
+ "url": "/connectImage",
+ "applyChrome": true
+ },
+ "renderModes": {
+ "default": {
+ "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}&revision=${revision}"
+ }
+ }
+ }
+ ]
+ },
+ "scopes": [
+ "read",
+ "write",
+ "delete"
+ ]
+} \ No newline at end of file
diff --git a/src/main/webapp/connect/jira/connect-dev.json b/src/main/webapp/connect/jira/connect-dev.json
new file mode 100644
index 00000000..16c3f277
--- /dev/null
+++ b/src/main/webapp/connect/jira/connect-dev.json
@@ -0,0 +1,93 @@
+{
+ "name": "Draw.io gaudenz",
+ "description": "Draw.io add-on for JIRA",
+ "key": "com.mxgraph.jira.plugins.drawio.gaudenz",
+ "baseUrl": "https://0d961297.ngrok.io/",
+ "vendor": {
+ "name": "JGraph Ltd.",
+ "url": "https://www.jgraph.com"
+ },
+ "authentication":
+ {
+ "type": "none"
+ },
+ "version": "1.0.4",
+ "scopes":
+ [
+ "READ",
+ "WRITE",
+ "DELETE"
+ ],
+ "modules":
+ {
+ "generalPages":
+ [
+ {
+ "url":"/connect/jira/editor2.html?issueId=${issue.id}",
+ "key":"drawioEditor",
+ "name":
+ {
+ "value":"Draw.io Editor"
+ },
+ "location":"hidden"
+ },
+ {
+ "url":"/connect/jira/fullScreenViewer2.html?issueId=${issue.id}",
+ "key":"drawioFullScreenViewer",
+ "name":
+ {
+ "value":"Draw.io Full Screen Viewer"
+ },
+ "location":"hidden"
+ }
+ ],
+ "webItems": [
+ {
+ "location": "operations-attachments",
+ "weight": 50,
+ "key": "drawioEditorBlank",
+ "url": "/connect/jira/editor2.html?issueId=${issue.id}",
+ "name": {
+ "value": "Add Draw.io Diagram"
+ },
+ "target":
+ {
+ "type":"dialog",
+ "options":
+ {
+ "width":"100%",
+ "height":"100%",
+ "chrome":false
+ }
+ }
+ },
+ {
+ "key": "drawioEditorDialog",
+ "name":
+ {
+ "value": "Draw.io Editor"
+ },
+ "url": "/connect/jira/editor2.html?issueId=${issue.id}",
+ "location": "none",
+ "context": "addon"
+ }
+ ],
+ "webPanels":
+ [
+ {
+ "url": "/connect/jira/viewerPanel2.html?issueId=${issue.id}",
+ "location": "atl.jira.view.issue.right.context",
+ "layout":
+ {
+ "width": "300px"
+ },
+ "weight": 50,
+ "key": "drawioViewerPanel",
+ "name":
+ {
+ "value": "Draw.io Diagrams"
+ }
+ }
+ ]
+ }
+ } \ 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 8984c181..a069350f 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -103,7 +103,7 @@ window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Ba
ko:"한국어",ja:"日本語",zh:"中文(中国)","zh-tw":"中文(台灣)"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}return a}();
function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL="https://log.draw.io"))})();
-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");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";
+if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");"min"==uiTheme&&(urlParams.toolbar="0");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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.9.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
@@ -271,7 +271,7 @@ g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume
mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.buttons.appendChild(this.closeImg);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",a));this.destroyOnClose?this.destroy():
this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
mxWindow.prototype.isVisible=function(){return null!=this.div?"none"!=this.div.style.display:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
-mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||"none"==this.contentWrapper.style.display||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
mxForm.prototype.addText=function(a,b,c){var d=document.createElement("input");d.setAttribute("type",c||"text");d.value=b;return this.addField(a,d)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
@@ -281,22 +281,23 @@ function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=windo
mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}));mxEvent.addListener(a,"dragstart",function(a){mxEvent.consume(a)});this.eventConsumer=function(a,b){var c=b.getProperty("eventName"),d=b.getProperty("event");c!=mxEvent.MOUSE_DOWN&&d.consume()}}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;
mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;
-mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
+mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.checkEventSource=!0;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c,d){return a.getCellAt(b,c)};mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};mxDragSource.prototype.isActive=function(){return null!=this.mouseMoveHandler};
mxDragSource.prototype.reset=function(){null!=this.currentGraph&&(this.dragExit(this.currentGraph),this.currentGraph=null);this.removeDragElement();this.removeListeners();this.stopDrag()};
mxDragSource.prototype.mouseDown=function(a){this.enabled&&!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))};
-mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
-mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);this.checkEventSource&&mxClient.IS_SVG&&(this.dragElement.style.pointerEvents="none")};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
+mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.getElementForEvent=function(a){return mxEvent.isTouchEvent(a)||mxEvent.isPenEvent(a)?document.elementFromPoint(mxEvent.getClientX(a),mxEvent.getClientY(a)):mxEvent.getSource(a)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin(),g=this.getElementForEvent(b);if(this.checkEventSource)for(;null!=g&&g!=a.container;)g=g.parentNode;return null!=g&&c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null==b||this.graphContainsEvent(b,a)||(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility=
"hidden");else{var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}mxEvent.consume(a)};
mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)};
mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null};
-mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)};
-mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents="none");this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,
+this.eventConsumer)};mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x-a.panDx,c=mxEvent.getClientY(b)-c.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c,b),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==
this.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,
g=a.view.translate,k=a.gridSize/2,e=(a.snap(e/d-g.x-k)+g.x)*d,c=(a.snap(c/d-g.y-k)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};
-mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler.apply(this,arguments);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),k=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
g.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
@@ -1966,27 +1967,28 @@ Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCA
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAgVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9d3yJTAAAAKnRSTlMA+hzi3nRQWyXzkm0h2j3u54gzEgSXjlYoTBgJxL2loGpAOS3Jt7Wxm35Ga7gRAAAA6UlEQVQ4y63Q2XaCMBSF4Q0JBasoQ5DJqbXjfv8HbCK2BZNwo/8FXHx7rcMC7lQu0iX8qU/qtvAWCpoqH8dYzS0SwaV5eK/UAf8X9pd2CWKzuF5Jrftp1owXwnIGLUaL3PYndOHf4kNNXWrXK/m7CHunk7K8LE6YtBpcknwG9GKxnroY+ylBXcx4xKyx/u/EuXi509cP9V7OO1oyHnzrdFTcqLG/4ibBA5pIMr/4xvKzuQDkVy9wW8SgBFD6HDvuzMvrZcC9QlkfMzI7w64m+b4PqBMNHB05lH21PVxJo2/fBXxV4hB38PcD+5AkI4FuETsAAAAASUVORK5CYII=";
Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";Editor.nextLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFRJREFUOMvd0skRgCAQBVEFwQ0V7fxzNQP6wI05v6pZ/kyj1b7FNgik2gQzzLcAwiUAigHOTwDHK4A1CmB5BJANJG1hQ9qafYcqFlZP3IFc9eVGrR+iIgkDQRUXIAAAAABJRU5ErkJggg==";
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";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.init=function(){};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,c){var d=null!=c?"?title="+encodeURIComponent(c):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"))):
-this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,c){var d=new Graph(null,c,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.chromeless||"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=this.graph.defaultGraphBackground;this.graph.pageScale=
-mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.chromeless||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled="0"!=
-a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var c=a.getAttribute("pageScale");this.graph.pageScale=null!=c?c:mxGraph.prototype.pageScale;this.graph.lightbox?this.graph.pageVisible=!1:(c=a.getAttribute("page"),this.graph.pageVisible=null!=c?"0"!=c:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
+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.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,c){var d=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d+
+(0<d.length?"&":"?")+"client=1"))):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,c){var d=new Graph(null,c,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.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=this.graph.defaultGraphBackground;
+this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
+Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled=
+"0"!=a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var c=a.getAttribute("pageScale");this.graph.pageScale=null!=c?c:mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(c=a.getAttribute("page"),this.graph.pageVisible=null!=c?"0"!=c:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
this.graph.pageBreaksVisible;var c=a.getAttribute("pageWidth"),d=a.getAttribute("pageHeight");null!=c&&null!=d&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(c),parseFloat(d)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var c=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),c.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var d=c.document.createElement("mxGraphModel");d.appendChild(a);c.decode(d,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
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":"hidden",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,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),f=a.getModel(),g=[],k=0;k<d.length;k++)(f.isVertex(d[k])||f.isEdge(d[k]))&&null!=a.view.getState(d[k])&&
-g.push(d[k]);a.setSelectionCells(g)};c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),f=a.getModel(),g=[],h=0;h<d.length;h++)(f.isVertex(d[h])||f.isEdge(d[h]))&&null!=a.view.getState(d[h])&&
+g.push(d[h]);a.setSelectionCells(g)};c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};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,c,d,b,f,e,h,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);d+=k;b+=k;var l=d,m=b,p=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-d-64)/2)),q=Math.max(1,Math.round((p-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=Math.min(d,document.body.scrollWidth-64);b=Math.min(b,p-64);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=p+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";n+=t.x;q+=t.y;f&&document.body.appendChild(this.bg);var r=a.createDiv("geDialog");f=this.getPosition(n,q,
-d,b);n=f.x;q=f.y;r.style.width=d+"px";r.style.height=b+"px";r.style.left=n+"px";r.style.top=q+"px";r.style.zIndex=this.zIndex;r.appendChild(c);document.body.appendChild(r);!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=q+14+"px",e.style.left=n+d+38-k+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",
-mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){p=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=p+"px";n=Math.max(1,Math.round((document.body.clientWidth-d-64)/2));q=Math.max(1,Math.round((p-b-a.footerHeight)/3));d=Math.min(l,document.body.scrollWidth-64);b=
-Math.min(m,p-64);var e=this.getPosition(n,q,d,b);n=e.x;q=e.y;r.style.left=n+"px";r.style.top=q+"px";r.style.width=d+"px";r.style.height=b+"px";!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=q+14+"px",this.dialogImg.style.left=n+d+38-k+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+function Dialog(a,c,d,b,f,e,k,g){var h=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(h=80);d+=h;b+=h;var l=d,m=b,n=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-d-64)/2)),q=Math.max(1,Math.round((n-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=Math.min(d,document.body.scrollWidth-64);b=Math.min(b,n-64);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=n+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var r=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=r.x+"px";this.bg.style.top=r.y+"px";p+=r.x;q+=r.y;f&&document.body.appendChild(this.bg);var t=a.createDiv("geDialog");f=this.getPosition(p,q,
+d,b);p=f.x;q=f.y;t.style.width=d+"px";t.style.height=b+"px";t.style.left=p+"px";t.style.top=q+"px";t.style.zIndex=this.zIndex;t.appendChild(c);document.body.appendChild(t);!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=q+14+"px",e.style.left=p+d+38-h+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",
+mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){n=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=n+"px";p=Math.max(1,Math.round((document.body.clientWidth-d-64)/2));q=Math.max(1,Math.round((n-b-a.footerHeight)/3));d=Math.min(l,document.body.scrollWidth-64);b=
+Math.min(m,n-64);var e=this.getPosition(p,q,d,b);p=e.x;q=e.y;t.style.left=p+"px";t.style.top=q+"px";t.style.width=d+"px";t.style.height=b+"px";!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=q+14+"px",this.dialogImg.style.left=p+d+38-h+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
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";
@@ -1997,30 +1999,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
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,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),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 PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var h=g.checked?1:parseInt(m.value);isNaN(h)||(f=mxUtils.getScaleForPageCount(h,d,e))}d.getGraphBounds();var k=h=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),h-=c.x*e.width,k-=c.y*e.height):
-b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,h,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var h=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage"));
-f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(f);h.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");f.appendChild(k);mxEvent.addListener(k,
-"click",function(a){l.checked=!l.checked;g.checked=!l.checked;mxEvent.consume(a)});b.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");b.appendChild(f);h.appendChild(b);mxEvent.addListener(l,"change",
-function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!l.checked});b=b.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");b.appendChild(f);f=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";f.appendChild(p);b.appendChild(f);h.appendChild(b);b=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
-f.style.paddingTop="20px";f.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&f.appendChild(k);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});n.className="geBtn";f.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";f.appendChild(n);a.editor.cancelFirst||
-f.appendChild(k);b.appendChild(f);h.appendChild(b);e.appendChild(h);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
-PrintDialog.createPrintPreview=function(a,c,d,b,f,e,h){c=new mxPrintPreview(a,c,d,b,f,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=h;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.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 c};
+PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var k=g.checked?1:parseInt(m.value);isNaN(k)||(f=mxUtils.getScaleForPageCount(k,d,e))}d.getGraphBounds();var h=k=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),k-=c.x*e.width,h-=c.y*e.height):
+b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,k,h,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var h=document.createElement("span");mxUtils.write(h," "+mxResources.get("fitPage"));
+f.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(f);k.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);h=document.createElement("span");mxUtils.write(h," "+mxResources.get("posterPrint")+":");f.appendChild(h);mxEvent.addListener(h,
+"click",function(a){l.checked=!l.checked;g.checked=!l.checked;mxEvent.consume(a)});b.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");b.appendChild(f);k.appendChild(b);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!l.checked});b=b.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");b.appendChild(f);f=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";f.appendChild(n);b.appendChild(f);k.appendChild(b);b=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
+f.style.paddingTop="20px";f.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&f.appendChild(h);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});p.className="geBtn";f.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";f.appendChild(p);a.editor.cancelFirst||
+f.appendChild(h);b.appendChild(f);k.appendChild(b);e.appendChild(k);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
+PrintDialog.createPrintPreview=function(a,c,d,b,f,e,k){c=new mxPrintPreview(a,c,d,b,f,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.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 c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",q.src),n.style.fontSize="11px",n.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,h=document.createElement("table");h.style.width=
-"100%";h.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");
+var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",q.src),p.style.fontSize="11px",p.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,k=document.createElement("table");k.style.width=
+"100%";k.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var h=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");
mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="18px";l.style.height="18px";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";var m=b.background;c();mxEvent.addListener(l,"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)});
-e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=b.getGridSize();e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?b.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
-":");f.appendChild(e);e=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(n,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();e.appendChild(n);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var t=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);var r=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==p.value&&b.setGridSize(parseInt(p.value));var c=new ChangePageSetup(a,m,q,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||b.model.execute(c)});r.className="geBtn gePrimaryBtn";e.appendChild(r);a.editor.cancelFirst||e.appendChild(t);f.appendChild(e);g.appendChild(f);h.appendChild(g);this.container=h};
-PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||p!=document.activeElement&&n!=document.activeElement){a=!1;for(b=0;b<t.length;b++)c=t[b],u?"custom"==c.key&&(g.value=c.key,u=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
-d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(p.value=d.width/100,n.value=d.height/100,e.setAttribute("checked","checked"),
-g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
-k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");
-p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},t=PageSetupDialog.getFormats(),r=0;r<t.length;r++){var w=t[r];q[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);g.appendChild(v)}var u=!1;f();a.appendChild(g);mxUtils.br(a);
-a.appendChild(k);a.appendChild(m);var z=d,x=function(a,c){var e=q[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");isNaN(parseFloat(p.value))&&(p.value=d.width/100);isNaN(parseFloat(n.value))&&(n.value=d.height/100);e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,e.height,e.width));
-c&&u||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){u="custom"==g.value;x(a,!0)});x();
-return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:p,heightInput:n}};
+e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=b.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?b.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
+":");f.appendChild(e);e=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(p,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();e.appendChild(p);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var r=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&e.appendChild(r);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,h.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
+c.ignoreColor&&c.ignoreImage||b.model.execute(c)});t.className="geBtn gePrimaryBtn";e.appendChild(t);a.editor.cancelFirst||e.appendChild(r);f.appendChild(e);g.appendChild(f);k.appendChild(g);this.container=k};
+PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<r.length;b++)c=r[b],u?"custom"==c.key&&(g.value=c.key,u=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
+d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,a=k.checked=!0));a?(h.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,e.setAttribute("checked","checked"),
+g.value="custom",h.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",c);k.setAttribute("type","radio");k.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var h=document.createElement("div");h.style.marginLeft="4px";h.style.width="210px";
+h.style.height="24px";e.style.marginRight="6px";h.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));h.appendChild(c);k.style.marginLeft="10px";k.style.marginRight="6px";h.appendChild(k);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));h.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input");
+n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");h.style.display="none";m.style.display="none";for(var q={},r=PageSetupDialog.getFormats(),t=0;t<r.length;t++){var w=r[t];q[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);g.appendChild(v)}var u=!1;f();a.appendChild(g);mxUtils.br(a);
+a.appendChild(h);a.appendChild(m);var z=d,x=function(a,c){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",h.style.display=""):(h.style.display="none",m.style.display="");isNaN(parseFloat(n.value))&&(n.value=d.width/100);isNaN(parseFloat(p.value))&&(p.value=d.height/100);e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&k.checked&&(e=new mxRectangle(0,0,e.height,e.width));
+c&&u||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){k.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(k,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){u="custom"==g.value;x(a,!0)});x();
+return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:n,heightInput:p}};
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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{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:"custom",title:mxResources.get("custom"),format:null}]};
(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=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2028,35 +2030,35 @@ mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.styl
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()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",e="";if(a.isGridEnabled()){e=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",e=a.gridSize*this.scale*this.gridSteps):
d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-c,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-f,e))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=e,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
-b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'<svg width="'+
+b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var g=e*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" 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 d=
-this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
-new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,v=a?Math.ceil(b/k.width)-1:0,u=h.x+b,z=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
-new mxPoint(Math.round(u),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var f=this.graph.getCellGeometry(b[e]);if(null!=f&&f.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){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(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.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,b,c,d,e,h){var g=f.apply(this,arguments);null==h||h||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var e=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=e.apply(this,arguments),f=b.getParent(d);
-if(null==c||c!=d&&c!=f)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(f)&&b.isVertex(f)&&!this.graph.isContainer(f);)d=f,f=this.graph.getModel().getParent(d);return d};var h=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=h.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=
+this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,g=this.pageFormat,f=d*this.pageScale,k=this.view.getBackgroundPageBounds();b=k.width;c=k.height;var h=
+new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,v=a?Math.ceil(b/h.width)-1:0,u=k.x+b,z=k.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),Math.round(k.y+(c+1)*h.height)),
+new mxPoint(Math.round(u),Math.round(k.y+(c+1)*h.height))]:[new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var g=this.graph.getCellGeometry(b[e]);if(null!=g&&g.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){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(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),k=Math.floor(Math.min(0,
+c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+k*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-k)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.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,b,c,d,e,k){var g=f.apply(this,arguments);null==k||k||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var e=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=e.apply(this,arguments),f=b.getParent(d);
+if(null==c||c!=d&&c!=f)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(f)&&b.isVertex(f)&&!this.graph.isContainer(f);)d=f,f=this.graph.getModel().getParent(d);return d};var k=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=k.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,c,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var b=this.editor.graph;b.lightbox=d;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,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var f=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||b.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=f,this.menubarContainer.onmousedown=
f,this.toolbarContainer.onselectstart=f,this.toolbarContainer.onmousedown=f,this.diagramContainer.onselectstart=f,this.diagramContainer.onmousedown=f,this.sidebarContainer.onselectstart=f,this.sidebarContainer.onmousedown=f,this.formatContainer.onselectstart=f,this.formatContainer.onmousedown=f,this.footerContainer.onselectstart=f,this.footerContainer.onmousedown=f,null!=this.tabContainer&&(this.tabContainer.onselectstart=f));!this.editor.chromeless||this.editor.editable?(c=function(a){var b=mxEvent.getSource(a);
if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}return f(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(c=b.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
-mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,h=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return e||h.apply(this,arguments)};this.keydownHandler=
+mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,k=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return e||k.apply(this,arguments)};this.keydownHandler=
mxUtils.bind(this,function(a){32==a.which?(e=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=
-function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return k.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 l=!1,m=null,p=null,n=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var e=0;e<n.length;e++)this.toolbar.container.appendChild(n[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=
-p}l=b.cellEditor.isContentEditing();m=a;p=d;n=c}}),t=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);q();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=t.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
-d.substring(0,d.length-1));t.toolbar.setFontName(d);t.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){w.apply(this,arguments);q()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
+function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var h=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return h.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 l=!1,m=null,n=null,p=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=
+n}l=b.cellEditor.isContentEditing();m=a;n=d;p=c}}),r=this,t=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){t.apply(this,arguments);q();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=r.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
+d.substring(0,d.length-1));r.toolbar.setFontName(d);r.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){w.apply(this,arguments);q()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(B){}var v=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],h=0;h<g.length;h++){var k=g[h],
-l=k.indexOf("=");0<=l&&(f=k.substring(0,l),k=k.substring(l+1),null!=a[f]&&"none"==k&&(d.push(k),e.push(f)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=
-["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)u.push(A[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(u,z[a])&&u.push(z[a]);var D=function(a,c){var d=b.getModel();d.beginUpdate();
-try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],G=u.slice(),g=0;g<m.length;g++){var n=m[g],y=n.indexOf("=");if(0<=y){var p=n.substring(0,y),R=mxUtils.indexOf(G,p);0<=R&&G.splice(R,1);for(var t=0;t<A.length;t++){var q=A[t];if(0<=mxUtils.indexOf(q,p))for(var r=0;r<q.length;r++){var B=
-mxUtils.indexOf(G,q[r]);0<=B&&G.splice(B,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,C=d.getStyle(k),g=0;g<G.length;g++){var p=G[g],w=f[p];null==w||"shape"==p&&!e||e&&!(0>mxUtils.indexOf(z,p))||(C=mxUtils.setStyle(C,p,w))}d.setStyle(k,C)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=
-[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));D(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(z,
-d[g]))f||0<=mxUtils.indexOf(C,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(u,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(u,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(C,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
+this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var h=g[k],
+l=h.indexOf("=");0<=l&&(f=h.substring(0,l),h=h.substring(l+1),null!=a[f]&&"none"==h&&(d.push(h),e.push(f)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=
+["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)u.push(A[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(u,z[a])&&u.push(z[a]);var D=function(a,c){var d=b.getModel();
+d.beginUpdate();try{if(c)for(var e=d.isEdge(h),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var k=f[e[g]];null!=k&&b.setCellStyles(e[g],k,a)}else for(k=0;k<a.length;k++){for(var h=a[k],l=d.getStyle(h),m=null!=l?l.split(";"):[],G=u.slice(),g=0;g<m.length;g++){var p=m[g],y=p.indexOf("=");if(0<=y){var n=p.substring(0,y),R=mxUtils.indexOf(G,n);0<=R&&G.splice(R,1);for(var r=0;r<A.length;r++){var q=A[r];if(0<=mxUtils.indexOf(q,n))for(var t=0;t<
+q.length;t++){var B=mxUtils.indexOf(G,q[t]);0<=B&&G.splice(B,1)}}}}for(var f=(e=d.isEdge(h))?b.currentEdgeStyle:b.currentVertexStyle,C=d.getStyle(h),g=0;g<G.length;g++){var n=G[g],w=f[n];null==w||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(z,n))||(C=mxUtils.setStyle(C,n,w))}d.setStyle(h,C)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));D(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),k=c.getProperty("values"),g=0;g<d.length;g++){var h=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=k[g]&&"none"!=
+k[g])if(0<=mxUtils.indexOf(z,d[g]))f||0<=mxUtils.indexOf(C,d[g])?null==k[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=k[g]:e&&0<=mxUtils.indexOf(u,d[g])&&(null==k[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=k[g]);else if(0<=mxUtils.indexOf(u,d[g])){if(e||h)null==k[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=k[g];if(f||h||0<=mxUtils.indexOf(C,d[g]))null==k[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2078,23 +2080,23 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=
EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):d.apply(this,arguments);a.updatePasteActionStates()};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=null;c.cellEditor.isContentEditing()?document.execCommand("paste",
!1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){e.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,
-this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(f);
-l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var t=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),t=Math.max(t,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b,
-Math.floor(c-l.x),Math.floor(t-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),k=a.view.translate,h=a.view.scale,l=mxRectangle.fromRectangle(f);
+l.x=l.x/h-k.x;l.y=l.y/h-k.y;l.width/=h;l.height/=h;var k=a.container.scrollTop,m=a.container.scrollLeft,p=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/l.width)):h;c=(n-b*l.width)/2/b;var r=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),r=Math.max(r,0));if(g||f.width<n||f.height<p)a.view.scaleAndTranslate(b,
+Math.floor(c-l.x),Math.floor(r-l.y)),a.container.scrollTop=k*b/h,a.container.scrollLeft=m*b/h;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/h),Math.floor(f.y+e/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){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="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var f=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",f);f();var e=0,f=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);
-return d}),h=f(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
-l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});h.style.paddingLeft="0px";h.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",h.style.display="",g.style.display="inline-block"):(k.style.display="none",h.style.display=
-"none",g.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(b){a.lightbox?(1==a.view.scale?
-this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var p=null,n=null,q=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n=
-null}),600)}),a||200)}),t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=f(mxUtils.bind(this,function(b){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 c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){r.style.display=1<w.getChildCount(w.root)?
+return d}),k=f(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var h=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
+l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});k.style.paddingLeft="0px";k.style.paddingRight="4px";h.style.paddingLeft="4px";h.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(h.style.display="",k.style.display="",g.style.display="inline-block"):(h.style.display="none",k.style.display=
+"none",g.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?
+this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=
+null}),600)}),a||200)}),r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var t=f(mxUtils.bind(this,function(b){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 c=t.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){t.style.display=1<w.getChildCount(w.root)?
"":"none"})}this.addChromelessToolbarItems(f);null!=this.editor.editButtonLink&&f(mxUtils.bind(this,function(b){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||f(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
-mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||t(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():t(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||t(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
-c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?q():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var u=
+mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||r(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
+c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?q():r(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var u=
a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}u.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*
d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),
this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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=
@@ -2104,7 +2106,7 @@ mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClien
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"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 c=urlParams.border,d=60;null!=c&&(d=parseInt(c));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.chromeless)return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
+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,c){try{var d=mxUtils.parseXml(a);this.editor.setGraphXml(d.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=c&&(this.editor.setFilename(c),this.updateDocumentTitle())}catch(b){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+b.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,c){this.currentMenuElt=c;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){}};
@@ -2112,10 +2114,10 @@ EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing())
EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0,d;for(d in urlParams)a=0==c?a+"?":a+"&",a+=d+"="+urlParams[d],c++;return a};
EditorUi.prototype.setScrollbars=function(a){var c=this.editor.graph,d=c.container.style.overflow;c.scrollbars=a;this.editor.updateGraphComponents();d!=c.container.style.overflow&&("hidden"==c.container.style.overflow?(a=c.view.translate,c.view.setTranslate(a.x-c.container.scrollLeft/c.view.scale,a.y-c.container.scrollTop/c.view.scale),c.container.scrollLeft=0,c.container.scrollTop=0,c.minimumGraphSize=null,c.sizeDidChange()):(a=c.view.translate.x,d=c.view.translate.y,c.view.translate.x=0,c.view.translate.y=
0,c.sizeDidChange(),c.container.scrollLeft-=Math.round(a*c.view.scale),c.container.scrollTop-=Math.round(d*c.view.scale)));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.chromeless)if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var c=a.getPagePadding();a.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing);a.container.scrollLeft=Math.floor(Math.min(c.x,(a.container.scrollWidth-a.container.clientWidth)/2));c=a.getGraphBounds();
-0<c.width&&0<c.height&&(c.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{var c=a.getGraphBounds(),d=Math.max(c.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-Math.max(c.height,a.scrollTileSize.height*
-a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth-d)/2)))}else a.pageVisible?(c=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x),Math.floor(Math.max(0,(a.container.clientHeight-c.height)/2)-c.y))):(c=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-c.width)/2)-c.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-c.height)/
-4))-c.y)))};
+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 c=a.getPagePadding();a.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing);a.container.scrollLeft=Math.floor(Math.min(c.x,(a.container.scrollWidth-a.container.clientWidth)/2));c=
+a.getGraphBounds();0<c.width&&0<c.height&&(c.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{var c=a.getGraphBounds(),d=Math.max(c.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-Math.max(c.height,
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth-d)/2)))}else a.pageVisible?(c=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x),Math.floor(Math.max(0,(a.container.clientHeight-c.height)/2)-c.y))):(c=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-c.width)/2)-c.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
+c.height)/4))-c.y)))};
EditorUi.prototype.setPageVisible=function(a){var c=this.editor.graph,d=mxUtils.hasScrollbars(c.container),b=0,f=0;d&&(b=c.view.translate.x*c.view.scale-c.container.scrollLeft,f=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=a;c.pageBreaksVisible=a;c.preferPageSize=a;c.view.validateBackground();d&&(a=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(a));c.sizeDidChange();d&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-b,c.container.scrollTop=c.view.translate.y*
c.view.scale-f);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,c,d,b){this.ui=a;this.previousColor=this.color=c;this.previousImage=this.image=d;this.previousFormat=this.format=b;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}this.ignoreImage||(this.image=this.previousImage,c=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=c);null!=this.previousFormat&&(this.format=this.previousFormat,c=a.pageFormat,this.previousFormat.width!=c.width||this.previousFormat.height!=c.height)&&(this.ui.setPageFormat(this.previousFormat),
@@ -2125,18 +2127,18 @@ EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this
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"),c=this.actions.get("redo"),d=this.editor.undoManager,b=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,b);d.addListener(mxEvent.UNDO,b);d.addListener(mxEvent.REDO,b);d.addListener(mxEvent.CLEAR,b);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);b()};var e=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,c){e.apply(this,arguments);b()};b()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),d=!1,b=!1,f=a.getSelectionCells();if(null!=f)for(var e=0;e<f.length;e++){var h=f[e];a.getModel().isEdge(h)&&(b=!0);a.getModel().isVertex(h)&&(d=!0);if(b&&d)break}f="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(e=
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),d=!1,b=!1,f=a.getSelectionCells();if(null!=f)for(var e=0;e<f.length;e++){var k=f[e];a.getModel().isEdge(k)&&(b=!0);a.getModel().isVertex(k)&&(d=!0);if(b&&d)break}f="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(e=
0;e<f.length;e++)this.actions.get(f[e]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(b);this.actions.get("rotation").setEnabled(d);this.actions.get("wordWrap").setEnabled(d);this.actions.get("autosize").setEnabled(d);b=d&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
b&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||b&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(b&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(c||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(d&&(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()));c=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(c);this.actions.get("collapse").setEnabled(c);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());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);c=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(c);this.menus.get("insert").setEnabled(c);this.menus.get("direction").setEnabled(c&&d);this.menus.get("align").setEnabled(c&&d&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(c&&d&&1<a.getSelectionCount());
this.actions.get("selectVertices").setEnabled(c);this.actions.get("selectEdges").setEnabled(c);this.actions.get("selectAll").setEnabled(c);this.actions.get("selectNone").setEnabled(c);this.updatePasteActionStates()};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var c=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),d=this.container.clientWidth,b=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,b=c?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var f=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(f=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var e=Math.max(0,Math.min(this.hsplitPosition,d-this.splitSize-20)),h=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",h+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",h+=this.toolbarHeight);0<h&&!mxClient.IS_QUIRKS&&(h+=1);var g=0;if(null!=this.sidebarFooterContainer){var k=
-this.footerHeight+f,g=Math.max(0,Math.min(b-h-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=e+"px";this.sidebarFooterContainer.style.height=g+"px";this.sidebarFooterContainer.style.bottom=k+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=h+"px";this.sidebarContainer.style.width=e+"px";this.formatContainer.style.top=h+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(f=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var e=Math.max(0,Math.min(this.hsplitPosition,d-this.splitSize-20)),k=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",k+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",k+=this.toolbarHeight);0<k&&!mxClient.IS_QUIRKS&&(k+=1);var g=0;if(null!=this.sidebarFooterContainer){var h=
+this.footerHeight+f,g=Math.max(0,Math.min(b-k-h,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=e+"px";this.sidebarFooterContainer.style.height=g+"px";this.sidebarFooterContainer.style.bottom=h+"px"}h=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=k+"px";this.sidebarContainer.style.width=e+"px";this.formatContainer.style.top=k+"px";this.formatContainer.style.width=h+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?e+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+f+"px";this.hsplit.style.left=e+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);c?(this.menubarContainer.style.width=d+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-c=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-g+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,d-e-this.splitSize-k)+"px":d+"px",this.footerContainer.style.width=this.menubarContainer.style.width,g=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+f+"px",g-=this.tabContainer.clientHeight),this.diagramContainer.style.height=g+"px",this.hsplit.style.height=g+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=f+"px"),this.diagramContainer.style.right=k+"px",d=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+f+"px",this.tabContainer.style.right=this.diagramContainer.style.right,d=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+g+f+"px",this.formatContainer.style.bottom=
+c=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-g+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,d-e-this.splitSize-h)+"px":d+"px",this.footerContainer.style.width=this.menubarContainer.style.width,g=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
+this.footerHeight+f+"px",g-=this.tabContainer.clientHeight),this.diagramContainer.style.height=g+"px",this.hsplit.style.height=g+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=f+"px"),this.diagramContainer.style.right=h+"px",d=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+f+"px",this.tabContainer.style.right=this.diagramContainer.style.right,d=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+g+f+"px",this.formatContainer.style.bottom=
this.footerHeight+f+"px",this.diagramContainer.style.bottom=this.footerHeight+f+d+"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=
@@ -2146,8 +2148,8 @@ 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";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");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 c=document.createElement("div");c.className=a;return c};
-EditorUi.prototype.addSplitHandler=function(a,c,d,b){function f(a){if(null!=h){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,g+(c?e.x-h.x:h.y-e.y)-d));mxEvent.consume(a);g!=m()&&(k=!0,l=null)}}function e(a){f(a);h=g=null}var h=null,g=null,k=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){h=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));g=m();k=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!k){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,f,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,e)})};EditorUi.prototype.showDialog=function(a,c,d,b,f,e,h){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,f,e,h);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,c,d,b){function f(a){if(null!=k){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,g+(c?e.x-k.x:k.y-e.y)-d));mxEvent.consume(a);g!=m()&&(h=!0,l=null)}}function e(a){f(a);k=g=null}var k=null,g=null,h=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){k=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));g=m();h=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!h){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,f,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,e)})};EditorUi.prototype.showDialog=function(a,c,d,b,f,e,k){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,f,e,k);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
EditorUi.prototype.pickColor=function(a,c){var d=this.editor.graph,b=d.cellEditor.saveSelection(),f=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(b);c(a)},function(){d.cellEditor.restoreSelection(b)});this.showDialog(f.container,230,430,!0,!1);f.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})};
@@ -2157,17 +2159,17 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,d=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);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,c,d){var b=this.editor.graph;if(b.isEnabled()){b.getModel().beginUpdate();try{a()}catch(f){throw f;}finally{this.allowAnimation&&c&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(b),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){b.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(b.getModel().endUpdate(),null!=d&&d())}}};
-EditorUi.prototype.showImageDialog=function(a,c,d,b){b=this.editor.graph.cellEditor;var f=b.saveSelection(),e=mxUtils.prompt(a,c);b.restoreSelection(f);if(null!=e&&0<e.length){var h=new Image;h.onload=function(){d(e,h.width,h.height)};h.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};h.src=e}else d(null)};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,c,d,b){b=this.editor.graph.cellEditor;var f=b.saveSelection(),e=mxUtils.prompt(a,c);b.restoreSelection(f);if(null!=e&&0<e.length){var k=new Image;k.onload=function(){d(e,k.width,k.height)};k.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=e}else d(null)};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showBackgroundImageDialog=function(a){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 c=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=c&&0<c.length){var d=new Image;d.onload=function(){a(new mxImage(c,d.width,d.height))};d.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};d.src=c}else 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,c,d){mxUtils.confirm(a)?null!=c&&c():null!=d&&d()};
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};
-EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),f=0;f<e.length;f++)if(b.getModel().isVertex(e[f])&&b.isCellResizable(e[f])){var g=b.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),b.getModel().setGeometry(e[f],g))}}finally{b.getModel().endUpdate()}}else e=
+EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){k.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),f=0;f<e.length;f++)if(b.getModel().isVertex(e[f])&&b.isCellResizable(e[f])){var g=b.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),b.getModel().setGeometry(e[f],g))}}finally{b.getModel().endUpdate()}}else e=
b.getSelectionCell(),f=b.model.getParent(e),g=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(g=b.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(e),37==a||38==a?b.model.add(f,e,Math.max(0,g-1)):39!=a&&40!=a||b.model.add(f,e,Math.min(b.model.getChildCount(f),g+1))):(f=e=0,37==a?e=-c:38==a?f=-c:39==a?e=c:40==a&&(f=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,f))});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0<
-h.length){b.getModel().beginUpdate();try{for(var a=0;a<h.length;a++)h[a]();h=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return(!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)&&e.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var h=[],g=null,k={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction,m={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
-80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var e=m[a.keyCode];if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=k[a.keyCode]&&!b.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=
-b.connectVertex(b.getSelectionCell(),k[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return l.apply(this,
-arguments)};f.bindAction=mxUtils.bind(this,function(a,b,c,d){var e=this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?f.bindControlShiftKey(a,c):f.bindControlKey(a,c):d?f.bindShiftKey(a,c):f.bindKey(a,c))});var p=f.escape;f.escape=function(a){p.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){b.exitGroup()});f.bindControlShiftKey(35,function(){b.enterGroup()});f.bindKey(36,function(){b.home()});f.bindKey(35,function(){b.refresh()});f.bindAction(107,
+k.length){b.getModel().beginUpdate();try{for(var a=0;a<k.length;a++)k[a]();k=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return(!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)&&e.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var k=[],g=null,h={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction,m={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
+80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var e=m[a.keyCode];if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=h[a.keyCode]&&!b.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=
+b.connectVertex(b.getSelectionCell(),h[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return l.apply(this,
+arguments)};f.bindAction=mxUtils.bind(this,function(a,b,c,d){var e=this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?f.bindControlShiftKey(a,c):f.bindControlKey(a,c):d?f.bindShiftKey(a,c):f.bindKey(a,c))});var n=f.escape;f.escape=function(a){n.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){b.exitGroup()});f.bindControlShiftKey(35,function(){b.enterGroup()});f.bindKey(36,function(){b.home()});f.bindKey(35,function(){b.refresh()});f.bindAction(107,
!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);f.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),f.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),f.bindControlKey(13,function(){b.isEnabled()&&b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),!1))}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(46,!1,
"delete"),f.bindAction(46,!0,"deleteAll"),f.bindAction(72,!0,"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",
@@ -2186,26 +2188,26 @@ Sidebar.prototype.expandedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhD
Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEaSURBVHjabNGxS5VxFIfxz71XaWuQUJCG/gCHhgTD9VpEETg4aMOlQRp0EoezObgcd220KQiXmpretTAHQRBdojlQEJyukPdt+b1ywfvAGc7wnHP4nlZd1yKijQW8xzNc4Su+ZOYfQ3T6/f4YNvEJYzjELXp4VVXVz263+7cR2niBxAFeZ2YPi3iHR/gYERPDwhpOsd6sz8x/mfkNG3iOlWFhFj8y89J9KvzGXER0GuEaD42mgwHqUtoljbcRsTBCeINpfM/MgZLKPpaxFxGbOCqDXmILN7hoJrTKH+axhxmcYRxP0MIDnOBDZv5q1XUNIuJxifJp+UNV7t7BFM6xeic0RMQ4Bpl5W/ol7GISx/eEUUTECrbx+f8A8xhiZht9zsgAAAAASUVORK5CYII=":IMAGE_PATH+
"/search.png";Sidebar.prototype.dragPreviewBorder="1px dashed black";Sidebar.prototype.enableTooltips=!0;Sidebar.prototype.tooltipBorder=16;Sidebar.prototype.tooltipDelay=300;Sidebar.prototype.dropTargetDelay=200;Sidebar.prototype.gearImage=STENCIL_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.thumbWidth=36;Sidebar.prototype.thumbHeight=36;Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1;Sidebar.prototype.thumbBorder=2;Sidebar.prototype.sidebarTitleSize=9;
Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.getTooltipOffset=function(){return new mxPoint(0,0)};
-Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),this.tooltipImage=mxUtils.createImage(this.tooltipImage),this.tooltipImage.className="geSidebarTooltipImage",this.tooltipImage.style.zIndex=mxPopupMenu.prototype.zIndex-1,this.tooltipImage.style.position="absolute",this.tooltipImage.style.width=
"14px",this.tooltipImage.style.height="27px",document.body.appendChild(this.tooltipImage));this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=d>this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);
-mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=f&&0<f.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",
+mxClient.NO_FO=g;var k=this.graph2.getGraphBounds(),l=k.width+2*this.tooltipBorder+4,g=k.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=f&&0<f.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",
this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,f),l=this.tooltipTitle.offsetHeight+10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&
-null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,p=document.documentElement,n=this.getTooltipOffset(),q=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+n.x,m=Math.min(Math.max(m.clientHeight||0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-
-g/2+16))+n.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=q+"px";this.tooltip.style.top=m+"px";this.tooltipImage.style.left=q-13+"px";this.tooltipImage.style.top=m+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=
-window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))};
+null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(k.x-this.tooltipBorder),k=-Math.round(k.y-this.tooltipBorder),m=document.body,n=document.documentElement,p=this.getTooltipOffset(),q=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+p.x,m=Math.min(Math.max(m.clientHeight||0,n.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-
+g/2+16))+p.y;mxClient.IS_SVG?0!=l||0!=k?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+k+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=k+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=q+"px";this.tooltip.style.top=m+"px";this.tooltipImage.style.left=q-13+"px";this.tooltipImage.style.top=m+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=
+window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))};
Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length)for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),b=mxUtils.bind(this,function(a){if(1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[],dict:new mxDictionary},this.taglist[a]=b);null==b.dict.get(c)&&(b.dict.put(c,c),b.entries.push(c))}}),f=0;f<d.length;f++){b(d[f]);var e=d[f].replace(/\.*\d*$/,"");e!=d[f]&&b(e)}return c};
-Sidebar.prototype.searchEntries=function(a,c,d,b,f){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");f=new mxDictionary;var h=(d+1)*c;a=[];for(var g=0,k=0;k<e.length;k++)if(0<e[k].length){var l=this.taglist[e[k]],m=new mxDictionary;if(null!=l){var p=l.entries;a=[];for(var n=0;n<p.length;n++)if(l=p[n],0==g==(null==f.get(l))&&(m.put(l,l),a.push(l),k==e.length-1&&a.length==h)){b(a.slice(d*c,h),h,!0,e);return}}else a=[];f=m;g++}f=a.length;b(a.slice(d*c,(d+1)*c),f,!1,e)}else b([],null,
+Sidebar.prototype.searchEntries=function(a,c,d,b,f){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");f=new mxDictionary;var k=(d+1)*c;a=[];for(var g=0,h=0;h<e.length;h++)if(0<e[h].length){var l=this.taglist[e[h]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==g==(null==f.get(l))&&(m.put(l,l),a.push(l),h==e.length-1&&a.length==k)){b(a.slice(d*c,k),k,!0,e);return}}else a=[];f=m;g++}f=a.length;b(a.slice(d*c,(d+1)*c),f,!1,e)}else b([],null,
null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var c=[],d={},b=0;b<a.length;b++)null==d[a[b]]&&(d[a[b]]="1",c.push(a[b]));return c.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,c){var d=a.clone();null!=c&&(d.value=c);return d};
Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var d=document.createElement("div");d.className="geSidebar";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.width="100%";d.style.padding="8px";d.style.paddingTop="14px";d.style.paddingBottom="0px";a||(d.style.display="none");var b=document.createElement("div");b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.paddingBottom="8px";
b.style.cursor="default";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("searchShapes"));f.setAttribute("type","text");f.style.fontSize="12px";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.border="solid 1px #d5d5d5";f.style.borderRadius="4px";f.style.width="100%";f.style.outline="none";f.style.padding="6px";b.appendChild(f);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",mxResources.get("search"));
-e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var h;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),k=mxUtils.button(mxResources.get("moreResults"),function(){h()});k.style.display="none";k.style.lineHeight="normal";k.style.marginTop="4px";k.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom="8px";g.appendChild(k);
-d.appendChild(g);var l="",m=!1,p=!1,n=0,q={},t=12,r=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",r());f.focus()});h=mxUtils.bind(this,function(){t=4*Math.max(1,
-Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(r(),l=f.value,q={},p=!1,n=0),!m&&!p)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,t,n,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;n++;g.parentNode.removeChild(g);this.insertSearchHint(d,l,t,n,b,c,e,
-f);for(c=0;c<b.length;c++)f=b[c](),null==q[f.innerHTML]&&(q[f.innerHTML]="1",d.appendChild(b[c]()));e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",p=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else r(),l=f.value="",q={},k.style.display="none",p=!1,f.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));
-mxEvent.addListener(f,"focus",function(){f.style.paddingRight=""});mxEvent.addListener(f,"blur",function(){f.style.paddingRight="20px"});f.style.paddingRight="20px";mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(p=!0,k.style.display="none"):f.value!=l?(k.style.display=
-"none",p=!1):m||(k.style.display=p?"none":"")}));mxEvent.addListener(f,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
-Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,h,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
+e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var k;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),h=mxUtils.button(mxResources.get("moreResults"),function(){k()});h.style.display="none";h.style.lineHeight="normal";h.style.marginTop="4px";h.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom="8px";g.appendChild(h);
+d.appendChild(g);var l="",m=!1,n=!1,p=0,q={},r=12,t=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),h.style.display="none",l=f.value="",t());f.focus()});k=mxUtils.bind(this,function(){r=4*Math.max(1,
+Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(t(),l=f.value,q={},n=!1,p=0),!m&&!n)){h.setAttribute("disabled","true");h.style.display="";h.style.cursor="wait";h.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,r,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;g.parentNode.removeChild(g);this.insertSearchHint(d,l,r,p,b,c,e,
+f);for(c=0;c<b.length;c++)f=b[c](),null==q[f.innerHTML]&&(q[f.innerHTML]="1",d.appendChild(b[c]()));e?(h.removeAttribute("disabled"),h.innerHTML=mxResources.get("moreResults")):(h.innerHTML=mxResources.get("reset"),h.style.display="none",n=!0);h.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){h.style.cursor=""}))}}else t(),l=f.value="",q={},h.style.display="none",n=!1,f.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(k(),mxEvent.consume(a))}));
+mxEvent.addListener(f,"focus",function(){f.style.paddingRight=""});mxEvent.addListener(f,"blur",function(){f.style.paddingRight="20px"});f.style.paddingRight="20px";mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(n=!0,h.style.display="none"):f.value!=l?(h.style.display=
+"none",n=!1):m||(h.style.display=n?"none":"")}));mxEvent.addListener(f,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
+Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,k,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
Sidebar.prototype.addGeneralPalette=function(a){var c=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",40,20,"Text","Text",null,null,"text textbox textarea label"),
this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;",
@@ -2287,114 +2289,116 @@ a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new
160,0,"","Terminate",null,"terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,f)};
Sidebar.prototype.addBpmnPalette=function(a,c){var d=this,b=[this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;",120,80,"Task","Process",null,null,"bpmn task process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;double=1;",120,80,"Transaction","Transaction",null,null,"bpmn transaction"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;dashed=1;dashPattern=1 4;",120,80,"Event\nSub-Process","Event Sub-Process",null,null,
-"bpmn event subprocess sub process sub-process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;strokeWidth=3;",120,80,"Call Activity","Call Activity",null,null,"bpmn call activity"),this.addEntry("bpmn subprocess sub process sub-process",function(){var a=new mxCell("Sub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
-new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Process")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","loop","subprocess sub process sub-process looped").join(" "),function(){var a=new mxCell("Looped\nSub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=mxgraph.bpmn.loop;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
-new mxPoint(-15,-14);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(1,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Looped Sub-Process")}),this.addEntry("bpmn receive task",function(){var a=new mxCell("Receive",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"html=1;shape=message;");
-b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(7,7);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Receive Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","user_task").join(" "),function(){var a=new mxCell("User",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,14,14),"html=1;shape=mxgraph.bpmn.user_task;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
-new mxPoint(7,7);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"User Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(1,
-1,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-40,-15);a.insert(b);return d.createVertexTemplateFromCells([a],120,95,"Attached Timer Event 1")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");
-a.vertex=!0;var b=new mxCell("",new mxGeometry(1,0,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-15,10);a.insert(b);return d.createVertexTemplateFromCells([a],135,80,"Attached Timer Event 2")}),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;startSize=20;",320,240,"Pool","Pool",null,null,"bpmn pool"),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;",
-300,120,"Lane","Lane",null,null,"bpmn lane"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;",60,50,"","Conversation",null,null,"bpmn conversation"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4",60,50,"","Call Conversation",null,null,"bpmn call conversation"),this.addEntry("bpmn subconversation sub conversation sub-conversation",function(){var a=new mxCell("",new mxGeometry(0,0,60,50),
-"shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Conversation")}),this.addEntry("bpmn data object",function(){var a=new mxCell("",new mxGeometry(0,0,40,60),"shape=note;whiteSpace=wrap;size=16;html=1;");a.vertex=!0;var b=new mxCell("",
-new mxGeometry(0,0,14,14),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(2,2);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;whiteSpace=wrap;shape=parallelMarker;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Data Object")}),this.createVertexTemplateEntry("shape=datastore;whiteSpace=wrap;html=1;",
-60,60,"","Data Store",null,null,"bpmn data store"),this.createVertexTemplateEntry("shape=plus;html=1;",14,14,"","Sub-Process Marker",null,null,"bpmn subprocess sub process sub-process marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.loop;html=1;",14,14,"","Loop Marker",null,null,"bpmn loop marker"),this.createVertexTemplateEntry("shape=parallelMarker;html=1;",14,14,"","Parallel MI Marker",null,null,"bpmn parallel mi marker"),this.createVertexTemplateEntry("shape=parallelMarker;direction=south;html=1;",
-14,14,"","Sequential MI Marker",null,null,"bpmn sequential mi marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;",14,14,"","Ad Hoc Marker",null,null,"bpmn ad hoc marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.compensation;html=1;",14,14,"","Compensation Marker",null,null,"bpmn compensation marker"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;",40,30,"","Send Task",null,
-null,"bpmn send task"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;",40,30,"","Receive Task",null,null,"bpmn receive task"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.user_task;html=1;",14,14,"","User Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.manual_task;html=1;",14,14,"","Manual Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.business_rule_task;html=1;",
-14,14,"","Business Rule Task",null,null,this.getTagsForStencil("mxgraph.bpmn","business_rule_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.service_task;html=1;",14,14,"","Service Task",null,null,this.getTagsForStencil("mxgraph.bpmn","service_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.script_task;html=1;",14,14,"","Script Task",null,null,this.getTagsForStencil("mxgraph.bpmn","script_task").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.flowchart.annotation_2;align=left;",
-50,100,"","Annotation",null,null,this.getTagsForStencil("bpmn","annotation_1","bpmn business process model ").join(" ")),this.createVertexTemplateEntry("rounded=1;arcSize=10;dashed=1;strokeColor=#000000;fillColor=none;gradientColor=none;dashPattern=8 3 1 3;strokeWidth=2;",200,200,"","Group",null,null,this.getTagsForStencil("bpmn","group","bpmn business process model ").join(" ")),this.createEdgeTemplateEntry("endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Sequence Flow",null,"bpmn sequence flow"),
-this.createEdgeTemplateEntry("startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Default Flow",null,"bpmn default flow"),this.createEdgeTemplateEntry("startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Conditional Flow",null,"bpmn conditional flow"),this.createEdgeTemplateEntry("startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;",100,0,"","Message Flow 1",null,"bpmn message flow"),
-this.addEntry("bpmn message flow",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;b.geometry.offset=new mxPoint(-10,-7);a.insert(b);return d.createEdgeTemplateFromCells([a],
-100,0,"Message Flow 2")}),this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"bpmn link")];this.addPaletteFunctions("bpmn","BPMN "+mxResources.get("general"),!1,b)};Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c};
-Sidebar.prototype.createThumb=function(a,c,d,b,f,e,h,g,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();g=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((c-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));if(this.graph.dialect!=mxConstants.DIALECT_SVG||
+"bpmn event subprocess sub process sub-process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;strokeWidth=3;",120,80,"Call Activity","Call Activity",null,null,"bpmn call activity"),this.addEntry("bpmn subprocess sub process sub-process",function(){var a=new mxCell("Sub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;outlineConnect=0;");b.vertex=!0;b.geometry.relative=
+!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Process")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","loop","subprocess sub process sub-process looped").join(" "),function(){var a=new mxCell("Looped\nSub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=mxgraph.bpmn.loop;outlineConnect=0;");b.vertex=!0;b.geometry.relative=
+!0;b.geometry.offset=new mxPoint(-15,-14);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(1,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Looped Sub-Process")}),this.addEntry("bpmn receive task",function(){var a=new mxCell("Receive",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"html=1;shape=message;outlineConnect=0;");
+b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(7,7);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Receive Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","user_task").join(" "),function(){var a=new mxCell("User",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,14,14),"html=1;shape=mxgraph.bpmn.user_task;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;
+b.geometry.offset=new mxPoint(7,7);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"User Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=
+!0;var b=new mxCell("",new mxGeometry(1,1,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-40,-15);a.insert(b);return d.createVertexTemplateFromCells([a],120,95,"Attached Timer Event 1")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",
+new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(1,0,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-15,10);a.insert(b);return d.createVertexTemplateFromCells([a],135,80,"Attached Timer Event 2")}),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;startSize=20;",
+320,240,"Pool","Pool",null,null,"bpmn pool"),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;",300,120,"Lane","Lane",null,null,"bpmn lane"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;rounded=0;",60,50,"","Conversation",null,null,"bpmn conversation"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4;rounded=0;",60,50,"","Call Conversation",
+null,null,"bpmn call conversation"),this.addEntry("bpmn subconversation sub conversation sub-conversation",function(){var a=new mxCell("",new mxGeometry(0,0,60,50),"shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;rounded=0;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Conversation")}),
+this.addEntry("bpmn data object",function(){var a=new mxCell("",new mxGeometry(0,0,40,60),"shape=note;whiteSpace=wrap;size=16;html=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,14,14),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(2,2);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;whiteSpace=wrap;shape=parallelMarker;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
+new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Data Object")}),this.createVertexTemplateEntry("shape=datastore;whiteSpace=wrap;html=1;",60,60,"","Data Store",null,null,"bpmn data store"),this.createVertexTemplateEntry("shape=plus;html=1;outlineConnect=0;",14,14,"","Sub-Process Marker",null,null,"bpmn subprocess sub process sub-process marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.loop;html=1;outlineConnect=0;",14,14,"",
+"Loop Marker",null,null,"bpmn loop marker"),this.createVertexTemplateEntry("shape=parallelMarker;html=1;outlineConnect=0;",14,14,"","Parallel MI Marker",null,null,"bpmn parallel mi marker"),this.createVertexTemplateEntry("shape=parallelMarker;direction=south;html=1;outlineConnect=0;",14,14,"","Sequential MI Marker",null,null,"bpmn sequential mi marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;outlineConnect=0;",14,14,"","Ad Hoc Marker",null,null,"bpmn ad hoc marker"),
+this.createVertexTemplateEntry("shape=mxgraph.bpmn.compensation;html=1;outlineConnect=0;",14,14,"","Compensation Marker",null,null,"bpmn compensation marker"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;outlineConnect=0;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;",40,30,"","Send Task",null,null,"bpmn send task"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;outlineConnect=0;",40,30,"","Receive Task",null,null,"bpmn receive task"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.user_task;html=1;outlineConnect=0;",
+14,14,"","User Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.manual_task;html=1;outlineConnect=0;",14,14,"","Manual Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.business_rule_task;html=1;outlineConnect=0;",14,14,"","Business Rule Task",null,null,this.getTagsForStencil("mxgraph.bpmn","business_rule_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.service_task;html=1;outlineConnect=0;",
+14,14,"","Service Task",null,null,this.getTagsForStencil("mxgraph.bpmn","service_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.script_task;html=1;outlineConnect=0;",14,14,"","Script Task",null,null,this.getTagsForStencil("mxgraph.bpmn","script_task").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.flowchart.annotation_2;align=left;",50,100,"","Annotation",null,null,this.getTagsForStencil("bpmn","annotation_1","bpmn business process model ").join(" ")),this.createVertexTemplateEntry("rounded=1;arcSize=10;dashed=1;strokeColor=#000000;fillColor=none;gradientColor=none;dashPattern=8 3 1 3;strokeWidth=2;",
+200,200,"","Group",null,null,this.getTagsForStencil("bpmn","group","bpmn business process model ").join(" ")),this.createEdgeTemplateEntry("endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Sequence Flow",null,"bpmn sequence flow"),this.createEdgeTemplateEntry("startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Default Flow",null,"bpmn default flow"),this.createEdgeTemplateEntry("startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6;html=1;",
+100,0,"","Conditional Flow",null,"bpmn conditional flow"),this.createEdgeTemplateEntry("startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;",100,0,"","Message Flow 1",null,"bpmn message flow"),this.addEntry("bpmn message flow",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,
+0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");b.geometry.relative=!0;b.vertex=!0;b.geometry.offset=new mxPoint(-10,-7);a.insert(b);return d.createEdgeTemplateFromCells([a],100,0,"Message Flow 2")}),this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"bpmn link")];this.addPaletteFunctions("bpmn","BPMN "+mxResources.get("general"),!1,b)};
+Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c};
+Sidebar.prototype.createThumb=function(a,c,d,b,f,e,k,g,h){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();g=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((c-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));if(this.graph.dialect!=mxConstants.DIALECT_SVG||
mxClient.NO_FO){if(g=this.graph.container.cloneNode(!1),g.innerHTML=this.graph.container.innerHTML,mxClient.IS_QUIRKS||8==document.documentMode)g.firstChild.style.overflow="visible"}else g=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;mxClient.IS_IE6&&(b.style.backgroundImage="url("+this.editorUi.editor.transparentImage+")");g.style.position="relative";g.style.overflow="hidden";g.style.cursor="move";g.style.left=this.thumbBorder+"px";g.style.top=
-this.thumbBorder+"px";g.style.width=c+"px";g.style.height=d+"px";g.style.visibility="";g.style.minWidth="";g.style.minHeight="";b.appendChild(g);this.sidebarTitles&&null!=f&&0!=h&&(b.style.height=this.thumbHeight+(mxClient.IS_QUIRKS?2*this.thumbPadding+2:0)+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=this.sidebarTitleSize+12+"px"),
+this.thumbBorder+"px";g.style.width=c+"px";g.style.height=d+"px";g.style.visibility="";g.style.minWidth="";g.style.minHeight="";b.appendChild(g);this.sidebarTitles&&null!=f&&0!=k&&(b.style.height=this.thumbHeight+(mxClient.IS_QUIRKS?2*this.thumbPadding+2:0)+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=this.sidebarTitleSize+12+"px"),
c.style.paddingTop="4px",mxUtils.write(c,f),b.appendChild(c));return a};
-Sidebar.prototype.createItem=function(a,c,d,b,f,e,h){var g=document.createElement("a");g.setAttribute("href","javascript:void(0);");g.className="geItem";g.style.overflow="hidden";var k=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;g.style.width=this.thumbWidth+k+"px";g.style.height=this.thumbHeight+k+"px";g.style.padding=this.thumbPadding+"px";mxClient.IS_IE6&&(g.style.border="none");mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});this.createThumb(a,this.thumbWidth,this.thumbHeight,
-g,c,d,b,f,e);var l=new mxRectangle(0,0,f,e);1<a.length||a[0].vertex?(b=this.createDragSource(g,this.createDropHandler(a,!0,h,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a),b.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(b=this.createDragSource(g,this.createDropHandler(a,!1,h,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a));mxClient.IS_IOS||mxEvent.addGestureListeners(g,null,mxUtils.bind(this,
+Sidebar.prototype.createItem=function(a,c,d,b,f,e,k){var g=document.createElement("a");g.setAttribute("href","javascript:void(0);");g.className="geItem";g.style.overflow="hidden";var h=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;g.style.width=this.thumbWidth+h+"px";g.style.height=this.thumbHeight+h+"px";g.style.padding=this.thumbPadding+"px";mxClient.IS_IE6&&(g.style.border="none");mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});this.createThumb(a,this.thumbWidth,this.thumbHeight,
+g,c,d,b,f,e);var l=new mxRectangle(0,0,f,e);1<a.length||a[0].vertex?(b=this.createDragSource(g,this.createDropHandler(a,!0,k,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a),b.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(b=this.createDragSource(g,this.createDropHandler(a,!1,k,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a));mxClient.IS_IOS||mxEvent.addGestureListeners(g,null,mxUtils.bind(this,
function(b){mxEvent.isMouseEvent(b)&&this.showTooltip(g,a,l.width,l.height,c,d)}));return g};
-Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=d.getCellStyle(a),f=[];d.model.beginUpdate();try{for(var e=d.getModel().getStyle(a),h="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable".split(" "),g=0;g<c.length;g++){var k=c[g];if(d.getModel().isVertex(k)==d.getModel().isVertex(a)||
-d.getModel().isEdge(k)==d.getModel().isEdge(a)){var l=d.view.getState(k),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(k,e);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var p=d.model.getChildCount(k);0<=p;p--)d.model.remove(d.model.getChildAt(k,p));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k])),
-p=0;p<h.length;p++){var n=m[h[p]];null!=n&&d.setCellStyles(h[p],n,[k])}f.push(k)}}}finally{d.model.endUpdate()}return f};
-Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(f,e,h,g,k){if(f.isEnabled()){a=f.getImportableCells(a);if(0<a.length){f.stopEditing();var l=null==h||mxEvent.isAltDown(e)?!1:f.isValidDropTarget(h,a,e),m=null;null==h||l||(h=null);if(!f.isCellLocked(h||f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var p=f.cloneCells(a);f.splitEdge(h,p,null,g-b.width/2,k-b.height/2);m=p}else 0<a.length&&
-(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var n=f.layoutManager.getLayout(h);if(null!=n){var q=f.view.scale,t=f.view.translate,r=(g+t.x)*q,w=(k+t.y)*q;for(h=0;h<m.length;h++)n.moveCell(m[h],r,w)}}d&&f.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{f.model.endUpdate()}null!=m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m))}}mxEvent.consume(e)}})};
-Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
-Sidebar.prototype.dropAndConnect=function(a,c,d,b){var f=this.getDropAndConnectGeometry(a,c[b],d,c),e=[];if(null!=f){var h=this.editorUi.editor.graph;h.model.beginUpdate();try{var g=h.getCellGeometry(a),k=h.getCellGeometry(c[b]),l=h.model.getParent(a),m=!0;if(null!=h.layoutManager){var p=h.layoutManager.getLayout(l);if(null!=p&&p.constructor==mxStackLayout&&(m=!1,e=h.view.getState(l),null!=e)){var n=new mxPoint(e.x/h.view.scale-h.view.translate.x,e.y/h.view.scale-h.view.translate.y);f.x+=n.x;f.y+=
-n.y;var q=f.getTerminalPoint(!1);null!=q&&(q.x+=n.x,q.y+=n.y)}}var t=k.x,r=k.y;h.model.isEdge(c[b])&&(r=t=0);var w=h.model.isEdge(a)||null!=g&&!g.relative&&m,e=c=h.importCells(c,f.x-(w?t:0),f.y-(w?r:0),w?l:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[b])){h.model.setTerminal(c[b],a,!0);var v=h.getCellGeometry(c[b]);v.points=null;if(null!=v.getTerminalPoint(!1))v.setTerminalPoint(f.getTerminalPoint(!1),!1);else if(w&&h.model.isVertex(l)){var u=
-h.view.getState(l),n=u.cell!=h.view.currentRoot?new mxPoint(u.x/h.view.scale-h.view.translate.x,u.y/h.view.scale-h.view.translate.y):new mxPoint(0,0);h.cellsMoved(c,n.x,n.y,null,null,!0)}}else k=h.getCellGeometry(c[b]),t=f.x-Math.round(k.x),r=f.y-Math.round(k.y),f.x=Math.round(k.x),f.y=Math.round(k.y),h.model.setGeometry(c[b],f),h.cellsMoved(c,t,r,null,null,!0),e=c.slice(),c.push(h.insertEdge(null,null,"",a,c[b],h.createCurrentEdgeStyle()));h.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{h.model.endUpdate()}}return e};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
+Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=d.getCellStyle(a),f=[];d.model.beginUpdate();try{for(var e=d.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable".split(" "),g=0;g<c.length;g++){var h=c[g];if(d.getModel().isVertex(h)==d.getModel().isVertex(a)||
+d.getModel().isEdge(h)==d.getModel().isEdge(a)){var l=d.view.getState(h),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(h,e);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var n=d.model.getChildCount(h);0<=n;n--)d.model.remove(d.model.getChildAt(h,n));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[h]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[h])),
+n=0;n<k.length;n++){var p=m[k[n]];null!=p&&d.setCellStyles(k[n],p,[h])}f.push(h)}}}finally{d.model.endUpdate()}return f};
+Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(f,e,k,g,h,l){for(l=l?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&f.isEnabled()){a=f.getImportableCells(a);if(0<a.length){f.stopEditing();l=null==k||mxEvent.isAltDown(e)?!1:f.isValidDropTarget(k,a,e);var m=null;null==k||l||(k=null);if(!f.isCellLocked(k||
+f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);h=Math.round(h);if(c&&f.isSplitTarget(k,a,e)){var n=f.cloneCells(a);f.splitEdge(k,n,null,g-b.width/2,h-b.height/2);m=n}else 0<a.length&&(m=f.importCells(a,g,h,k));if(null!=f.layoutManager){var p=f.layoutManager.getLayout(k);if(null!=p){var q=f.view.scale,r=f.view.translate,t=(g+r.x)*q,w=(h+r.y)*q;for(k=0;k<m.length;k++)p.moveCell(m[k],t,w)}}d&&f.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{f.model.endUpdate()}null!=
+m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
+Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),k=[];if(null!=e){var g=this.editorUi.editor.graph,h=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),n=g.model.getParent(a),p=!0;if(null!=g.layoutManager){var q=g.layoutManager.getLayout(n);if(null!=q&&q.constructor==mxStackLayout&&(p=!1,k=g.view.getState(n),null!=k)){var r=new mxPoint(k.x/g.view.scale-g.view.translate.x,k.y/g.view.scale-g.view.translate.y);e.x+=
+r.x;e.y+=r.y;var t=e.getTerminalPoint(!1);null!=t&&(t.x+=r.x,t.y+=r.y)}}var w=m.x,v=m.y;g.model.isEdge(c[b])&&(v=w=0);var u=g.model.isEdge(a)||null!=l&&!l.relative&&p,k=c=g.importCells(c,e.x-(u?w:0),e.y-(u?v:0),u?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var z=g.getCellGeometry(c[b]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(u&&g.model.isVertex(n)){var x=
+g.view.getState(n),r=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,r.x,r.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),w=e.x-Math.round(m.x),v=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,w,v,null,null,!0),k=c.slice(),h=1==k.length?k[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted",
+"cells",c))}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=h&&window.setTimeout(function(){g.startEditing(h)},0)}return k};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,k=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
-b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!h&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+
+b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!k&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+
b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-e),f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=f.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/
2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};
Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])?
-m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=v&&E==D){var h=a.isCellSelected(v.cell)?a.getSelectionCells():[v.cell],h=this.updateShapes(a.model.isEdge(v.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=E&&null!=
-r&&E!=D?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,I,h))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var t=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),t.apply(this,
-arguments))};var r=null,w=null,v=null,u=!1,z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),B=null,L=e(this.roundDrop),K=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,E=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
+"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function k(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,h=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
+m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=v&&E==D){var k=a.isCellSelected(v.cell)?a.getSelectionCells():[v.cell],k=this.updateShapes(a.model.isEdge(v.cell)?b[0]:b[m],k);a.setSelectionCells(k)}else null!=b&&null!=E&&null!=
+t&&E!=D?(k=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,I,k,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var r=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(h.stopEditing(),r.apply(this,
+arguments))};var t=null,w=null,v=null,u=!1,z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),B=null,L=e(this.roundDrop),K=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,E=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var N=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");N.apply(this,arguments)};var Q=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=
-a.view;if(null!=v&&E==D)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=r&&null!=E){var e=a.model.isEdge(r.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(r.cell,b[e],I,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),y=a.model.getParent(r.cell),G=d.translate.x*
-d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(y)&&y!=d.currentRoot&&(H=d.getState(y),G=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+G+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
-(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var O=(new Date).getTime(),F=0,G=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
-c,d,e){var f=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=f&&!this.graph.isCellConnectable(f)){var g=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var k=a.view.getState(f),g=E=null;G!=k?(G=k,O=(new Date).getTime(),F=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(G=k,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+
-10))):F=(new Date).getTime()-O;if(2500>F&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||
-1500<F||a.model.isEdge(k.cell))&&F>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){v=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==B&&(a.container.appendChild(D),B=D.parentNode);h(c,d,l,D)}else null==
-v||!mxUtils.contains(v,c,d)||1500<F&&!mxEvent.isShiftDown(e)?(v=null,null!=B&&(D.parentNode.removeChild(D),B=null)):null!=v&&null!=B&&(l=a.model.isEdge(v.cell)?a.view.getPoint(v):new mxPoint(v.getCenterX(),v.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,D));if(u&&null!=r&&!mxEvent.isAltDown(e)&&null==E){g=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var y=r.absolutePoints;null!=
-L.parentNode&&(l=y[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)));null!=K.parentNode&&(y=y[y.length-1],g.add(h(c,d,new mxRectangle(y.x-this.roundDrop.width/2,y.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
-y=this.graph.selectionCellsHandler.getHandler(r.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),g.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),
-z)),g.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),g.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),C)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=g&&g.grow(10)}I=mxConstants.DIRECTION_NORTH;E==x?I=mxConstants.DIRECTION_EAST:
-E==C||E==K?I=mxConstants.DIRECTION_SOUTH:E==A&&(I=mxConstants.DIRECTION_WEST);null!=v&&E==D&&(k=v);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=r&&5E3<=F||r!=k&&(null==g||!mxUtils.contains(g,c,d)||500<F&&null==E&&l))if(u=!1,r=5E3>F&&F>this.dropTargetDelay||a.model.isEdge(f)?k:null,null!=r&&l){g=[L,K,z,x,C,A];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(y=k.absolutePoints,
-null!=y&&(l=y[0],y=y[y.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),L.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",K.style.left=Math.floor(y.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(y.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(L),null==a.model.getTerminal(f,!1)&&a.container.appendChild(K))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&
-(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),y=this.graph.selectionCellsHandler.getHandler(k.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),
-z.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",C.style.left=z.style.left,C.style.top=Math.floor(l.y+l.height)+"px",A.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(C)),a.container.appendChild(x),
-a.container.appendChild(A));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&&w.setHandlesVisible(!1));u=!0}else for(g=[L,K,z,x,C,A],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);u||null==w||w.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=v&&E==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=E||!a.isSplitTarget(f,b,e))){for(;null!=f&&!a.isValidDropTarget(f,
-b,e)&&g.isVertex(g.getParent(f));)f=g.getParent(f);if(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||g.isEdge(f))f=null}return f});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[L,K,D,z,x,C,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=w&&w.reset();E=B=v=r=w=null};return q};
-Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
-c)),b.scrollCellToVisible(b.getSelectionCell()))}}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=b.getFreeInsertPoint(),c.drop(b,d,null,a.x,a.y),null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell())))};
-Sidebar.prototype.addClickHandler=function(a,c,d){var b=this.editorUi.editor.graph,f=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(a){e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))});c.mouseUp=mxUtils.bind(this,function(h){if(!mxEvent.isPopupTrigger(h)&&null==this.currentGraph&&null!=e){var g=b.tolerance;Math.abs(e.x-mxEvent.getClientX(h))<=g&&Math.abs(e.y-mxEvent.getClientY(h))<=g&&this.itemClicked(d,c,h,a)}f.apply(c,arguments);e=null;this.currentElt=a})};
-Sidebar.prototype.createVertexTemplateEntry=function(a,c,d,b,f,e,h,g){g=null!=g&&0<g.length?g:f.toLowerCase();return this.addEntry(g,mxUtils.bind(this,function(){return this.createVertexTemplate(a,c,d,b,f,e,h)}))};Sidebar.prototype.createVertexTemplate=function(a,c,d,b,f,e,h,g){a=[new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,c,d,f,e,h,g)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,c,d,b,f,e,h){a=mxUtils.parseXml(this.graph.decompress(a));var g=new mxCodec(a),k=new mxGraphModel;g.decode(a.documentElement,k);a=this.graph.cloneCells(k.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,d,b,f,e,h)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,d,b,f,e,h){return this.createItem(a,b,f,e,c,d,h)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,c,d,b,f,e,h,g){h=null!=h&&0<h.length?h:f.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,d,b,f,e,g)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,c,d,b,f,e,h){a=new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a);a.geometry.setTerminalPoint(new mxPoint(0,d),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,d,f,e,h)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,d,b,f,e){return this.createItem(a,b,f,!0,c,d,e)};
+a.view;if(null!=v&&E==D)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=t&&null!=E){var e=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[e],I,b),k=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),h=a.getCellGeometry(b[e]),y=a.model.getParent(t.cell),G=d.translate.x*
+d.scale,H=d.translate.y*d.scale;null!=k&&!k.relative&&a.model.isVertex(y)&&y!=d.currentRoot&&(H=d.getState(y),G=H.x,H=H.y);k=h.x;h=h.y;a.model.isEdge(b[e])&&(h=k=0);this.previewElement.style.left=(g.x-k)*d.scale+G+"px";this.previewElement.style.top=(g.y-h)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
+(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),F=0,G=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
+c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var h=a.view.getState(g),f=E=null;G!=h?(G=h,P=(new Date).getTime(),F=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=h&&(this.updateThread=window.setTimeout(function(){null==E&&(G=h,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+
+10))):F=(new Date).getTime()-P;if(2500>F&&null!=h&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||
+1500<F||a.model.isEdge(h.cell))&&F>this.dropTargetDelay&&(a.model.isVertex(h.cell)&&null!=m||a.model.isEdge(h.cell)&&a.model.isEdge(b[0]))){v=h;var l=a.model.isEdge(h.cell)?a.view.getPoint(h):new mxPoint(h.getCenterX(),h.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==B&&(a.container.appendChild(D),B=D.parentNode);k(c,d,l,D)}else null==
+v||!mxUtils.contains(v,c,d)||1500<F&&!mxEvent.isShiftDown(e)?(v=null,null!=B&&(D.parentNode.removeChild(D),B=null)):null!=v&&null!=B&&(l=a.model.isEdge(v.cell)?a.view.getPoint(v):new mxPoint(v.getCenterX(),v.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(c,d,l,D));if(u&&null!=t&&!mxEvent.isAltDown(e)&&null==E){f=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var y=t.absolutePoints;null!=
+L.parentNode&&(l=y[0],f.add(k(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)));null!=K.parentNode&&(y=y[y.length-1],f.add(k(c,d,new mxRectangle(y.x-this.roundDrop.width/2,y.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
+y=this.graph.selectionCellsHandler.getHandler(t.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),f.add(k(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),
+z)),f.add(k(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),f.add(k(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),C)),f.add(k(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;E==x?I=mxConstants.DIRECTION_EAST:
+E==C||E==K?I=mxConstants.DIRECTION_SOUTH:E==A&&(I=mxConstants.DIRECTION_WEST);null!=v&&E==D&&(h=v);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=t&&5E3<=F||t!=h&&(null==f||!mxUtils.contains(f,c,d)||500<F&&null==E&&l))if(u=!1,t=5E3>F&&F>this.dropTargetDelay||a.model.isEdge(g)?h:null,null!=t&&l){f=[L,K,z,x,C,A];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(y=h.absolutePoints,
+null!=y&&(l=y[0],y=y[y.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),L.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",K.style.left=Math.floor(y.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(y.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(L),null==a.model.getTerminal(g,!1)&&a.container.appendChild(K))):(l=mxRectangle.fromRectangle(h),null!=h.shape&&null!=h.shape.boundingBox&&
+(l=mxRectangle.fromRectangle(h.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),y=this.graph.selectionCellsHandler.getHandler(h.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),
+z.style.left=Math.floor(h.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=Math.floor(h.getCenterY()-this.triangleRight.height/2)+"px",C.style.left=z.style.left,C.style.top=Math.floor(l.y+l.height)+"px",A.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=h.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(C)),a.container.appendChild(x),
+a.container.appendChild(A));null!=h&&(w=a.selectionCellsHandler.getHandler(h.cell),null!=w&&null!=w.setHandlesVisible&&w.setHandlesVisible(!1));u=!0}else for(f=[L,K,z,x,C,A],l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);u||null==w||w.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=v&&E==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=E||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,
+b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=null}return g});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[L,K,D,z,x,C,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=w&&w.reset();E=B=v=t=w=null};return q};
+Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
+mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=b.getFreeInsertPoint(),c.drop(b,d,null,a.x,a.y,!0),null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell())))};
+Sidebar.prototype.addClickHandler=function(a,c,d){var b=this.editorUi.editor.graph,f=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(a){e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))});c.mouseUp=mxUtils.bind(this,function(k){if(!mxEvent.isPopupTrigger(k)&&null==this.currentGraph&&null!=e){var g=b.tolerance;Math.abs(e.x-mxEvent.getClientX(k))<=g&&Math.abs(e.y-mxEvent.getClientY(k))<=g&&this.itemClicked(d,c,k,a)}f.apply(c,arguments);e=null;this.currentElt=a})};
+Sidebar.prototype.createVertexTemplateEntry=function(a,c,d,b,f,e,k,g){g=null!=g&&0<g.length?g:f.toLowerCase();return this.addEntry(g,mxUtils.bind(this,function(){return this.createVertexTemplate(a,c,d,b,f,e,k)}))};Sidebar.prototype.createVertexTemplate=function(a,c,d,b,f,e,k,g){a=[new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,c,d,f,e,k,g)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,c,d,b,f,e,k){a=mxUtils.parseXml(this.graph.decompress(a));var g=new mxCodec(a),h=new mxGraphModel;g.decode(a.documentElement,h);a=this.graph.cloneCells(h.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,d,b,f,e,k)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,d,b,f,e,k){return this.createItem(a,b,f,e,c,d,k)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,c,d,b,f,e,k,g){k=null!=k&&0<k.length?k:f.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,d,b,f,e,g)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,c,d,b,f,e,k){a=new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a);a.geometry.setTerminalPoint(new mxPoint(0,d),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,d,f,e,k)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,d,b,f,e){return this.createItem(a,b,f,!0,c,d,e)};
Sidebar.prototype.addPaletteFunctions=function(a,c,d,b){this.addPalette(a,c,d,mxUtils.bind(this,function(a){for(var c=0;c<b.length;c++)a.appendChild(b[c](a))}))};
Sidebar.prototype.addPalette=function(a,c,d,b){c=this.createTitle(c);this.container.appendChild(c);var f=document.createElement("div");f.className="geSidebar";mxClient.IS_POINTER&&(f.style.touchAction="none");d?(b(f),b=null):f.style.display="none";this.addFoldingHandler(c,f,b);d=document.createElement("div");d.appendChild(f);this.container.appendChild(d);null!=a&&(this.palettes[a]=[c,d]);return f};
Sidebar.prototype.addFoldingHandler=function(a,c,d){var b=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==c.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(f){if("none"==c.style.display){if(b)c.style.display="block";else if(b=!0,null!=d){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
"...";window.setTimeout(function(){var b=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;d(c);mxClient.NO_FO=b;c.style.display="block";a.style.cursor="";a.innerHTML=e},0)}else c.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",c.style.display="none";mxEvent.consume(f)}))};
Sidebar.prototype.removePalette=function(a){var c=this.palettes[a];if(null!=c){this.palettes[a]=null;for(a=0;a<c.length;a++)this.container.removeChild(c[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,c,d,b,f,e,h){for(var g=[],k=0;k<f.length;k++)mxUtils.bind(this,function(a,c,e){if(null==e){e=a.lastIndexOf("/");var f=a.lastIndexOf(".");e=a.substring(0<=e?e+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}g.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+d+a+b,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(e)))})(f[k],null!=e?e[k]:null,null!=h?h[f[k]]:null);this.addPaletteFunctions(a,c,
+Sidebar.prototype.addImagePalette=function(a,c,d,b,f,e,k){for(var g=[],h=0;h<f.length;h++)mxUtils.bind(this,function(a,c,e){if(null==e){e=a.lastIndexOf("/");var f=a.lastIndexOf(".");e=a.substring(0<=e?e+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}g.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+d+a+b,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(e)))})(f[h],null!=e?e[h]:null,null!=k?k[f[h]]:null);this.addPaletteFunctions(a,c,
!1,g)};Sidebar.prototype.getTagsForStencil=function(a,c,d){a=a.split(".");for(var b=1;b<a.length;b++)a[b]=a[b].replace(/_/g," ");a.push(c.replace(/_/g," "));null!=d&&a.push(d);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,c,d,b,f,e,h,g,k){h=null!=h?h:1;if(this.addStencilsToIndex){var l=[];if(null!=k)for(var m=0;m<k.length;m++)l.push(k[m]);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(a,c,d,e,k){if(null==f||0>mxUtils.indexOf(f,c)){d=this.getTagsForStencil(a,c);var m=null!=g?g[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(e*h),Math.round(k*h),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=e&&e.call(this,a);if(null!=k)for(var c=0;c<k.length;c++)k[c](a);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(c,d,e,g,k){(null==f||0>mxUtils.indexOf(f,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(g*h),Math.round(k*h),"",d.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,c,d,b,f,e,k,g,h){k=null!=k?k:1;if(this.addStencilsToIndex){var l=[];if(null!=h)for(var m=0;m<h.length;m++)l.push(h[m]);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(a,c,d,e,h){if(null==f||0>mxUtils.indexOf(f,c)){d=this.getTagsForStencil(a,c);var m=null!=g?g[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(e*k),Math.round(h*k),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=e&&e.call(this,a);if(null!=h)for(var c=0;c<h.length;c++)h[c](a);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(c,d,e,g,h){(null==f||0>mxUtils.indexOf(f,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(g*k),Math.round(h*k),"",d.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);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(c){}})();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.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
Graph=function(a,c,d,b,f){mxGraph.call(this,a,c,d,b);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var e=null,h=null,g=null,k=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var d=c.getState();null!=d&&this.model.isEdge(d.cell)&&(e=new mxPoint(c.getGraphX(),c.getGraphY()),l=this.isCellSelected(d.cell),g=d,h=c,null!=
-d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY())?k=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(k=d.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,b){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=e&&null!=g&&null!=h){if(c=g,Math.abs(e.x-b.getGraphX())>d||Math.abs(e.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var f=this.selectionCellsHandler.getHandler(c.cell);if(null!=f&&null!=f.bends&&0<f.bends.length){var m=f.getHandleForEvent(h),p=this.view.getEdgeStyle(c);d=p==mxEdgeStyle.EntityRelation;l||k!=mxEvent.LABEL_HANDLE||(m=k);if(d&&0!=m&&m!=f.bends.length-1&&m!=mxEvent.LABEL_HANDLE)!d||
-null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(m==mxEvent.LABEL_HANDLE||0==m||null!=c.visibleSourceState||m==f.bends.length-1||null!=c.visibleTargetState)d||m==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==p&&null==m||p==mxEdgeStyle.OrthConnector)&&(m=k,null==m&&(m=new mxRectangle(e.x,e.y),m.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(m,d[0].x,d[0].y)?m=0:mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y)?
-m=f.bends.length-1:null!=p&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?m=2:(m=mxUtils.findNearestSegment(c,e.x,e.y),m=null==p?mxEvent.VIRTUAL_HANDLE-m:m+1))),null==m&&(m=mxEvent.VIRTUAL_HANDLE)),f.start(b.getGraphX(),b.getGraphX(),m),k=e=h=g=null,l=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){f=null;d=c.absolutePoints;if(null!=d)if(m=new mxRectangle(b.getGraphX(),
-b.getGraphY()),m.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))f="move";else if(mxUtils.contains(m,d[0].x,d[0].y)||mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y))f="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)p=this.view.getEdgeStyle(c),f="crosshair",p!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(p=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
-p<d.length-1&&0<=p&&(f=0==Math.round(d[p].x-d[p+1].x)?"col-resize":"row-resize"));null!=f&&c.setCursor(f)}}),mouseUp:mxUtils.bind(this,function(a,b){k=e=h=g=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var e=null,k=null,g=null,h=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var d=c.getState();null!=d&&this.model.isEdge(d.cell)&&(e=new mxPoint(c.getGraphX(),c.getGraphY()),l=this.isCellSelected(d.cell),g=d,k=c,null!=
+d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY())?h=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(h=d.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,b){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=e&&null!=g&&null!=k){if(c=g,Math.abs(e.x-b.getGraphX())>d||Math.abs(e.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var f=this.selectionCellsHandler.getHandler(c.cell);if(null!=f&&null!=f.bends&&0<f.bends.length){var m=f.getHandleForEvent(k),n=this.view.getEdgeStyle(c);d=n==mxEdgeStyle.EntityRelation;l||h!=mxEvent.LABEL_HANDLE||(m=h);if(d&&0!=m&&m!=f.bends.length-1&&m!=mxEvent.LABEL_HANDLE)!d||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(m==mxEvent.LABEL_HANDLE||0==m||null!=c.visibleSourceState||m==f.bends.length-1||null!=c.visibleTargetState)d||m==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==n&&null==m||n==mxEdgeStyle.OrthConnector)&&(m=h,null==m&&(m=new mxRectangle(e.x,e.y),m.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(m,d[0].x,d[0].y)?m=0:mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y)?
+m=f.bends.length-1:null!=n&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?m=2:(m=mxUtils.findNearestSegment(c,e.x,e.y),m=null==n?mxEvent.VIRTUAL_HANDLE-m:m+1))),null==m&&(m=mxEvent.VIRTUAL_HANDLE)),f.start(b.getGraphX(),b.getGraphX(),m),h=e=k=g=null,l=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){f=null;d=c.absolutePoints;if(null!=d)if(m=new mxRectangle(b.getGraphX(),
+b.getGraphY()),m.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))f="move";else if(mxUtils.contains(m,d[0].x,d[0].y)||mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y))f="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)n=this.view.getEdgeStyle(c),f="crosshair",n!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(n=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
+n<d.length-1&&0<=n&&(f=0==Math.round(d[n].x-d[n+1].x)?"col-resize":"row-resize"));null!=f&&c.setCursor(f)}}),mouseUp:mxUtils.bind(this,function(a,b){h=e=k=g=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};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,b){return!1};this.alternateEdgeStyle="vertical";null==b&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)b.push(new mxRectangle(((g.x+k)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(k=0;k<g.height;k++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+k)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),h=0;h<g.width;h++)b.push(new mxRectangle(((g.x+h)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(h=0;h<g.height;h++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+h)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,b){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)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);
-"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
-this.getRubberband=function(){return p};var n=(new Date).getTime(),q=0,t=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),q=0):q=(new Date).getTime()-n};var r=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&r.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var u=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);
+this.getRubberband=function(){return n};var p=(new Date).getTime(),q=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),q=0):q=(new Date).getTime()-p};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&t.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var u=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
(u=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=u)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return z.apply(this,
arguments);b=b?a.sourceState.cell:a.getCell();if(null!=b){var c=this.getLinkForCell(b);null!=c&&(this.isPageLink(c)?this.pageLinkClicked(b,c):this.openLink(c))}};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var x=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
-this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,h=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var H=g.getChildAt(e,m),
-y=this.view.getState(H);if(null!=y&&this.isCellVisible(H)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var p=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(y=mxUtils.getBoundingBox(y,p));(g.isEdge(H)||g.isVertex(H))&&y.x>=a&&y.y+y.height<=h&&y.y>=b&&y.x+y.width<=k&&f.push(H);this.getAllCells(a,b,c,d,H,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:C.apply(this,
+this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var H=g.getChildAt(e,m),
+y=this.view.getState(H);if(null!=y&&this.isCellVisible(H)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var n=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(y=mxUtils.getBoundingBox(y,n));(g.isEdge(H)||g.isVertex(H))&&y.x>=a&&y.y+y.height<=k&&y.y>=b&&y.x+y.width<=h&&f.push(H);this.getAllCells(a,b,c,d,H,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:C.apply(this,
arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();A=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);A=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);A=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
function(a,b){return b&&a.view.graph.isCellSelected(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 D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
null);return a}}};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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,c,d){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="'+c+'px" version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
-Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,c=!0,e=null,h=mxUtils.bind(this,function(a){c=!0;e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),g=mxUtils.bind(this,function(a){c=c&&null!=e&&Math.abs(e.x-mxEvent.getClientX(a))<b&&Math.abs(e.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
-e&&e!=d.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(d.node,h,g,k);mxEvent.addListener(d.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,c=!0,e=null,k=mxUtils.bind(this,function(a){c=!0;e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),g=mxUtils.bind(this,function(a){c=c&&null!=e&&Math.abs(e.x-mxEvent.getClientX(a))<b&&Math.abs(e.y-mxEvent.getClientY(a))<b}),h=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
+e&&e!=d.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(d.node,k,g,h);mxEvent.addListener(d.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,c,d){c=c.getAttribute("href");if(null!=c&&!this.isPageLink(c)&&mxEvent.isLeftMouseButton(d)&&!mxEvent.isPopupTrigger(d)||mxEvent.isTouchEvent(d)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),a);mxEvent.consume(d)}};
Graph.prototype.openLink=function(a,c){var d=window;if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var b=a.split("#")[1];window.location.hash=="#"+b&&(window.location.hash="");window.location.hash=b}else d=window.open(a,c);return d};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,c){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",c))};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)};
@@ -2410,29 +2414,29 @@ Graph.prototype.isSplitTarget=function(a,c,d){return!this.model.isEdge(c[0])&&!m
Graph.prototype.isLabelMovable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(c,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,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 b=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),p=a[g+"FullYear"](),n=a[g+"Hours"](),q=a[g+"Minutes"](),t=a[g+"Seconds"](),g=a[g+"Milliseconds"](),r=d?0:a.getTimezoneOffset(),w={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:n%12||12,hh:h(n%12||12),H:n,HH:h(n),M:q,MM:h(q),s:t,ss:h(t),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<r?"-":"+")+h(100*Math.floor(Math.abs(r)/60)+Math.abs(r)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,k=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",h=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),t=d?0:a.getTimezoneOffset(),w={d:h,dd:k(h),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:k(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:k(p%12||12),H:p,HH:k(p),M:q,MM:k(q),s:r,ss:k(r),l:k(g,3),L:k(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<t?"-":"+")+k(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<h%10?0:(10!=h%100-h%10)*h%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)(function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var f=document.createElement("input");f.style.display="inline-block";f.setAttribute("type","checkbox");c.isVisible(b)&&(f.setAttribute("checked","checked"),f.defaultChecked=
!0);d.appendChild(f);var g=b.value||mxResources.get("background")||"Background";d.setAttribute("title",g);mxUtils.write(d,g);a.appendChild(d);mxEvent.addListener(f,"click",function(){null!=f.getAttribute("checked")?f.removeAttribute("checked"):f.setAttribute("checked","checked");c.setVisible(b,f.checked)})})(c.getChildAt(c.root,b));return a};
-Graph.prototype.replacePlaceholders=function(a,c){var d=[];if(null!=c){for(var b=0;match=this.placeholderPattern.exec(c);){var f=match[0];if(2<f.length&&"%label%"!=f&&"%tooltip%"!=f){var e=null;if(match.index>b&&"%"==c.charAt(match.index-1))e=f.substring(1);else{var h=f.substring(1,f.length-1);if(0>h.indexOf("{"))for(var g=a;null==e&&null!=g;)null!=g.value&&"object"==typeof g.value&&(e=g.hasAttribute(h)?null!=g.getAttribute(h)?g.getAttribute(h):"":null),g=this.model.getParent(g);null==e&&(e=this.getGlobalVariable(h))}d.push(c.substring(b,
+Graph.prototype.replacePlaceholders=function(a,c){var d=[];if(null!=c){for(var b=0;match=this.placeholderPattern.exec(c);){var f=match[0];if(2<f.length&&"%label%"!=f&&"%tooltip%"!=f){var e=null;if(match.index>b&&"%"==c.charAt(match.index-1))e=f.substring(1);else{var k=f.substring(1,f.length-1);if(0>k.indexOf("{"))for(var g=a;null==e&&null!=g;)null!=g.value&&"object"==typeof g.value&&(e=g.hasAttribute(k)?null!=g.getAttribute(k)?g.getAttribute(k):"":null),g=this.model.getParent(g);null==e&&(e=this.getGlobalVariable(k))}d.push(c.substring(b,
match.index)+(null!=e?e:f));b=match.index+f.length}}d.push(c.substring(b))}return d.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,c,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=d&&(mxEvent.isTouchEvent(c)?d.update(d.getState(this.view.getState(a[1]))):d.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,c,d,b,f,e){e=e?e:!1;var h=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(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(h.x+=a.geometry.width/2,h.y-=d):c==mxConstants.DIRECTION_SOUTH?(h.x+=a.geometry.width/2,h.y+=a.geometry.height+d):(h.x=c==mxConstants.DIRECTION_WEST?h.x-d:h.x+(a.geometry.width+d),h.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));
-var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(d.cell)&&(l=d.x,k=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(h.x+=a.parent.geometry.x,h.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!f?null:this.getCellAt(l+h.x*g,k+h.y*g);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a),g=this.view.getState(e),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(e=
-null));if(f=!mxEvent.isShiftDown(b)||f)c==mxConstants.DIRECTION_NORTH?h.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?h.y+=a.geometry.height/2:h.x=c==mxConstants.DIRECTION_WEST?h.x-a.geometry.width/2:h.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[];this.model.beginUpdate();try{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=
-m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var p=this.view.getState(l),n=null!=p?p.style:this.getCellStyle(l);if(mxUtils.getValue(n,"part",!1)){var q=this.model.getParent(l);this.model.isVertex(q)&&(l=q)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=h.x-m.width/2,m.y=h.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var t=mxEvent.isControlDown(b)&&f||null==e&&null!=m&&m.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=t&&this.connectionHandler.insertBeforeSource){var r=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=t.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==t.parent&&(r=b.parent.getIndex(b),this.model.add(b.parent,t,r))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(r=a.parent.getIndex(a),this.model.add(a.parent,
-g,r));null!=t&&d.push(t);null==e&&null!=g&&d.push(g);null==g&&null!=t&&t.geometry.setTerminalPoint(h,!1);null!=t&&this.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{this.model.endUpdate()}return d};
+Graph.prototype.connectVertex=function(a,c,d,b,f,e){e=e?e:!1;var k=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(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(k.x+=a.geometry.width/2,k.y-=d):c==mxConstants.DIRECTION_SOUTH?(k.x+=a.geometry.width/2,k.y+=a.geometry.height+d):(k.x=c==mxConstants.DIRECTION_WEST?k.x-d:k.x+(a.geometry.width+d),k.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));
+var g=this.view.scale,h=this.view.translate,l=h.x*g,h=h.y*g;this.model.isVertex(d.cell)&&(l=d.x,h=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(k.x+=a.parent.geometry.x,k.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!f?null:this.getCellAt(l+k.x*g,h+k.y*g);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a),g=this.view.getState(e),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(e=
+null));if(f=!mxEvent.isShiftDown(b)||f)c==mxConstants.DIRECTION_NORTH?k.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?k.y+=a.geometry.height/2:k.x=c==mxConstants.DIRECTION_WEST?k.x-a.geometry.width/2:k.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[];this.model.beginUpdate();try{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=
+m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var n=this.view.getState(l),p=null!=n?n.style:this.getCellStyle(l);if(mxUtils.getValue(p,"part",!1)){var q=this.model.getParent(l);this.model.isVertex(q)&&(l=q)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=k.x-m.width/2,m.y=k.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(b)&&f||null==e&&null!=m&&m.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var t=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=r.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==r.parent&&(t=b.parent.getIndex(b),this.model.add(b.parent,r,t))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(t=a.parent.getIndex(a),this.model.add(a.parent,
+g,t));null!=r&&d.push(r);null==e&&null!=g&&d.push(g);null==g&&null!=r&&r.geometry.setTerminalPoint(k,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return d};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],d,b;for(b in this.model.cells)if(d=this.model.cells[b],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=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&&c.push(d);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),d=a,b=null;null==b&&null!=d;)null!=d.value&&"object"==typeof d.value&&(b=d.hasAttribute(c)?null!=d.getAttribute(c)?d.getAttribute(c):"":null),d=this.model.getParent(d);return b||""}return a.value.getAttribute("label")}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.getCellStyle=function(a){var c=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&&(c[mxConstants.STYLE_HORIZONTAL]=!d.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(a,c,d){if(null!=a&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var b=this.layoutManager.getLayout(this.model.getParent(a));null!=b&&b.constructor==mxStackLayout&&(b.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,c,d,b,f){c=null!=c?c:!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 e=0;e<d.length;e++){var h=this.view.getState(d[e]),g=this.getCellGeometry(d[e]);if(null!=h&&null!=g){var k=Math.round(g.width-h.width/this.view.scale),l=Math.round(g.height-h.height/this.view.scale);if(0!=l||0!=k){var m=this.model.getParent(d[e]),p=this.layoutManager.getLayout(m);
-null==p?null!=f&&this.isMoveCellsEvent(f)&&this.moveSiblings(h,m,k,l):null!=f&&mxEvent.isAltDown(f)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,k,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
-Graph.prototype.moveSiblings=function(a,c,d,b){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<f.length;c++)if(f[c]!=a.cell){var e=this.view.getState(f[c]),h=this.getCellGeometry(f[c]);null!=e&&null!=h&&(h=h.clone(),h.translate(Math.round(d*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(f[c],h))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,c,d,b){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var f=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==f&&!c.resizeLast;){var e=this.getCellGeometry(a),h=this.view.getState(a);null!=h&&null!=e&&(e=e.clone(),c.horizontal?e.width+=d+Math.min(0,h.width/this.view.scale-e.width):e.height+=b+Math.min(0,h.height/this.view.scale-e.height),this.model.setGeometry(a,
+Graph.prototype.foldCells=function(a,c,d,b,f){c=null!=c?c:!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 e=0;e<d.length;e++){var k=this.view.getState(d[e]),g=this.getCellGeometry(d[e]);if(null!=k&&null!=g){var h=Math.round(g.width-k.width/this.view.scale),l=Math.round(g.height-k.height/this.view.scale);if(0!=l||0!=h){var m=this.model.getParent(d[e]),n=this.layoutManager.getLayout(m);
+null==n?null!=f&&this.isMoveCellsEvent(f)&&this.moveSiblings(k,m,h,l):null!=f&&mxEvent.isAltDown(f)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(m,n,h,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
+Graph.prototype.moveSiblings=function(a,c,d,b){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<f.length;c++)if(f[c]!=a.cell){var e=this.view.getState(f[c]),k=this.getCellGeometry(f[c]);null!=e&&null!=k&&(k=k.clone(),k.translate(Math.round(d*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(f[c],k))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,c,d,b){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var f=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==f&&!c.resizeLast;){var e=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=e&&(e=e.clone(),c.horizontal?e.width+=d+Math.min(0,k.width/this.view.scale-e.width):e.height+=b+Math.min(0,k.height/this.view.scale-e.height),this.model.setGeometry(a,
e));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.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,c,d){d=d||this.getDefaultParent();this.isCellLocked(d)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,c,d){d=d||this.getDefaultParent();return this.isCellLocked(d)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=c.collapsible||!this.isContainer(a)&&"1"==c.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
@@ -2475,23 +2479,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activa
this.reset())}else 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};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var k=b[g+1],h=b[g],v=[],u=b[g+2];g<
-b.length-2&&mxUtils.ptSegDistSq(h.x,h.y,u.x,u.y,k.x,k.y)<1*this.scale*this.scale;)k=u,g++,u=b[g+2];for(var c=e(0,h.x,h.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<C.length-1;x++){for(var A=C[x+1],D=C[x],u=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(D.x,D.y,u.x,u.y,A.x,A.y)<1*this.scale*this.scale;)A=u,x++,u=C[x+2];u=mxUtils.intersection(h.x,h.y,k.x,k.y,D.x,D.y,A.x,A.y);if(null!=u&&(Math.abs(u.x-
-D.x)>f||Math.abs(u.y-D.y)>f)&&(Math.abs(u.x-A.x)>f||Math.abs(u.y-A.y)>f)){A=u.x-h.x;D=u.y-h.y;u={distSq:A*A+D*D,x:u.x,y:u.y};for(A=0;A<v.length;A++)if(v[A].distSq>u.distSq){v.splice(A,0,u);u=null;break}null==u||0!=v.length&&v[v.length-1].x===u.x&&v[v.length-1].y===u.y||v.push(u)}}}for(x=0;x<v.length;x++)c=e(1,v[x].x,v[x].y)||c}u=b[b.length-1];c=e(0,u.x,u.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h=b[f+1],k=b[f],v=[],u=b[f+2];f<
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,u.x,u.y,h.x,h.y)<1*this.scale*this.scale;)h=u,f++,u=b[f+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<C.length-1;x++){for(var A=C[x+1],D=C[x],u=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(D.x,D.y,u.x,u.y,A.x,A.y)<1*this.scale*this.scale;)A=u,x++,u=C[x+2];u=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,A.x,A.y);if(null!=u&&(Math.abs(u.x-
+D.x)>g||Math.abs(u.y-D.y)>g)&&(Math.abs(u.x-A.x)>g||Math.abs(u.y-A.y)>g)){A=u.x-k.x;D=u.y-k.y;u={distSq:A*A+D*D,x:u.x,y:u.y};for(A=0;A<v.length;A++)if(v[A].distSq>u.distSq){v.splice(A,0,u);u=null;break}null==u||0!=v.length&&v[v.length-1].x===u.x&&v[v.length-1].y===u.y||v.push(u)}}}for(x=0;x<v.length;x++)c=e(1,v[x].x,v[x].y)||c}u=b[b.length-1];c=e(0,u.x,u.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){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)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var u=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var x=
this.state.routedPoints[z],C=new mxPoint(x.x/this.scale,x.y/this.scale);0==z?C=b[0]:z==this.state.routedPoints.length-1&&(C=b[b.length-1]);var A=!1;if(null!=l&&1==x.type){var D=this.state.routedPoints[z+1],x=D.x/this.scale-C.x,D=D.y/this.scale-C.y,x=x*x+D*D;null==u&&(u=new mxPoint(C.x-l.x,C.y-l.y),m=Math.sqrt(u.x*u.x+u.y*u.y),u.x=u.x*e/m,u.y=u.y*e/m);x>e*e&&0<m&&(x=l.x-C.x,D=l.y-C.y,x=x*x+D*D,x>e*e&&(A=new mxPoint(C.x-u.x,C.y-u.y),x=new mxPoint(C.x+u.x,C.y+u.y),h.push(A),this.addPoints(a,h,c,d,!1,
null,k),h=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(A.x-u.y*h,A.y+u.x*h),a.lineTo(x.x-u.y*h,x.y+u.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(A.x-u.y*h,A.y+u.x*h,x.x-u.y*h,x.y+u.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],A=!0))}else u=null;A||(h.push(C),l=C)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==
a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var f=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),f=mxUtils.getRotatedPoint(f,l,m,k);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);f=this.getPerimeterPoint(b,f,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),f=mxUtils.getRotatedPoint(f,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
-return new mxShape(new mxStencil(d.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+0);f=this.getPerimeterPoint(b,f,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),f=mxUtils.getRotatedPoint(f,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var k=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=k.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
+return new mxShape(new mxStencil(d.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){c=mxStencilRegistry.libraries[d];if(null!=c){if(null==mxStencilRegistry.packages[d]){for(var b=0;b<c.length;b++){var f=c[b];if(".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 e=
-mxUtils.load(f);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",f,h)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
+mxUtils.load(f);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",f,k)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
mxStencilRegistry.getBasenameForStencil=function(a){var c=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var c=a[1],d=2;d<a.length-1;d++)c+="/"+a[d];return c};
-mxStencilRegistry.loadStencilSet=function(a,c,d,b){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var e=!1;if(null==f)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,e=!0,mxStencilRegistry.parseStencilSet(b.documentElement,c,e))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;e=!0}catch(h){null!=window.console&&console.log("error in loadStencilSet:",a,h)}null!=f&&null!=
+mxStencilRegistry.loadStencilSet=function(a,c,d,b){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var e=!1;if(null==f)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,e=!0,mxStencilRegistry.parseStencilSet(b.documentElement,c,e))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;e=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=f&&null!=
f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,c,e)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,c,d){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,c,d),b=b.nextSibling;else{d=null!=d?d:!0;var b=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var f=f.toLowerCase(),e=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+e.toLowerCase(),new mxStencil(b));if(null!=c){var h=b.getAttribute("w"),
-g=b.getAttribute("h"),h=null==h?80:parseInt(h,10),g=null==g?80:parseInt(g,10);c(f,e,a,h,g)}}b=b.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(a,c,d){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,c,d),b=b.nextSibling;else{d=null!=d?d:!0;var b=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var f=f.toLowerCase(),e=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+e.toLowerCase(),new mxStencil(b));if(null!=c){var k=b.getAttribute("w"),
+g=b.getAttribute("h"),k=null==k?80:parseInt(k,10),g=null==g?80:parseInt(g,10);c(f,e,a,k,g)}}b=b.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}mxConstants.HANDLE_FILLCOLOR="#99ccff";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=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var c=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
c.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));
@@ -2505,8 +2509,8 @@ a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stenci
Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget",
"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,
arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,g,!0);b.setTerminal(e,f,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);
-h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),G=this.view.getState(f),p=this.view.getState(g);if(null!=m){var n=null!=G?this.getConnectionConstraint(m,G,!0):null,q=null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,!1,n)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var t=h.width;h.width=h.height;
-h.height=t;b.setGeometry(e,h);var r=this.view.getState(e);if(null!=r){var x=r.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);
+h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),G=this.view.getState(f),n=this.view.getState(g);if(null!=m){var p=null!=G?this.getConnectionConstraint(m,G,!0):null,q=null!=n?this.getConnectionConstraint(m,n,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var r=h.width;h.width=h.height;
+h.height=r;b.setGeometry(e,h);var t=this.view.getState(e);if(null!=t){var x=t.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);
if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=
0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f=this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),
e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||
@@ -2516,7 +2520,7 @@ arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0
for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?
this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,
a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,
-b.x/a.scale-a.translate.x+(0==b.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+(0==b.height?1:2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
+b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-
e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};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.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
@@ -2532,9 +2536,9 @@ m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Mat
this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});
return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,h){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;d=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==d)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument(),m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=m.style?m.style.backgroundColor=a:m.setAttribute("style","background-color:"+
a));null==l.createElementNS?(m.setAttribute("xmlns",mxConstants.NS_SVG),m.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):m.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;m.setAttribute("width",Math.max(1,Math.ceil(d.width*a)+2*c)+"px");m.setAttribute("height",Math.max(1,Math.ceil(d.height*a)+2*c)+"px");m.setAttribute("version","1.1");var y=m;e&&(y=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),y.setAttribute("transform",
-"translate(0.5,0.5)"),m.appendChild(y));l.appendChild(m);l=this.createSvgCanvas(y);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-d.x)/k),Math.floor((c/b-d.y)/k));var p=document.createElement("textarea"),n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,y,G){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",
-Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration",
-"underline");try{return p.innerHTML=f,t.textContent=p.value,t}catch(Ea){return n.apply(this,arguments)}}else return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(d,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var G=h.drawCellState;h.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&G.apply(this,arguments)};
+"translate(0.5,0.5)"),m.appendChild(y));l.appendChild(m);l=this.createSvgCanvas(y);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-d.x)/k),Math.floor((c/b-d.y)/k));var n=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,y,G){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",
+Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration",
+"underline");try{return n.innerHTML=f,r.textContent=n.value,r}catch(Ea){return p.apply(this,arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(d,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var G=h.drawCellState;h.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&G.apply(this,arguments)};
h.drawState(this.getView().getState(this.model.root),l);return m};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;
a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),
e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=
@@ -2544,7 +2548,7 @@ var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arg
this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&
(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}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=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var h=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){h.apply(this,
+"1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,
arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||
mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=
a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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"),
@@ -2554,17 +2558,17 @@ mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxCo
this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"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.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=c;this.resize()};var k=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
+this.switchSelectionState=c;this.resize()};var h=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,
-"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};
+"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",h.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(G){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=
-function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/
+function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/
d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!mxEvent.isControlDown(b.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,b){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(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};
-var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
+var p=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=p.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(b=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/b)+" x "+this.roundLength(this.bounds.height/b)),b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==b&&(b=this.bounds),this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=b.y+b.height+12+"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="")};mxEdgeHandler.prototype.updateHint=function(b,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,f=this.roundLength(c.x/e-d.x),d=this.roundLength(c.y/e-d.y);this.hint.innerHTML=f+", "+d;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(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),c.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
@@ -2584,8 +2588,8 @@ this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)
this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),
this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-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)),b.consume()}};var t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,
-arguments)};var r=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(r=(new Date).getTime(),w=0):w=(new Date).getTime()-r;this.currentTerminalState=c};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<w||(null==this.currentTerminalState||
+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)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,
+arguments)};var t=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),w=0):w=(new Date).getTime()-t;this.currentTerminalState=c};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<w||(null==this.currentTerminalState||
"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&u.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),
e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?
HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,
@@ -2604,8 +2608,8 @@ this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.grap
if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,
b.y+b.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(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(){N.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;
-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.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+6+this.state.view.graph.tolerance)+"px"}};var O=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var F=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.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+6+this.state.view.graph.tolerance)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
+function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var F=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#d7d7d7";
Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));
this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c};
@@ -2621,34 +2625,35 @@ Format.prototype.isAutoSizeState=function(a){return"1"==mxUtils.getValue(a.style
Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,c=a.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.color="rgb(112, 112, 112)";d.style.textAlign="left";d.style.cursor="default";var b=document.createElement("div");b.style.border="1px solid #c0c0c0";b.style.borderWidth="0px 0px 1px 0px";b.style.textAlign="center";b.style.fontWeight="bold";b.style.overflow="hidden";b.style.display=mxClient.IS_QUIRKS?"inline":
"inline-block";b.style.paddingTop="8px";b.style.height=mxClient.IS_QUIRKS?"34px":"25px";b.style.width="100%";this.container.appendChild(d);if(c.isSelectionEmpty())mxUtils.write(b,mxResources.get("diagram")),this.showCloseButton&&(c=document.createElement("img"),c.setAttribute("border","0"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("hide")),c.style.position="absolute",c.style.display="block",c.style.right="0px",c.style.top="8px",c.style.cursor="pointer",
-c.style.marginTop="1px",c.style.marginRight="17px",c.style.border="1px solid transparent",c.style.padding="1px",c.style.opacity=.5,b.appendChild(c),mxEvent.addListener(c,"click",function(){a.actions.get("formatPanel").funct()})),d.appendChild(b),this.panels.push(new DiagramFormatPanel(this,a,d));else if(c.isEditing())mxUtils.write(b,mxResources.get("text")),d.appendChild(b),this.panels.push(new TextFormatPanel(this,a,d));else{var f=this.getSelectionState().containsLabel,e=null,h=null,c=mxUtils.bind(this,
-function(a,b,c){var d=mxUtils.bind(this,function(d){e!=a&&(f?this.labelIndex=c:this.currentIndex=c,null!=e&&(e.style.backgroundColor=this.inactiveTabBackgroundColor,e.style.borderBottomWidth="1px"),e=a,e.style.backgroundColor="",e.style.borderBottomWidth="0px",h!=b&&(null!=h&&(h.style.display="none"),h=b,h.style.display=""))});mxEvent.addListener(a,"click",d);c==(f?this.labelIndex:this.currentIndex)&&d()}),g=0;b.style.backgroundColor=this.inactiveTabBackgroundColor;b.style.borderLeftWidth="1px";b.style.width=
-f?"50%":"33.3%";b.style.width=f?"50%":"33.3%";var k=b.cloneNode(!1),l=k.cloneNode(!1);k.style.backgroundColor=this.inactiveTabBackgroundColor;l.style.backgroundColor=this.inactiveTabBackgroundColor;if(f)k.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,g++)}mxUtils.write(k,mxResources.get("text"));
-d.appendChild(k);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
+c.style.marginTop="1px",c.style.marginRight="17px",c.style.border="1px solid transparent",c.style.padding="1px",c.style.opacity=.5,b.appendChild(c),mxEvent.addListener(c,"click",function(){a.actions.get("formatPanel").funct()})),d.appendChild(b),this.panels.push(new DiagramFormatPanel(this,a,d));else if(c.isEditing())mxUtils.write(b,mxResources.get("text")),d.appendChild(b),this.panels.push(new TextFormatPanel(this,a,d));else{var f=this.getSelectionState().containsLabel,e=null,k=null,c=mxUtils.bind(this,
+function(a,b,c){var d=mxUtils.bind(this,function(d){e!=a&&(f?this.labelIndex=c:this.currentIndex=c,null!=e&&(e.style.backgroundColor=this.inactiveTabBackgroundColor,e.style.borderBottomWidth="1px"),e=a,e.style.backgroundColor="",e.style.borderBottomWidth="0px",k!=b&&(null!=k&&(k.style.display="none"),k=b,k.style.display=""))});mxEvent.addListener(a,"click",d);c==(f?this.labelIndex:this.currentIndex)&&d()}),g=0;b.style.backgroundColor=this.inactiveTabBackgroundColor;b.style.borderLeftWidth="1px";b.style.width=
+f?"50%":"33.3%";b.style.width=f?"50%":"33.3%";var h=b.cloneNode(!1),l=h.cloneNode(!1);h.style.backgroundColor=this.inactiveTabBackgroundColor;l.style.backgroundColor=this.inactiveTabBackgroundColor;if(f)h.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,g++)}mxUtils.write(h,mxResources.get("text"));
+d.appendChild(h);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(h,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var f=a.view.getState(c[b]);if(null!=f&&(f=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null),null!=f))if(null==d)d=f;else if(d!=f)return null}return d};
-BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,h,g){e=null!=e?e:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,p=!1,n=mxUtils.bind(this,function(n){var q=g?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(f,Math.max(b,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&h)p||(p=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(q),a.value=q+e,
-p=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{l.setCellStyles(c,q,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=q+"px";a.removeAttribute("size")}),k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}a.value=q+e;mxEvent.consume(n)});h&&l.cellEditor.isContentEditing()&&
-(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",n);mxEvent.addListener(a,"blur",n);return n};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.style.padding="12px 0px 12px 18px";a.style.borderBottom="1px solid #c0c0c0";return a};
+BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,k,g){e=null!=e?e:"";g=null!=g?g:!1;var h=this.editorUi,l=h.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var r=g?parseFloat(a.value):parseInt(a.value);isNaN(r)||c!=mxConstants.STYLE_ROTATION||(r=mxUtils.mod(Math.round(100*r),36E3)/100);r=Math.min(f,Math.max(b,isNaN(r)?d:r));if(l.cellEditor.isContentEditing()&&k)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),k(r),a.value=r+e,
+n=!1);else if(r!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{l.setCellStyles(c,r,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=r+"px";a.removeAttribute("size")}),h.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[r],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}a.value=r+e;mxEvent.consume(p)});k&&l.cellEditor.isContentEditing()&&
+(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.style.padding="12px 0px 12px 18px";a.style.borderBottom="1px solid #c0c0c0";return a};
BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
-BaseFormatPanel.prototype.createStepper=function(a,c,d,b,f,e){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className=
-"geBtnUp";h.appendChild(g);var k=g.cloneNode(!1);k.style.border="none";k.style.height=b+"px";k.className="geBtnDown";h.appendChild(k);mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"2");var f=parseInt(a.value);isNaN(f)||(a.value=f-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(g,"click",function(b){""==a.value&&(a.value=e||"0");var f=parseInt(a.value);isNaN(f)||(a.value=f+d,null!=c&&c(b));mxEvent.consume(b)});if(f){var l=null;mxEvent.addGestureListeners(h,function(a){if(mxClient.IS_QUIRKS||
-8==document.documentMode)l=document.selection.createRange();mxEvent.consume(a)},null,function(a){if(null!=l){try{l.select()}catch(p){}l=null;mxEvent.consume(a)}})}return h};
-BaseFormatPanel.prototype.createOption=function(a,c,d,b){var f=document.createElement("div");f.style.padding="6px 0px 1px 0px";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.width="200px";f.style.height=mxClient.IS_QUIRKS?"27px":"18px";var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.margin="0px 6px 0px 0px";f.appendChild(e);var h=document.createElement("span");mxUtils.write(h,a);f.appendChild(h);var g=!1,k=c(),l=function(a){g||(g=!0,a?(e.setAttribute("checked",
-"checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),k!=a&&(k=a,c()!=k&&d(k)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)e.checked=!e.checked;l(e.checked)}});l(k);null!=b&&(b.install(l),this.listeners.push(b));return f};
-BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,f,e,h,g){b=null!=b?"null"==b?null:b:"1";f=null!=f?"null"==f?null:f:"0";var k=this.editorUi,l=k.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=f:null},function(a){g&&l.stopEditing();if(null!=h)h.funct();else{l.getModel().beginUpdate();try{a=a?b:f,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),k.fireEvent(new mxEventObject("styleChanged",
+BaseFormatPanel.prototype.createStepper=function(a,c,d,b,f,e){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var k=document.createElement("div");mxUtils.setPrefixedStyle(k.style,"borderRadius","3px");k.style.border="1px solid rgb(192, 192, 192)";k.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className=
+"geBtnUp";k.appendChild(g);var h=g.cloneNode(!1);h.style.border="none";h.style.height=b+"px";h.className="geBtnDown";k.appendChild(h);mxEvent.addListener(h,"click",function(b){""==a.value&&(a.value=e||"2");var f=parseInt(a.value);isNaN(f)||(a.value=f-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(g,"click",function(b){""==a.value&&(a.value=e||"0");var f=parseInt(a.value);isNaN(f)||(a.value=f+d,null!=c&&c(b));mxEvent.consume(b)});if(f){var l=null;mxEvent.addGestureListeners(k,function(a){if(mxClient.IS_QUIRKS||
+8==document.documentMode)l=document.selection.createRange();mxEvent.consume(a)},null,function(a){if(null!=l){try{l.select()}catch(n){}l=null;mxEvent.consume(a)}})}return k};
+BaseFormatPanel.prototype.createOption=function(a,c,d,b){var f=document.createElement("div");f.style.padding="6px 0px 1px 0px";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.width="200px";f.style.height=mxClient.IS_QUIRKS?"27px":"18px";var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.margin="0px 6px 0px 0px";f.appendChild(e);var k=document.createElement("span");mxUtils.write(k,a);f.appendChild(k);var g=!1,h=c(),l=function(a){g||(g=!0,a?(e.setAttribute("checked",
+"checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),h!=a&&(h=a,c()!=h&&d(h)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==k)e.checked=!e.checked;l(e.checked)}});l(h);null!=b&&(b.install(l),this.listeners.push(b));return f};
+BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,f,e,k,g){b=null!=b?"null"==b?null:b:"1";f=null!=f?"null"==f?null:f:"0";var h=this.editorUi,l=h.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=f:null},function(a){g&&l.stopEditing();if(null!=k)k.funct();else{l.getModel().beginUpdate();try{a=a?b:f,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),h.fireEvent(new mxEventObject("styleChanged",
"keys",[c],"values",[a],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}},{install:function(a){this.listener=function(){var b=l.view.getState(l.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,d)!=f)};l.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){l.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||g.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=!1,p=c(),n=null,q=function(a,f,g){if(!m){m=
-!0;n.innerHTML='<div style="width:'+(mxClient.IS_QUIRKS?"30":"36")+"px;height:12px;margin:3px;border:1px solid black;background-color:"+(null!=a&&a!=mxConstants.NONE?a:b)+';"></div>';if(mxClient.IS_QUIRKS||8==document.documentMode)n.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1);n.style.display=k.checked||h?"":"none";null!=e&&e(a);f||(p=a,(g||h||c()!=p)&&
-d(p));m=!1}},n=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(p,function(a){q(a,null,!0)});mxEvent.consume(a)}));n.style.position="absolute";n.style.marginTop="-4px";n.style.right=mxClient.IS_QUIRKS?"0px":"20px";n.style.height="22px";n.className="geColorBtn";n.style.display=k.checked||h?"":"none";g.appendChild(n);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked=!k.checked),k.checked||null==p||p==mxConstants.NONE||
-b==mxConstants.NONE||(b=p),q(k.checked?b:mxConstants.NONE)});q(p,!0);null!=f&&(f.install(q),this.listeners.push(f));return g};
-BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,f){var e=this.editorUi,h=e.editor.graph;return this.createColorOption(a,function(){var a=h.view.getState(h.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){h.getModel().beginUpdate();try{null!=f&&f(a),h.setCellStyles(c,a,h.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}},d||mxConstants.NONE,
-{install:function(a){this.listener=function(){var b=h.view.getState(h.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},b)};
+BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,k){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.style.margin="0px 6px 0px 0px";k||g.appendChild(h);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=!1,n=c(),p=null,q=function(a,f,g){if(!m){m=
+!0;p.innerHTML='<div style="width:'+(mxClient.IS_QUIRKS?"30":"36")+"px;height:12px;margin:3px;border:1px solid black;background-color:"+(null!=a&&a!=mxConstants.NONE?a:b)+';"></div>';if(mxClient.IS_QUIRKS||8==document.documentMode)p.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1);p.style.display=h.checked||k?"":"none";null!=e&&e(a);f||(n=a,(g||k||c()!=n)&&
+d(n));m=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(n,function(a){q(a,null,!0)});mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=h.checked||k?"":"none";g.appendChild(p);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==h||"INPUT"!=a.nodeName)a!=h&&(h.checked=!h.checked),h.checked||null==n||n==mxConstants.NONE||
+b==mxConstants.NONE||(b=n),q(h.checked?b:mxConstants.NONE)});q(n,!0);null!=f&&(f.install(q),this.listeners.push(f));return g};
+BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,f){var e=this.editorUi,k=e.editor.graph;return this.createColorOption(a,function(){var a=k.view.getState(k.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){k.getModel().beginUpdate();try{null!=f&&f(a),k.setCellStyles(c,a,k.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}},d||mxConstants.NONE,
+{install:function(a){this.listener=function(){var b=k.view.getState(k.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};k.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){k.getModel().removeListener(this.listener)}},b)};
BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.padding="6px";d.style.paddingRight="4px";var b=10-c;2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px";d.style.height=c+"px";d.style.borderLeft="1px solid #a0a0a0";d.innerHTML='<img border="0" src="'+(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUeNpidHB2ZyAGsACxDRBPIKCuA6TwCBB/h2rABu4A8SYmKCcXiP/iUFgAxL9gCi8A8SwsirZCMQMTkmANEH9E4v+CmsaArvAdyNFI/FlQ92EoBIE+qCRIUz168DBgsU4OqhinQpgHMABAgAEALY4XLIsJ20oAAAAASUVORK5CYII=":
IMAGE_PATH+"/dropdown.png")+'" style="margin-bottom:4px;">';mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,
-"borderRadius","3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,f,e,h,g){h=null!=h?h:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,f,e,null,g);b.style.marginTop=h-2+"px";b.style.right=d+"px";a.appendChild(b);return c};
-BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,f){function e(a){if(null!=b)b(k);else{var d=parseInt(k.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),e=h.view.getState(h.getSelectionCell());null!=e&&d!=mxUtils.getValue(e.style,c,100)&&(100==d&&(d=null),h.setCellStyles(c,d,h.getSelectionCells()));k.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)}d=null!=d?d:44;var h=this.editorUi.editor.graph,g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";mxUtils.write(g,
-a);g.style.fontWeight="bold";var k=this.addUnitInput(g,"%",20,d,e,10,-15,null!=b);if(null!=c){var l=mxUtils.bind(this,function(a,b,d){if(d||k!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),k.value=isNaN(a)?"":a+" %"});mxEvent.addListener(k,"keydown",function(a){13==a.keyCode?(h.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(l(null,null,!0),h.container.focus(),mxEvent.consume(a))});h.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){h.getModel().removeListener(l)}});
-l()}mxEvent.addListener(k,"blur",e);mxEvent.addListener(k,"change",e);null!=f&&f(k);return g};BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var f=document.createElement("div");mxUtils.write(f,c);f.style.position="absolute";f.style.right=d+"px";f.style.width=b+"px";f.style.marginTop="6px";f.style.textAlign="center";a.appendChild(f)};
+"borderRadius","3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,f,e,k,g){k=null!=k?k:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,f,e,null,g);b.style.marginTop=k-2+"px";b.style.right=d+"px";a.appendChild(b);return c};
+BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,f){d=null!=d?d:44;var e=this.editorUi.editor.graph,k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";mxUtils.write(k,a);k.style.fontWeight="bold";a=mxUtils.bind(this,function(a){if(null!=b)b(g);else{var d=parseInt(g.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),f=e.view.getState(e.getSelectionCell());null!=f&&d!=mxUtils.getValue(f.style,c,100)&&(100==d&&(d=null),e.setCellStyles(c,d,e.getSelectionCells()),
+this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[d],"cells",e.getSelectionCells())));g.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)});var g=this.addUnitInput(k,"%",20,d,a,10,-15,null!=b);if(null!=c){var h=mxUtils.bind(this,function(a,b,d){if(d||g!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),g.value=isNaN(a)?"":a+" %"});mxEvent.addListener(g,"keydown",function(a){13==a.keyCode?(e.container.focus(),mxEvent.consume(a)):
+27==a.keyCode&&(h(null,null,!0),e.container.focus(),mxEvent.consume(a))});e.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){e.getModel().removeListener(h)}});h()}mxEvent.addListener(g,"blur",a);mxEvent.addListener(g,"change",a);null!=f&&f(g);return k};
+BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var f=document.createElement("div");mxUtils.write(f,c);f.style.position="absolute";f.style.right=d+"px";f.style.width=b+"px";f.style.marginTop="6px";f.style.textAlign="center";a.appendChild(f)};
BaseFormatPanel.prototype.addKeyHandler=function(a,c){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(a){13==a.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(null!=c&&c(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(a))}))};
BaseFormatPanel.prototype.styleButtons=function(a){for(var c=0;c<a.length;c++)mxUtils.setPrefixedStyle(a[c].style,"borderRadius","3px"),mxUtils.setOpacity(a[c],100),a[c].style.border="1px solid #a0a0a0",a[c].style.padding="4px",a[c].style.paddingTop="3px",a[c].style.paddingRight="1px",a[c].style.margin="1px",a[c].style.width="24px",a[c].style.height="20px",a[c].className+=" geColorBtn"};
BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
@@ -2662,78 +2667,78 @@ function(a){c.actions.get("removeFromGroup").funct()}),e.setAttribute("title",mx
e.style.marginBottom="2px",a.appendChild(e),f++);1==d.getSelectionCount()&&(0<f&&mxUtils.br(a),e=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()})),e.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")"),e.style.width="100px",e.style.marginBottom="2px",a.appendChild(e),f++,e=mxUtils.button(mxResources.get("editLink"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editLink").funct()})),
e.setAttribute("title",mxResources.get("editLink")),e.style.width="100px",e.style.marginLeft="2px",e.style.marginBottom="2px",a.appendChild(e),f++);0==f&&(a.style.display="none");return a};
ArrangePanel.prototype.addAlign=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.paddingLeft="0px";d.style.borderWidth="0px";d.className="geToolbarContainer";mxClient.IS_QUIRKS&&(a.style.height="60px");var b=this.editorUi.toolbar.addButton("geSprite-alignleft",mxResources.get("left"),function(){c.alignCells(mxConstants.ALIGN_LEFT)},
-d),f=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){c.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){c.alignCells(mxConstants.ALIGN_RIGHT)},d),h=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){c.alignCells(mxConstants.ALIGN_TOP)},d),g=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){c.alignCells(mxConstants.ALIGN_MIDDLE)},
-d),k=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){c.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,f,e,h,g,k]);e.style.marginRight="6px";a.appendChild(d);return a};
+d),f=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){c.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){c.alignCells(mxConstants.ALIGN_RIGHT)},d),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){c.alignCells(mxConstants.ALIGN_TOP)},d),g=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){c.alignCells(mxConstants.ALIGN_MIDDLE)},
+d),h=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){c.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,f,e,k,g,h]);e.style.marginRight="6px";a.appendChild(d);return a};
ArrangePanel.prototype.addFlip=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="100px";d.style.marginRight=
"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="100px";a.appendChild(d);return a};
ArrangePanel.prototype.addDistribute=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var d=mxUtils.button(mxResources.get("horizontal"),function(a){c.distributeCells(!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){c.distributeCells(!1)});d.setAttribute("title",
mxResources.get("vertical"));d.style.width="100px";a.appendChild(d);return a};
-ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingBottom="8px";var f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";var e=null,h=null,g=null;0==b.edges.length?(mxUtils.write(f,mxResources.get("angle")),a.appendChild(f),e=this.addUnitInput(a,"°",20,44,function(){h.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop="10px"):a.style.paddingTop=
-"8px";b.containsLabel||(f=mxResources.get("reverse"),0<b.vertices.length&&0<b.edges.length?f=mxResources.get("turn")+" / "+f:0<b.vertices.length&&(f=mxResources.get("turn")),g=mxUtils.button(f,function(a){c.actions.get("turn").funct()}),g.setAttribute("title",f+" ("+this.editorUi.actions.get("turn").shortcut+")"),g.style.width="202px",a.appendChild(g),null!=e&&(g.style.marginTop="8px"));if(null!=e){var k=mxUtils.bind(this,function(a,c,d){if(d||document.activeElement!=e)b=this.format.getSelectionState(),
-a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(a)?"":a+"°"}),h=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,k);d.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){d.getModel().removeListener(k)}});k()}return a};
-ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),f=this.createPanel();f.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));f.appendChild(e);var h,g,k,l,m=this.addUnitInput(f,"pt",84,44,function(){h.apply(this,arguments)}),p=this.addUnitInput(f,"pt",20,44,function(){g.apply(this,arguments)}),
-n=document.createElement("div");n.className="geSprite geSprite-fit";n.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");n.style.position="relative";n.style.cursor="pointer";n.style.marginTop="-3px";n.style.border="0px";n.style.left="52px";mxUtils.setOpacity(n,50);mxEvent.addListener(n,"mouseenter",function(){mxUtils.setOpacity(n,100)});mxEvent.addListener(n,"mouseleave",function(){mxUtils.setOpacity(n,50)});mxEvent.addListener(n,"click",function(){c.actions.get("autosize").funct()});
-f.appendChild(n);this.addLabel(f,mxResources.get("width"),84);this.addLabel(f,mxResources.get("height"),20);mxUtils.br(f);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";e.appendChild(q);f.appendChild(e);var t=q.getElementsByTagName("input")[0];this.addKeyHandler(m,u);this.addKeyHandler(p,
-u);h=this.addGeometryHandler(m,function(a,b){0<a.width&&(b=Math.max(1,b),t.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});g=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,b),t.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(f);var r=this.createPanel();r.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,
-mxResources.get("position"));r.appendChild(e);var w=this.addUnitInput(r,"pt",84,44,function(){k.apply(this,arguments)}),v=this.addUnitInput(r,"pt",20,44,function(){l.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var u=mxUtils.bind(this,function(a,c,e){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)f.style.display="none";else{f.style.display=
-"";if(e||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(e||document.activeElement!=p)p.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==d.getSelectionCount()&&null!=b.x&&null!=b.y){r.style.display="";if(e||document.activeElement!=w)w.value=b.x+(""==b.x?"":" pt");if(e||document.activeElement!=v)v.value=b.y+(""==b.y?"":" pt")}else r.style.display="none"});this.addKeyHandler(w,u);this.addKeyHandler(v,u);d.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){d.getModel().removeListener(u)}});
-u();k=this.addGeometryHandler(w,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.y=b:a.y=b});a.appendChild(r)};
-ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isVertex(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}else isNaN(e)&&(a.value=f+" pt")}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
+ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingBottom="8px";var f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";var e=null,k=null,g=null;0==b.edges.length?(mxUtils.write(f,mxResources.get("angle")),a.appendChild(f),e=this.addUnitInput(a,"°",20,44,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop="10px"):a.style.paddingTop=
+"8px";b.containsLabel||(f=mxResources.get("reverse"),0<b.vertices.length&&0<b.edges.length?f=mxResources.get("turn")+" / "+f:0<b.vertices.length&&(f=mxResources.get("turn")),g=mxUtils.button(f,function(a){c.actions.get("turn").funct()}),g.setAttribute("title",f+" ("+this.editorUi.actions.get("turn").shortcut+")"),g.style.width="202px",a.appendChild(g),null!=e&&(g.style.marginTop="8px"));if(null!=e){var h=mxUtils.bind(this,function(a,c,d){if(d||document.activeElement!=e)b=this.format.getSelectionState(),
+a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(a)?"":a+"°"}),k=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,h);d.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){d.getModel().removeListener(h)}});h()}return a};
+ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),f=this.createPanel();f.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));f.appendChild(e);var k,g,h,l,m=this.addUnitInput(f,"pt",84,44,function(){k.apply(this,arguments)}),n=this.addUnitInput(f,"pt",20,44,function(){g.apply(this,arguments)}),
+p=document.createElement("div");p.className="geSprite geSprite-fit";p.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");p.style.position="relative";p.style.cursor="pointer";p.style.marginTop="-3px";p.style.border="0px";p.style.left="52px";mxUtils.setOpacity(p,50);mxEvent.addListener(p,"mouseenter",function(){mxUtils.setOpacity(p,100)});mxEvent.addListener(p,"mouseleave",function(){mxUtils.setOpacity(p,50)});mxEvent.addListener(p,"click",function(){c.actions.get("autosize").funct()});
+f.appendChild(p);this.addLabel(f,mxResources.get("width"),84);this.addLabel(f,mxResources.get("height"),20);mxUtils.br(f);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";e.appendChild(q);f.appendChild(e);var r=q.getElementsByTagName("input")[0];this.addKeyHandler(m,u);this.addKeyHandler(n,
+u);k=this.addGeometryHandler(m,function(a,b){0<a.width&&(b=Math.max(1,b),r.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});g=this.addGeometryHandler(n,function(a,b){0<a.height&&(b=Math.max(1,b),r.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(f);var t=this.createPanel();t.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,
+mxResources.get("position"));t.appendChild(e);var w=this.addUnitInput(t,"pt",84,44,function(){h.apply(this,arguments)}),v=this.addUnitInput(t,"pt",20,44,function(){l.apply(this,arguments)});mxUtils.br(t);this.addLabel(t,mxResources.get("left"),84);this.addLabel(t,mxResources.get("top"),20);var u=mxUtils.bind(this,function(a,c,e){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)f.style.display="none";else{f.style.display=
+"";if(e||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(e||document.activeElement!=n)n.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==d.getSelectionCount()&&null!=b.x&&null!=b.y){t.style.display="";if(e||document.activeElement!=w)w.value=b.x+(""==b.x?"":" pt");if(e||document.activeElement!=v)v.value=b.y+(""==b.y?"":" pt")}else t.style.display="none"});this.addKeyHandler(w,u);this.addKeyHandler(v,u);d.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){d.getModel().removeListener(u)}});
+u();h=this.addGeometryHandler(w,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.y=b:a.y=b});a.appendChild(t)};
+ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),h=0;h<g.length;h++)if(b.getModel().isVertex(g[h])){var l=b.getCellGeometry(g[h]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[h],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}else isNaN(e)&&(a.value=f+" pt")}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isEdge(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),h=0;h<g.length;h++)if(b.getModel().isEdge(g[h])){var l=b.getCellGeometry(g[h]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[h],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
-ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(p.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));p.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel(),
-h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));e.appendChild(h);var g,k,l,m,p=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(p,u);mxEvent.addListener(p,"blur",c);mxEvent.addListener(p,"change",c);a.appendChild(e);var n=this.createPanel();n.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";
-h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"Start");n.appendChild(h);var q=this.addUnitInput(n,"pt",84,44,function(){l.apply(this,arguments)}),t=this.addUnitInput(n,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),84);this.addLabel(n,mxResources.get("top"),20);a.appendChild(n);this.addKeyHandler(q,u);this.addKeyHandler(t,u);var r=this.createPanel();r.style.paddingBottom="30px";h=document.createElement("div");
-h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");r.appendChild(h);var w=this.addUnitInput(r,"pt",84,44,function(){g.apply(this,arguments)}),v=this.addUnitInput(r,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);a.appendChild(r);this.addKeyHandler(w,u);this.addKeyHandler(v,u);var u=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();
-a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=p)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),p.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=d.sourcePoint.x,t.value=d.sourcePoint.y):n.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
-!1)?(w.value=d.targetPoint.x,v.value=d.targetPoint.y):r.style.display="none"):(n.style.display="none",r.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(t,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){b.getModel().removeListener(u)}});
+ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(n.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));n.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel(),
+k=document.createElement("div");k.style.position="absolute";k.style.width="70px";k.style.marginTop="0px";k.style.fontWeight="bold";mxUtils.write(k,mxResources.get("width"));e.appendChild(k);var g,h,l,m,n=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(n,u);mxEvent.addListener(n,"blur",c);mxEvent.addListener(n,"change",c);a.appendChild(e);var p=this.createPanel();p.style.paddingBottom="30px";k=document.createElement("div");k.style.position="absolute";
+k.style.width="70px";k.style.marginTop="0px";k.style.fontWeight="bold";mxUtils.write(k,"Start");p.appendChild(k);var q=this.addUnitInput(p,"pt",84,44,function(){l.apply(this,arguments)}),r=this.addUnitInput(p,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),84);this.addLabel(p,mxResources.get("top"),20);a.appendChild(p);this.addKeyHandler(q,u);this.addKeyHandler(r,u);var t=this.createPanel();t.style.paddingBottom="30px";k=document.createElement("div");
+k.style.position="absolute";k.style.width="70px";k.style.marginTop="0px";k.style.fontWeight="bold";mxUtils.write(k,"End");t.appendChild(k);var w=this.addUnitInput(t,"pt",84,44,function(){g.apply(this,arguments)}),v=this.addUnitInput(t,"pt",20,44,function(){h.apply(this,arguments)});mxUtils.br(t);this.addLabel(t,mxResources.get("left"),84);this.addLabel(t,mxResources.get("top"),20);a.appendChild(t);this.addKeyHandler(w,u);this.addKeyHandler(v,u);var u=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();
+a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=n)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=d.sourcePoint.x,r.value=d.sourcePoint.y):p.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
+!1)?(w.value=d.targetPoint.x,v.value=d.targetPoint.y):t.style.display="none"):(p.style.display="none",t.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(r,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.x=b});h=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){b.getModel().removeListener(u)}});
u()};TextFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#c5ecff', EndColorStr='#87d4fb', GradientType=0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px";e.style.paddingBottom=
-"6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var h=e.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow="hidden";
-g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";var k=g.getElementsByTagName("div")[0];k.style.cssFloat="right";a.appendChild(h);mxClient.IS_FF&&(g.getElementsByTagName("div")[0].style.marginTop="-18px")}a.appendChild(e);h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e);l.style.color=
-"rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");k=e.cloneNode(!1);k.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+
-" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var p=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([p]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var n=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
-b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),r=this.editorUi.toolbar.addButton("geSprite-right",
-mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([q,t,r]);if(b.cellEditor.isContentEditing()){var w=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([w])}var v=this.editorUi.toolbar.addButton("geSprite-top",
-mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),u=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
-g);this.styleButtons([v,u,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,C,A,D,B,L,K;b.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",z.style.display="none",p.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([A,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",
-!1,null)},g),C=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),A.style.marginRight="9px",n=g.cloneNode(!1),n.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),
-function(){document.execCommand("insertunorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},n)],this.styleButtons(g),g[g.length-1].style.marginLeft=
-"9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),n.style.height="40"),a.appendChild(n)):(m[2].style.marginRight="9px",r.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft="0px";g.style.paddingTop="8px";g.style.paddingBottom="4px";g.style.fontWeight="normal";mxUtils.write(g,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var w="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),
+"6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var k=e.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow="hidden";
+g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";var h=g.getElementsByTagName("div")[0];h.style.cssFloat="right";a.appendChild(k);mxClient.IS_FF&&(g.getElementsByTagName("div")[0].style.marginTop="-18px")}a.appendChild(e);k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e);l.style.color=
+"rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");h=e.cloneNode(!1);h.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],h,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+
+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var n=this.editorUi.toolbar.addItems(["vertical"],h,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(h);this.styleButtons(m);this.styleButtons([n]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
+b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),r=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),t=this.editorUi.toolbar.addButton("geSprite-right",
+mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([q,r,t]);if(b.cellEditor.isContentEditing()){var w=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},h);this.styleButtons([w])}var v=this.editorUi.toolbar.addButton("geSprite-top",
+mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),u=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
+g);this.styleButtons([v,u,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,C,A,D,B,L,K;b.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",z.style.display="none",n.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([A,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",
+!1,null)},g),C=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),A.style.marginRight="9px",p=g.cloneNode(!1),p.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),
+function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(g),g[g.length-1].style.marginLeft=
+"9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(m[2].style.marginRight="9px",t.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft="0px";g.style.paddingTop="8px";g.style.paddingBottom="4px";g.style.fontWeight="normal";mxUtils.write(g,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var w="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),
E={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<w.length;n++){var J=document.createElement("option");
-J.setAttribute("value",w[n]);mxUtils.write(J,mxResources.get(w[n]));I.appendChild(J)}g.appendChild(I);w=e.cloneNode(!1);w.style.marginLeft="0px";w.style.paddingTop="4px";w.style.paddingBottom="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,
-rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<J.length;n++){var O=document.createElement("option");O.setAttribute("value",J[n]);mxUtils.write(O,mxResources.get(J[n]));N.appendChild(O)}w.appendChild(N);b.isEditing()||(a.appendChild(g),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=E[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),
+mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<w.length;p++){var J=document.createElement("option");
+J.setAttribute("value",w[p]);mxUtils.write(J,mxResources.get(w[p]));I.appendChild(J)}g.appendChild(I);w=e.cloneNode(!1);w.style.marginLeft="0px";w.style.paddingTop="4px";w.style.paddingBottom="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,
+rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var P=document.createElement("option");P.setAttribute("value",J[p]);mxUtils.write(P,mxResources.get(J[p]));N.appendChild(P)}w.appendChild(N);b.isEditing()||(a.appendChild(g),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=E[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),
b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(w),mxEvent.addListener(N,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[N.value],b.getSelectionCells());mxEvent.consume(a)}));var F=document.createElement("input");F.style.textAlign="right";F.style.marginTop="4px";mxClient.IS_QUIRKS||(F.style.position="absolute",
-F.style.right="32px");F.style.width="46px";F.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(F);var G=null,g=this.installInputHandler(F,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(!window.getSelection||mxClient.IS_IE||mxClient.IS_IE11)for(G=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++){if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=G+"px";
+F.style.right="32px");F.style.width="46px";F.style.height=mxClient.IS_QUIRKS?"21px":"17px";h.appendChild(F);var G=null,g=this.installInputHandler(F,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(!window.getSelection||mxClient.IS_IE||mxClient.IS_IE11)for(G=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++){if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=G+"px";
window.setTimeout(function(){F.value=G+" pt";G=null},0);break}}else{var c=function(c,e){c!=b.cellEditor.textarea&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==
-mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(var e=0;e<f.length;e++)c(f[e])}F.value=a+" pt"}},!0),g=this.createStepper(F,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=F.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat="right";var H=
+mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(var e=0;e<f.length;e++)c(f[e])}F.value=a+" pt"}},!0),g=this.createStepper(F,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=F.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");h.appendChild(g);h=l.getElementsByTagName("div")[0];h.style.cssFloat="right";var H=
null,y="#ffffff",W=null,R="#000000",T=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return y},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=
-null})});T.style.fontWeight="bold";var ca=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");ca.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return R},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){W=a},destroy:function(){W=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
-"#000000",function(a){T.style.display=null==a||a==mxConstants.NONE?"none":"";ca.style.display=T.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(T);b.cellEditor.isContentEditing()||h.appendChild(ca);
-a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||0!=f.edges.length||h.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));k.style.fontWeight="bold";h.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";
-k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var X,U,ja,da,ka,ea=this.addUnitInput(k,"pt",91,44,function(){X.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),
-20);mxUtils.br(k);mxUtils.br(k);var Z=this.addUnitInput(k,"pt",162,44,function(){ja.apply(this,arguments)}),fa=this.addUnitInput(k,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(k,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ba=null,la=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
+null})});T.style.fontWeight="bold";var ca=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");ca.style.fontWeight="bold";h=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return R},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){W=a},destroy:function(){W=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
+"#000000",function(a){T.style.display=null==a||a==mxConstants.NONE?"none":"";ca.style.display=T.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});h.style.fontWeight="bold";k.appendChild(h);k.appendChild(T);b.cellEditor.isContentEditing()||k.appendChild(ca);
+a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";h=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);h.style.fontWeight="bold";f.containsLabel||f.autoSize||0!=f.edges.length||k.appendChild(h);h=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));h.style.fontWeight="bold";k.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";
+h.style.paddingBottom="28px";h.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));h.appendChild(g);var X,U,ja,da,ka,ea=this.addUnitInput(h,"pt",91,44,function(){X.apply(this,arguments)}),Y=this.addUnitInput(h,"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("top"),91);this.addLabel(h,mxResources.get("global"),
+20);mxUtils.br(h);mxUtils.br(h);var Z=this.addUnitInput(h,"pt",162,44,function(){ja.apply(this,arguments)}),fa=this.addUnitInput(h,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(h,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("left"),162);this.addLabel(h,mxResources.get("bottom"),91);this.addLabel(h,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ba=null,la=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ba&&(b.cellEditor.restoreSelection(ba),ba=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&
-(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){la=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),
-function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(k);this.styleButtons(g);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(h);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);
-k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex:0))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex+1:-1))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),
-function(){try{null!=B&&null!=L&&b.deleteColumn(B,L.cellIndex)}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex+1))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",
-mxResources.get("deleteRow"),function(){try{null!=B&&null!=K&&b.deleteRow(B,K.sectionRowIndex)}catch(S){alert(S)}},k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
+(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){la=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});a.value="120 %"}));k=e.cloneNode(!1);k.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],k,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),
+function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(h);this.styleButtons(g);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);mxClient.IS_QUIRKS&&(h.style.height="70");h=e.cloneNode(!1);
+h.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex:0))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex+1:-1))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),
+function(){try{null!=B&&null!=L&&b.deleteColumn(B,L.cellIndex)}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex+1))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),function(){try{null!=B&&null!=K&&b.deleteRow(B,K.sectionRowIndex)}catch(S){alert(S)}},h)];this.styleButtons(g);g[2].style.marginRight="9px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(h);mxClient.IS_QUIRKS&&(mxUtils.br(a),k.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
mxUtils.bind(this,function(){if(null!=B){var a=B.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=""):(B.setAttribute("border","1"),B.style.border="1px solid "+a,B.style.borderCollapse="collapse")})}}),
e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=B){var a=B.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){B.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",
mxResources.get("spacing"),function(){if(null!=B){var a=B.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?B.setAttribute("cellPadding",a):B.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=B&&B.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",
-mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var V=mxUtils.bind(this,
-function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=
-F)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),F.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,
+mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));k.appendChild(e);a.appendChild(k);D=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(h);var V=mxUtils.bind(this,
+function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=
+F)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),F.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(r,a==mxConstants.ALIGN_CENTER);c(t,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,
mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&
b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),Y.value=isNaN(a)?
"":a+" pt";if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,
0)),Z.value=isNaN(a)?"":a+" pt"});U=this.installInputHandler(Y,mxConstants.STYLE_SPACING,2,-999,999," pt");X=this.installInputHandler(ea,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");da=this.installInputHandler(fa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ja=this.installInputHandler(Z,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(F,V);this.addKeyHandler(Y,V);this.addKeyHandler(ea,V);this.addKeyHandler(ga,
V);this.addKeyHandler(fa,V);this.addKeyHandler(Z,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var ma=!1,e=function(){ma||(ma=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a){return"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},e=function(a,b,c){return"%"==
-c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var f=mxUtils.getCurrentStyle(a),g=d(f.fontSize),h=e(g,f.lineHeight,a),k=a.getElementsByTagName("*");if(0<k.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var p=
-window.getSelection(),n=0;n<k.length;n++)if(p.containsNode(k[n],!0)){temp=mxUtils.getCurrentStyle(k[n]);var g=Math.max(d(temp.fontSize),g),u=e(g,temp.lineHeight,k[n]);if(u!=h||isNaN(u))h=""}null!=f&&(c(m[0],"bold"==f.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea)),c(m[1],"italic"==f.fontStyle||null!=b.getParentByName(a,"I",b.cellEditor.textarea)),c(m[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea)),c(q,"left"==f.textAlign),c(t,"center"==f.textAlign),c(r,"right"==f.textAlign),
+c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var f=mxUtils.getCurrentStyle(a),g=d(f.fontSize),h=e(g,f.lineHeight,a),k=a.getElementsByTagName("*");if(0<k.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var n=
+window.getSelection(),p=0;p<k.length;p++)if(n.containsNode(k[p],!0)){temp=mxUtils.getCurrentStyle(k[p]);var g=Math.max(d(temp.fontSize),g),u=e(g,temp.lineHeight,k[p]);if(u!=h||isNaN(u))h=""}null!=f&&(c(m[0],"bold"==f.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea)),c(m[1],"italic"==f.fontStyle||null!=b.getParentByName(a,"I",b.cellEditor.textarea)),c(m[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea)),c(q,"left"==f.textAlign),c(r,"center"==f.textAlign),c(t,"right"==f.textAlign),
c(A,"justify"==f.textAlign),c(C,null!=b.getParentByName(a,"SUP",b.cellEditor.textarea)),c(x,null!=b.getParentByName(a,"SUB",b.cellEditor.textarea)),B=b.getParentByName(a,"TABLE",b.cellEditor.textarea),K=null==B?null:b.getParentByName(a,"TR",B),L=null==B?null:b.getParentByName(a,"TD",B),D.style.display=null!=B?"":"none",document.activeElement!=F&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=G?(a.removeAttribute("size"),a.style.fontSize=G+" pt",G=null):F.value=isNaN(g)?"":g+" pt",u=parseFloat(h),
isNaN(u)?la.value="100 %":la.value=Math.round(100*u)+" %"),a=f.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),d=f.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),
null!=W&&(R="#"==a.charAt(0)?a:"#000000",W(R,!0)),null!=H&&(y="#"==d.charAt(0)?d:null,H(y,!0)),null!=l.firstChild&&(f=f.fontFamily,"'"==f.charAt(0)&&(f=f.substring(1)),"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1)),'"'==f.charAt(0)&&(f=f.substring(1)),'"'==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1)),l.firstChild.nodeValue=f))}ma=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,
@@ -2743,27 +2748,27 @@ a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.con
StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),d=null;1==this.editorUi.editor.graph.getSelectionCount()&&(d=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),d.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),d.style.width="202px",d.style.marginBottom="2px",a.appendChild(d));c.image&&(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==d?c.style.width="202px":(d.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a};
StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var b=document.createElement("select");b.style.position="absolute";b.style.marginTop="-2px";b.style.right=mxClient.IS_QUIRKS?"52px":"72px";b.style.width="70px";mxEvent.addListener(b,"click",function(a){mxEvent.consume(a)});var f=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"#ffffff",function(a){b.style.display=
-null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,h=this.createCellColorOption(mxResources.get("fill"),e,"#ffffff");h.style.fontWeight="bold";e=mxUtils.getValue(d.style,e,null);f.style.display=null!=e&&e!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var g=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],e=0;e<g.length;e++){var k=document.createElement("option");
-k.setAttribute("value",g[e]);mxUtils.write(k,mxResources.get(g[e]));b.appendChild(k)}f.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);f.style.display=!d.fill||d.containsImage||null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?
-"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(f);h=this.getCustomColors();for(e=0;e<h.length;e++)a.appendChild(this.createCellColorOption(h[e].title,h[e].key,h[e].defaultValue));return a};
+null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),e,"#ffffff");k.style.fontWeight="bold";e=mxUtils.getValue(d.style,e,null);f.style.display=null!=e&&e!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var g=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],e=0;e<g.length;e++){var h=document.createElement("option");
+h.setAttribute("value",g[e]);mxUtils.write(h,mxResources.get(g[e]));b.appendChild(h)}f.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);f.style.display=!d.fill||d.containsImage||null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?
+"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(k);a.appendChild(f);k=this.getCustomColors();for(e=0;e<k.length;e++)a.appendChild(this.createCellColorOption(k[e].title,k[e].key,k[e].defaultValue));return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=[];"swimlane"==this.format.getSelectionState().style.shape&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return a};
StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(v.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));v.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
-"bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){f.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
-"curved"==g.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)f.setCellStyles(c[e],d[e],f.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var p="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k=this.createCellColorOption(mxResources.get("line"),p,"#000000");k.appendChild(g);h.appendChild(k);
-var n=h.cloneNode(!1);n.style.fontWeight="normal";n.style.whiteSpace="nowrap";n.style.position="relative";n.style.paddingLeft="16px";n.style.marginBottom="2px";n.style.marginTop="2px";n.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop="6px";a.firstChild.firstChild.style.padding=
-"0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(n,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
-q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),t=n.cloneNode(!1),r=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-connection",
+c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));v.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight=
+"bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var h=["sharp","rounded","curved"],l=0;l<h.length;l++){var m=document.createElement("option");m.setAttribute("value",h[l]);mxUtils.write(m,mxResources.get(h[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){f.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
+"curved"==g.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)f.setCellStyles(c[e],d[e],f.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var n="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,h=this.createCellColorOption(mxResources.get("line"),n,"#000000");h.appendChild(g);k.appendChild(h);
+var p=k.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop="6px";a.firstChild.firstChild.style.padding=
+"0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
+q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),r=p.cloneNode(!1),t=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-connection",
mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",
mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),
-m=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
-mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=n.cloneNode(!1),w=document.createElement("input");w.style.textAlign="right";w.style.marginTop="2px";w.style.width="41px";w.setAttribute("title",mxResources.get("linewidth"));n.appendChild(w);
-var v=w.cloneNode(!0);t.appendChild(v);var u=this.createStepper(w,c,1,9);u.style.display=w.style.display;u.style.marginTop="2px";n.appendChild(u);var z=this.createStepper(v,d,1,9);z.style.display=v.style.display;z.style.marginTop="2px";t.appendChild(z);mxClient.IS_QUIRKS?(w.style.height="17px",v.style.height="17px"):(w.style.position="absolute",w.style.right="32px",w.style.height="15px",u.style.right="20px",v.style.position="absolute",v.style.right="32px",v.style.height="15px",z.style.right="20px");
-mxEvent.addListener(w,"blur",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(v,"blur",d);mxEvent.addListener(v,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
+m=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
+mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),h=p.cloneNode(!1),w=document.createElement("input");w.style.textAlign="right";w.style.marginTop="2px";w.style.width="41px";w.setAttribute("title",mxResources.get("linewidth"));p.appendChild(w);
+var v=w.cloneNode(!0);r.appendChild(v);var u=this.createStepper(w,c,1,9);u.style.display=w.style.display;u.style.marginTop="2px";p.appendChild(u);var z=this.createStepper(v,d,1,9);z.style.display=v.style.display;z.style.marginTop="2px";r.appendChild(z);mxClient.IS_QUIRKS?(w.style.height="17px",v.style.height="17px"):(w.style.position="absolute",w.style.right="32px",w.style.height="15px",u.style.right="20px",v.style.position="absolute",v.style.right="32px",v.style.height="15px",z.style.right="20px");
+mxEvent.addListener(w,"blur",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(v,"blur",d);mxEvent.addListener(v,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));var x=this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-startclassic",
mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?
(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",
null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",
@@ -2775,7 +2780,7 @@ null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeS
this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,
-"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),A=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",
+"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),A=this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",
null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-endblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
@@ -2786,28 +2791,28 @@ null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild
"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",
-null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(r,8);this.addArrow(x);this.addArrow(C);this.addArrow(A);u=this.addArrow(l,9);u.className="geIcon";u.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom=
-"1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";u.appendChild(D);var B=document.createElement("div");B.style.width="23px";B.style.height="1px";B.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.marginBottom="9px";z.appendChild(B);l.style.height="15px";m.style.height="15px";r.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(h);a.appendChild(t);a.appendChild(n);l=n.cloneNode(!1);
+null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(C);this.addArrow(A);u=this.addArrow(l,9);u.className="geIcon";u.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom=
+"1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";u.appendChild(D);var B=document.createElement("div");B.style.width="23px";B.style.height="1px";B.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.marginBottom="9px";z.appendChild(B);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(k);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);
l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var L,K,I=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),E=this.addUnitInput(l,"pt",20,33,function(){K.apply(this,arguments)});mxUtils.br(l);u=document.createElement("div");
-u.style.height="8px";l.appendChild(u);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,N,Q=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom=
-"2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var F,G=this.addUnitInput(h,"pt",20,41,function(){F.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),
-mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter=
-"none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";
+u.style.height="8px";l.appendChild(u);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,N,Q=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
+"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));k.appendChild(m);var F,G=this.addUnitInput(k,"pt",20,41,function(){F.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(h),mxClient.IS_QUIRKS&&(mxUtils.br(a),
+mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(k));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter=
+"none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";
"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.borderBottom=D.style.borderBottom;
a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,
-null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";r.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==
-f.getSelectionCount()?(t.style.display="",n.style.display="none"):(t.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",
-c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(A,100));if(d||document.activeElement!=O)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,
+null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==
+f.getSelectionCount()?(r.style.display="",p.style.display="none"):(r.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",
+c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(A,100));if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,
mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),E.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),I.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":
-a+" pt"});N=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(E,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,H);this.addKeyHandler(O,
+a+" pt"});N=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(E,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,H);this.addKeyHandler(P,
H);this.addKeyHandler(Q,H);this.addKeyHandler(E,H);this.addKeyHandler(I,H);this.addKeyHandler(G,H);f.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){f.getModel().removeListener(H)}});H();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
-e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
-mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
+e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],k=0;k<f.length;k++){var g=document.createElement("option");g.setAttribute("value",f[k]);mxUtils.write(g,mxResources.get(f[k]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
+mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var h,l=this.addUnitInput(a,"pt",22,33,function(){h.apply(this,arguments)});h=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
m);b.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){b.getModel().removeListener(m)}});m()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var b=document.createElement("table");mxClient.IS_QUIRKS&&(b.style.fontSize="1em");b.style.width="100%";b.style.fontWeight="bold";b.style.paddingRight="20px";var f=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var h=document.createElement("td");h.style.padding="0px";h.style.width="50%";h.setAttribute("valign",
-"top");var g=h.cloneNode(!0);g.style.paddingLeft="8px";e.appendChild(h);e.appendChild(g);f.appendChild(e);b.appendChild(f);a.appendChild(b);var k=h,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";k.appendChild(a);k=k==h?g:h;l++}),p=mxUtils.bind(this,function(b,c,e){d=this.format.getSelectionState();h.innerHTML="";g.innerHTML="";k=h;d.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==d.style.shape&&m(mxResources.get("divider"),
-"swimlaneLine",1);d.containsImage||m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);d.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);d.comic&&m(mxResources.get("comic"),"comic",0);0==l&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){c.getModel().removeListener(p)}});p();return a};
+StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var b=document.createElement("table");mxClient.IS_QUIRKS&&(b.style.fontSize="1em");b.style.width="100%";b.style.fontWeight="bold";b.style.paddingRight="20px";var f=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var k=document.createElement("td");k.style.padding="0px";k.style.width="50%";k.setAttribute("valign",
+"top");var g=k.cloneNode(!0);g.style.paddingLeft="8px";e.appendChild(k);e.appendChild(g);f.appendChild(e);b.appendChild(f);a.appendChild(b);var h=k,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";h.appendChild(a);h=h==k?g:k;l++}),n=mxUtils.bind(this,function(b,c,e){d=this.format.getSelectionState();k.innerHTML="";g.innerHTML="";h=k;d.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==d.style.shape&&m(mxResources.get("divider"),
+"swimlaneLine",1);d.containsImage||m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);d.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);d.comic&&m(mxResources.get("comic"),"comic",0);0==l&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,n);this.listeners.push({destroy:function(){c.getModel().removeListener(n)}});n();return a};
StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";var c=mxUtils.button(mxResources.get("setAsDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("setAsDefaultStyle").funct()}));c.setAttribute("title",mxResources.get("setAsDefaultStyle")+" ("+this.editorUi.actions.get("setAsDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};
mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);if(d.isEnabled()){DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return d.pageVisible},function(a){c.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(d.pageVisible)};c.addListener("pageViewChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}));
@@ -2817,42 +2822,42 @@ DiagramFormatPanel.prototype.addOptions=function(a){var c=this.editorUi,d=c.edit
a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return d.connectionHandler.isEnabled()},function(a){c.actions.get("connectionPoints").funct()},{install:function(a){this.listener=function(){a(d.connectionHandler.isEnabled())};c.addListener("connectionPointsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return d.graphHandler.guidesEnabled},function(a){c.actions.get("guides").funct()},
{install:function(a){this.listener=function(){a(d.graphHandler.guidesEnabled)};c.addListener("guidesEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})));return a};
DiagramFormatPanel.prototype.addGridOption=function(a){function c(a){var c=parseInt(f.value),c=Math.max(1,isNaN(c)?10:c);c!=b.getGridSize()&&b.setGridSize(c);f.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=document.createElement("input");f.style.position="absolute";f.style.textAlign="right";f.style.width="38px";f.value=b.getGridSize()+" pt";var e=this.createStepper(f,c);f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display;mxEvent.addListener(f,"keydown",
-function(a){13==a.keyCode?(b.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(f.value=b.getGridSize(),b.container.focus(),mxEvent.consume(a))});mxEvent.addListener(f,"blur",c);mxEvent.addListener(f,"change",c);if(mxClient.IS_SVG){f.style.marginTop="-2px";f.style.right="84px";e.style.marginTop="-16px";e.style.right="72px";var h=this.createColorOption(mxResources.get("grid"),function(){var a=b.view.gridColor;return b.isGridEnabled()?a:null},function(a){a==mxConstants.NONE?(b.setGridEnabled(!1),
-d.fireEvent(new mxEventObject("gridEnabledChanged"))):(b.setGridEnabled(!0),d.setGridColor(a));f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display},"#e0e0e0",{install:function(a){this.listener=function(){a(b.isGridEnabled()?b.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});h.appendChild(f);h.appendChild(e);a.appendChild(h)}else f.style.marginTop="2px",
+function(a){13==a.keyCode?(b.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(f.value=b.getGridSize(),b.container.focus(),mxEvent.consume(a))});mxEvent.addListener(f,"blur",c);mxEvent.addListener(f,"change",c);if(mxClient.IS_SVG){f.style.marginTop="-2px";f.style.right="84px";e.style.marginTop="-16px";e.style.right="72px";var k=this.createColorOption(mxResources.get("grid"),function(){var a=b.view.gridColor;return b.isGridEnabled()?a:null},function(a){a==mxConstants.NONE?b.setGridEnabled(!1):
+(b.setGridEnabled(!0),d.setGridColor(a));f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display;d.fireEvent(new mxEventObject("gridEnabledChanged"))},"#e0e0e0",{install:function(a){this.listener=function(){a(b.isGridEnabled()?b.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});k.appendChild(f);k.appendChild(e);a.appendChild(k)}else f.style.marginTop="2px",
f.style.right="32px",e.style.marginTop="2px",e.style.right="20px",a.appendChild(f),a.appendChild(e),a.appendChild(this.createOption(mxResources.get("grid"),function(){return b.isGridEnabled()},function(a){b.setGridEnabled(a);b.isGridEnabled()&&(b.view.gridColor="#e0e0e0");d.fireEvent(new mxEventObject("gridEnabledChanged"))},{install:function(a){this.listener=function(){f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display;a(b.isGridEnabled())};d.addListener("gridEnabledChanged",
this.listener)},destroy:function(){d.removeListener(this.listener)}}))};DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
DiagramFormatPanel.prototype.addPaperSize=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var b=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(c,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(b.widthInput,function(){b.set(d.pageFormat)});this.addKeyHandler(b.heightInput,
function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addListener("pageFormatChanged",f);this.listeners.push({destroy:function(){c.removeListener(f)}});d.getModel().addListener(mxEvent.CHANGE,f);this.listeners.push({destroy:function(){d.getModel().removeListener(f)}});return a};
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
-c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function q(){mxActor.call(this)}function t(a,b){this.canvas=
-a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function r(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}
-function L(){mxEllipse.call(this)}function K(){mxShape.call(this)}function I(){mxShape.call(this)}function E(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function Q(){mxShape.call(this)}function O(){mxCylinder.call(this)}function F(){mxDoubleEllipse.call(this)}function G(){mxDoubleEllipse.call(this)}function H(){mxArrowConnector.call(this);this.spacing=0}function y(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}
+c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function k(){mxCylinder.call(this)}function g(){mxActor.call(this)}function h(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(a,b){this.canvas=
+a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}
+function L(){mxEllipse.call(this)}function K(){mxShape.call(this)}function I(){mxShape.call(this)}function E(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxCylinder.call(this)}function F(){mxDoubleEllipse.call(this)}function G(){mxDoubleEllipse.call(this)}function H(){mxArrowConnector.call(this);this.spacing=0}function y(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}
function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function X(){mxActor.call(this)}function U(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(){mxActor.call(this)}function ka(){mxActor.call(this)}function ea(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function la(){mxRhombus.call(this)}function V(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}
-function S(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Da(a,b,c,d,e,f,g,h,k,l){g+=k;var P=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(P.x-e-g,P.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
+function S(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Da(a,b,c,d,e,f,g,h,k,l){g+=k;var O=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(O.x-e-g,O.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};a.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",
a);var za=Math.tan(mxUtils.toRadians(30)),oa=(.5-za)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/za);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*oa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-oa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+za));f?(a.moveTo(0,.25*b),a.lineTo(.5*
b,(.5-oa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-oa)*b),a.lineTo(.5*b,(1-oa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*oa),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-oa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||
(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",
b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(d-b,0),a.lineTo(d-b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*
-d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
-f?"left"==g?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==g?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(d,c)):(a.moveTo(0,c),a.lineTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d,0)),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,c),a.close());a.end()};mxCellRenderer.registerShape("folder",h);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*
-d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",
-k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();
+d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(k,mxCylinder);k.prototype.tabWidth=60;k.prototype.tabHeight=20;k.prototype.tabPosition="right";k.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
+f?"left"==g?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==g?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(d,c)):(a.moveTo(0,c),a.lineTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d,0)),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,c),a.close());a.end()};mxCellRenderer.registerShape("folder",k);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(h,mxActor);h.prototype.size=.4;h.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*
+d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};h.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",
+h);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();
a.end()};mxCellRenderer.registerShape("document",l);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,
-c,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};
-mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);t.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};t.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)};t.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};t.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};t.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=
-g};t.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var P=c(a-this.lastX)*d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,
-P*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
-function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new t(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};
+[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,
+c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};
+mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);r.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};r.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)};r.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};r.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};r.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=
+g};r.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var O=c(a-this.lastX)*d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,
+O*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};r.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};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
+function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};
var Ja=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ja.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,
-c)),a.close(),a.end(),a.fillAndStroke()}};var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(r,mxRectangleShape);r.prototype.size=.1;r.prototype.isHtmlAllowed=function(){return!1};r.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 b=
-a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};r.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",r);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};w.prototype.paintForeground=
+c)),a.close(),a.end(),a.fillAndStroke()}};var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.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 b=
+a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};t.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",t);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};w.prototype.paintForeground=
function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",
v);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-
@@ -2860,8 +2865,8 @@ b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRe
this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Fa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Fa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Fa.apply(this,[a,b,
c,d,e]))}};mxUtils.extend(C,mxRectangleShape);C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};C.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],P=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,Aa=this.style["symbol"+f+"VSpacing"]||m,aa=this.style["symbol"+f+"ArcSpacing"];null!=aa&&(aa*=this.getArcSize(d+this.strokewidth,
-e+this.strokewidth),m+=aa,Aa+=aa);var aa=b,ra=c,aa=h==mxConstants.ALIGN_CENTER?aa+(d-P)/2:h==mxConstants.ALIGN_RIGHT?aa+(d-P-m):aa+m,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-l-Aa):ra+Aa;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,aa,ra,P,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(a,
+0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],O=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,Aa=this.style["symbol"+f+"VSpacing"]||m,aa=this.style["symbol"+f+"ArcSpacing"];null!=aa&&(aa*=this.getArcSize(d+this.strokewidth,
+e+this.strokewidth),m+=aa,Aa+=aa);var aa=b,ra=c,aa=h==mxConstants.ALIGN_CENTER?aa+(d-O)/2:h==mxConstants.ALIGN_RIGHT?aa+(d-O-m):aa+m,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-l-Aa):ra+Aa;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,aa,ra,O,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(a,
b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",A);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);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,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(a,
b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",L);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",K);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
@@ -2874,17 +2879,17 @@ a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h
mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<
a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",v.prototype.size))*
b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+
-h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=p.prototype.size;null!=b&&(e=
+h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=
mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,
g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
-mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?u.prototype.fixedSize:u.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,h=a.y,k=a.width,l=a.height,P=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+k-
-e,h),new mxPoint(g+k,a),new mxPoint(g+k-e,h+l),new mxPoint(g,h+l),new mxPoint(g+e,a),new mxPoint(g,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+l),new mxPoint(g+e,h+l),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(P,h),new mxPoint(g+k,h+e),new mxPoint(g+k,
-h+l),new mxPoint(P,h+l-e),new mxPoint(g,h+l),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(P,h+e),new mxPoint(g+k,h),new mxPoint(g+k,h+l-e),new mxPoint(P,h+l),new mxPoint(g,h+l-e),new mxPoint(g,h)]);P=new mxPoint(P,a);d&&(c.x<g||c.x>g+k?P.y=c.y:P.x=c.x);return mxUtils.getPerimeterPoint(h,P,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=z.prototype.size;null!=
+mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?u.prototype.fixedSize:u.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,h=a.y,k=a.width,l=a.height,O=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+k-
+e,h),new mxPoint(g+k,a),new mxPoint(g+k-e,h+l),new mxPoint(g,h+l),new mxPoint(g+e,a),new mxPoint(g,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+l),new mxPoint(g+e,h+l),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(O,h),new mxPoint(g+k,h+e),new mxPoint(g+k,
+h+l),new mxPoint(O,h+l-e),new mxPoint(g,h+l),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(O,h+e),new mxPoint(g+k,h),new mxPoint(g+k,h+l-e),new mxPoint(O,h+l),new mxPoint(g,h+l-e),new mxPoint(g,h)]);O=new mxPoint(O,a);d&&(c.x<g||c.x>g+k?O.y=c.y:O.x=c.x);return mxUtils.getPerimeterPoint(h,O,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=z.prototype.size;null!=
b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+
e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();
a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/
-2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(O,mxCylinder);O.prototype.jettyWidth=32;O.prototype.jettyHeight=12;O.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),
-a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",O);mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);
+2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(P,mxCylinder);P.prototype.jettyWidth=32;P.prototype.jettyHeight=12;P.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),
+a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",P);mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);
this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",F);mxUtils.extend(G,F);G.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",G);mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=4;H.prototype.isOpenEnded=function(){return!0};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};H.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
H);mxUtils.extend(y,mxArrowConnector);y.prototype.defaultWidth=10;y.prototype.defaultArrowWidth=20;y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
y);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",W);mxUtils.extend(R,mxRectangleShape);R.prototype.dx=20;R.prototype.dy=20;R.prototype.isHtmlAllowed=
@@ -2907,15 +2912,15 @@ mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype
e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",
pa);mxUtils.extend(qa,mxActor);qa.prototype.size=.25;qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",qa);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,b,c){for(var d=
[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),na.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;
-StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),p=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+p/2-3*m/2,d.y-3*p/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,
-l){var m=e*(g+k+1),p=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+p/2-3*m/2,d.y-3*p/2-m/2);a.moveTo(d.x-m/2+p/2,d.y-p/2-m/2);a.lineTo(d.x-p/2-3*m/2,d.y-3*p/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),p=Da.apply(this,arguments),n=e*(g+2*k),q=f*(g+2*k);return function(){p.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*q+f*k);a.moveTo(m.x-
-n-q+f*k,m.y-q+n-e*k);a.lineTo(m.x+q-n-f*k,m.y-q-n+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var p=
-e.clone();return function(){b.begin();b.moveTo(p.x,p.y);k?b.lineTo(p.x-f-g/a,p.y-g+f/a):b.lineTo(p.x+g/a-f,p.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ga=function(a,b,c){return sa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},sa=function(a,b,c,d,e){return M(a,b,
-function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,p=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,p,h/p,m/p,l,g,d,f)})},ia=function(a){return function(b){return[M(b,["arrowWidth",
+StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,
+l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Da.apply(this,arguments),p=e*(g+2*k),O=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*O+f*k);a.moveTo(m.x-
+p-O+f*k,m.y-O+p-e*k);a.lineTo(m.x+O-p-f*k,m.y-O-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=
+e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ga=function(a,b,c){return sa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},sa=function(a,b,c,d,e){return M(a,b,
+function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,n=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,n,h/n,m/n,l,g,d,f)})},ia=function(a){return function(b){return[M(b,["arrowWidth",
"arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ba=function(a,b,c){return function(d){var e=
[M(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},wa=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[M(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,
"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ha(f));return g}},Ha=function(a){return function(b){var c=
-[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},ta=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return M(a,
+[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},ta=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return M(a,
[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*
e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},M=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};
g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ca={link:function(a){return[Ga(a,!0,10),Ga(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,
@@ -2931,7 +2936,7 @@ parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYL
b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ha(a,c/2))}return b},
label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
"width",J.prototype.width))),c=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",r.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));
return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[M(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
@@ -2940,30 +2945,30 @@ b)},function(a,b){mxUtils.getValue(this.state.style,"base",v.prototype.base);thi
this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},internalStorage:function(a){var b=[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",R.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",R.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
-Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
-Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ba(1,a.prototype.size,!1),card:Ba(.5,g.prototype.size,!0),loopLimit:Ba(.5,Y.prototype.size,!0),trapezoid:Ha(.5),parallelogram:Ha(1)};Graph.createHandle=M;Graph.handleFactory=Ca;mxVertexHandler.prototype.createCustomHandles=
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",k.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",k.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(p.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ba(1,a.prototype.size,!1),card:Ba(.5,g.prototype.size,!0),loopLimit:Ba(.5,Y.prototype.size,!0),trapezoid:Ha(.5),parallelogram:Ha(1)};Graph.createHandle=M;Graph.handleFactory=Ca;mxVertexHandler.prototype.createCustomHandles=
function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ca[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&
(a=mxConstants.SHAPE_CONNECTOR);a=Ca[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xa=new mxPoint(1,0),ya=new mxPoint(1,0),ia=mxUtils.toRadians(-30),xa=mxUtils.getRotatedPoint(xa,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),ya=mxUtils.getRotatedPoint(ya,Math.cos(ia),Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
-d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=xa.x,l=xa.y,m=ya.x,p=ya.y,n="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(p*a-m*d)/(k*p-l*m);a=(l*a-k*d)/(l*m-k*p);n?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+
+d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=xa.x,l=xa.y,m=ya.x,n=ya.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+
k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return La.apply(this,arguments)};c.prototype.constraints=[];d.prototype.constraints=[];v.prototype.constraints=[];
mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;
+.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;
R.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=
mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;Z.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)];O.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,
+1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];P.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)];e.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)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];h.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
0),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
-.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;T.prototype.constraints=null;ca.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];E.prototype.constraints=null;ka.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,
@@ -2973,7 +2978,7 @@ this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.op
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=f;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(b)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&
-a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,h=e.y,e=null;if(1==c.length&&a){var t=b.getCellGeometry(c[0]);null!=t&&(e=t.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var r=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),w=Math.round(b.snap(b.popupMenuHandler.triggerY/f-h));b.cellsMoved(c,r-e.x,w-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,k=e.y,e=null;if(1==c.length&&a){var r=b.getCellGeometry(c[0]);null!=r&&(e=r.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var t=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),w=Math.round(b.snap(b.popupMenuHandler.triggerY/f-k));b.cellsMoved(c,t-e.x,w-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){b.setSelectionCells(b.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){b.turnShapes(b.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){b.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){b.selectEdges()},
null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){b.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){b.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!b.isSelectionEmpty()){b.getModel().beginUpdate();try{var a=b.isCellMovable(b.getSelectionCell())?1:0;b.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);b.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);b.toggleCellStyles(mxConstants.STYLE_ROTATABLE,
a);b.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);b.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);b.toggleCellStyles("connectable",a)}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){b.home()},null,null,"Home");this.addAction("exitGroup",function(){b.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){b.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){b.foldCells(!0)},
@@ -2997,7 +3002,7 @@ e=this.addAction("guides",function(){b.graphHandler.guidesEnabled=!b.graphHandle
new ChangePageSetup(c);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.foldingEnabled});e.isEnabled=f;e=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.scrollbars});e=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!b.pageVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return b.pageVisible});
e=this.addAction("connectionArrows",function(){b.connectionArrowsEnabled=!b.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionArrowsEnabled});e=this.addAction("connectionPoints",function(){b.setConnectable(!b.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isEnabled()});
e=this.addAction("copyConnect",function(){b.connectionHandler.setCreateTarget(!b.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isCreateTarget()});e.isEnabled=f;e=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});e.setToggleAction(!0);e.setSelectedCallback(function(){return c.editor.autosave});e.isEnabled=f;e.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var h=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){h||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){h=!1}),h=!0)},null,null,"F1"));e=mxUtils.bind(this,function(a,c,d,e){return this.addAction(a,function(){if(null!=d&&b.cellEditor.isContentEditing())d();else{b.stopEditing(!1);b.getModel().beginUpdate();try{b.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var k=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){k||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){k=!1}),k=!0)},null,null,"F1"));e=mxUtils.bind(this,function(a,c,d,e){return this.addAction(a,function(){if(null!=d&&b.cellEditor.isContentEditing())d();else{b.stopEditing(!1);b.getModel().beginUpdate();try{b.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
c),(c&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&b.replaceElement(a)}):(c&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&b.replaceElement(a)}):(c&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.updateLabelElements(b.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&
b.replaceElement(a)})}finally{b.getModel().endUpdate()}}},null,null,e)});e("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");e("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");e("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){c.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
this.addAction("strokeColor...",function(){c.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){c.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){c.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
@@ -3008,8 +3013,8 @@ this.addAction("rounded",function(){b.getModel().beginUpdate();try{b.setCellStyl
e=null!=d?d.style:b.getCellStyle(a[0]),f="1"==mxUtils.getValue(e,mxConstants.STYLE_ROUNDED,"0")?"0":"1";b.setCellStyles(mxConstants.STYLE_ROUNDED,f);b.setCellStyles(mxConstants.STYLE_CURVED,null);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("curved",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),b.setCellStyles(mxConstants.STYLE_CURVED,
"1"),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=b.view.getState(b.getSelectionCell()),d="1";null!=a&&null!=b.getFoldingImage(a)&&(d="0");b.setCellStyles("collapsible",d);c.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",b.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var a=b.getSelectionCells();if(null!=a&&0<a.length){var c=b.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&b.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(){b.isEnabled()&&!b.isSelectionEmpty()&&c.setDefaultStyle(b.getSelectionCell())},null,null,Editor.ctrlKey+
-"+Shift+D");this.addAction("clearDefaultStyle",function(){b.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var c=d.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var e=b.view.translate,f=b.view.scale,h=e.x,e=e.y,a=b.getModel().getParent(a),n=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=n;)h+=n.x,e+=n.y,a=b.getModel().getParent(a),n=
-b.getCellGeometry(a);h=Math.round(b.snap(b.popupMenuHandler.triggerX/f-h));f=Math.round(b.snap(b.popupMenuHandler.triggerY/f-e));c.addPointAt(c.state,h,f)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().isEdge(d)){var e=
+"+Shift+D");this.addAction("clearDefaultStyle",function(){b.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var c=d.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var e=b.view.translate,f=b.view.scale,k=e.x,e=e.y,a=b.getModel().getParent(a),p=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=p;)k+=p.x,e+=p.y,a=b.getModel().getParent(a),p=
+b.getCellGeometry(a);k=Math.round(b.snap(b.popupMenuHandler.triggerX/f-k));f=Math.round(b.snap(b.popupMenuHandler.triggerY/f-e));c.addPointAt(c.state,k,f)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().isEdge(d)){var e=
b.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,b.getModel().setGeometry(d,e))}}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+C");e=this.addAction("subscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");e=this.addAction("superscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=b.getView().getState(b.getSelectionCell()),e="";null!=d&&(e=d.style[mxConstants.STYLE_IMAGE]||e);var f=b.cellEditor.saveSelection();c.showImageDialog(a,e,function(a,c,d){if(b.cellEditor.isContentEditing())b.cellEditor.restoreSelection(f),b.insertImage(a,c,d);else{var e=b.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;b.getModel().beginUpdate();
try{if(0==e.length){var h=b.getFreeInsertPoint(),g=e=[b.insertVertex(b.getDefaultParent(),null,"",h.x,h.y,c,d,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];b.fireEvent(new mxEventObject("cellsInserted","cells",g))}b.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var k=b.view.getState(e[0]),l=null!=k?k.style:b.getCellStyle(e[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?b.setCellStyles(mxConstants.STYLE_SHAPE,"image",
@@ -3025,7 +3030,7 @@ Menus.prototype.init=function(){var a=this.editorUi.editor.graph,c=mxUtils.bind(
this.put("formatBlock",new Menu(mxUtils.bind(this,function(c,b){function d(d,f){return c.addItem(d,null,mxUtils.bind(this,function(){a.cellEditor.textarea.focus();document.execCommand("formatBlock",!1,"<"+f+">")}),b)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML=
'<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML='<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("",
"blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(c,b){for(var d=[6,8,9,10,11,12,14,18,24,36,48,72],e=mxUtils.bind(this,function(d){this.styleChange(c,d,[mxConstants.STYLE_FONTSIZE],[d],null,b,function(){document.execCommand("fontSize",!1,"3");for(var b=a.cellEditor.textarea.getElementsByTagName("font"),c=0;c<b.length;c++)if("3"==b[c].getAttribute("size")){b[c].removeAttribute("size");
-b[c].style.fontSize=d+"px";break}})}),h=0;h<d.length;h++)e(d[h]);c.addSeparator(b);if(0<this.customFontSizes.length){for(h=0;h<this.customFontSizes.length;h++)e(this.customFontSizes[h]);c.addSeparator(b);c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),b);c.addSeparator(b)}this.promptChange(c,mxResources.get("custom")+"...","(pt)","12",mxConstants.STYLE_FONTSIZE,b,!0,mxUtils.bind(this,function(a){this.customFontSizes.push(a)}))})));this.put("direction",
+b[c].style.fontSize=d+"px";break}})}),k=0;k<d.length;k++)e(d[k]);c.addSeparator(b);if(0<this.customFontSizes.length){for(k=0;k<this.customFontSizes.length;k++)e(this.customFontSizes[k]);c.addSeparator(b);c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),b);c.addSeparator(b)}this.promptChange(c,mxResources.get("custom")+"...","(pt)","12",mxConstants.STYLE_FONTSIZE,b,!0,mxUtils.bind(this,function(a){this.customFontSizes.push(a)}))})));this.put("direction",
new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("flipH"),null,function(){a.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)},b);c.addItem(mxResources.get("flipV"),null,function(){a.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},b);this.addMenuItems(c,["-","rotation"],b)})));this.put("align",new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("leftAlign"),null,function(){a.alignCells(mxConstants.ALIGN_LEFT)},b);c.addItem(mxResources.get("center"),null,function(){a.alignCells(mxConstants.ALIGN_CENTER)},
b);c.addItem(mxResources.get("rightAlign"),null,function(){a.alignCells(mxConstants.ALIGN_RIGHT)},b);c.addSeparator(b);c.addItem(mxResources.get("topAlign"),null,function(){a.alignCells(mxConstants.ALIGN_TOP)},b);c.addItem(mxResources.get("middle"),null,function(){a.alignCells(mxConstants.ALIGN_MIDDLE)},b);c.addItem(mxResources.get("bottomAlign"),null,function(){a.alignCells(mxConstants.ALIGN_BOTTOM)},b)})));this.put("distribute",new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("horizontal"),
null,function(){a.distributeCells(!0)},b);c.addItem(mxResources.get("vertical"),null,function(){a.distributeCells(!1)},b)})));this.put("layout",new Menu(mxUtils.bind(this,function(c,b){var d=mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});c.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,
@@ -3039,28 +3044,28 @@ b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a
b)})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),b))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(a,b){null!=this.editorUi.format&&this.addMenuItems(a,["formatPanel"],b);this.addMenuItems(a,["outline","layers"],b)})));this.put("viewZoom",new Menu(mxUtils.bind(this,
function(c,b){this.addMenuItems(c,["resetView","-"],b);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],e=0;e<d.length;e++)(function(d){c.addItem(100*d+"%",null,function(){a.zoomTo(d)},b)})(d[e]);this.addMenuItems(c,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),b)})));this.put("file",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"new open - save saveAs - import export - pageSetup print".split(" "),b)})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
"undo redo - cut copy paste delete - duplicate - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["help","-","about"])})))};Menus.prototype.put=function(a,c){return this.menus[a]=c};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,c,d){var b=this.get(a).isEnabled();if(c.showDisabled||b)d=c.addItem(mxResources.get(a),null,null,d,null,b),this.addMenu(a,c,d)};Menus.prototype.addMenu=function(a,c,d){var b=this.get(a);null!=b&&(c.showDisabled||b.isEnabled())&&this.get(a).execute(c,d)};
-Menus.prototype.addInsertTableItem=function(a){function c(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var h=0;h<f.length;h++)a.push(f[h]);d.container.focus();
-d.pasteHtmlAtCaret(c(e.sectionRowIndex+1,b.cellIndex+1));b=d.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(h=b.length-1;0<=h;h--)if(0==h||b[h]!=a[h-1]){d.selectNode(b[h].rows[0].cells[0]);break}}}));var b='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';a.firstChild.innerHTML="";var f=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS||d.setAttribute("cellPadding",
-"8");for(var e=0;e<a;e++)for(var f=d.insertRow(e),g=0;g<c;g++){var h=f.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=b)}return d}(5,5);a.firstChild.appendChild(f);var e=document.createElement("div");e.style.padding="4px";e.style.fontSize=Menus.prototype.defaultFontSize+"px";e.innerHTML="1x1";a.firstChild.appendChild(e);mxEvent.addListener(f,"mouseover",function(a){var c=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=c){for(var h=d.getParentByName(c,"TR"),l=Math.min(20,h.sectionRowIndex+2),
-m=Math.min(20,c.cellIndex+2),p=f.rows.length;p<l;p++)for(var n=f.insertRow(p),q=0;q<f.rows[0].cells.length;q++){var t=n.insertCell(-1);mxClient.IS_QUIRKS&&(t.innerHTML=b)}for(p=0;p<f.rows.length;p++)for(n=f.rows[p],q=n.cells.length;q<m;q++)t=n.insertCell(-1),mxClient.IS_QUIRKS&&(t.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(l=0;l<f.rows.length;l++)for(m=f.rows[l],p=0;p<m.cells.length;p++)m.cells[p].style.backgroundColor=l<=h.sectionRowIndex&&p<=c.cellIndex?"blue":"white";
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,c,d,b){var f=this.get(a).isEnabled();if(c.showDisabled||f)d=c.addItem(b||mxResources.get(a),null,null,d,null,f),this.addMenu(a,c,d)};Menus.prototype.addMenu=function(a,c,d){var b=this.get(a);null!=b&&(c.showDisabled||b.isEnabled())&&this.get(a).execute(c,d)};
+Menus.prototype.addInsertTableItem=function(a){function c(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var k=0;k<f.length;k++)a.push(f[k]);d.container.focus();
+d.pasteHtmlAtCaret(c(e.sectionRowIndex+1,b.cellIndex+1));b=d.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(k=b.length-1;0<=k;k--)if(0==k||b[k]!=a[k-1]){d.selectNode(b[k].rows[0].cells[0]);break}}}));var b='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';a.firstChild.innerHTML="";var f=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS||d.setAttribute("cellPadding",
+"8");for(var e=0;e<a;e++)for(var f=d.insertRow(e),g=0;g<c;g++){var k=f.insertCell(-1);mxClient.IS_QUIRKS&&(k.innerHTML=b)}return d}(5,5);a.firstChild.appendChild(f);var e=document.createElement("div");e.style.padding="4px";e.style.fontSize=Menus.prototype.defaultFontSize+"px";e.innerHTML="1x1";a.firstChild.appendChild(e);mxEvent.addListener(f,"mouseover",function(a){var c=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=c){for(var h=d.getParentByName(c,"TR"),k=Math.min(20,h.sectionRowIndex+2),
+m=Math.min(20,c.cellIndex+2),n=f.rows.length;n<k;n++)for(var p=f.insertRow(n),q=0;q<f.rows[0].cells.length;q++){var r=p.insertCell(-1);mxClient.IS_QUIRKS&&(r.innerHTML=b)}for(n=0;n<f.rows.length;n++)for(p=f.rows[n],q=p.cells.length;q<m;q++)r=p.insertCell(-1),mxClient.IS_QUIRKS&&(r.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(k=0;k<f.rows.length;k++)for(m=f.rows[k],n=0;n<m.cells.length;n++)m.cells[n].style.backgroundColor=k<=h.sectionRowIndex&&n<=c.cellIndex?"blue":"white";
mxEvent.consume(a)}})};
-Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var p=c[f];if(a.getModel().isEdge(p)){if(h){var n=a.getCellGeometry(p);null!=n&&(n=n.clone(),n.points=null,a.getModel().setGeometry(p,n))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[p]);e.push(p)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
-d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,h,g){var k=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=h&&a.cellEditor.isContentEditing()?h():k(g)}),e,f)};
+Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var n=c[f];if(a.getModel().isEdge(n)){if(k){var p=a.getCellGeometry(n);null!=p&&(p=p.clone(),p.points=null,a.getModel().setGeometry(n,p))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[n]);e.push(n)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
+d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,k,g){var h=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=k&&a.cellEditor.isContentEditing()?k():h(g)}),e,f)};
Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var f=0;f<a.length;f++)b.setCellStyles(a[f],c[f]);null!=d&&d();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,c,d,b,f,e,h,g,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[f]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(f,b)}finally{a.getModel().endUpdate()}null!=g&&g(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
-d:""));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}),e,k,h)};
+Menus.prototype.promptChange=function(a,c,d,b,f,e,k,g,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[f]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(f,b)}finally{a.getModel().endUpdate()}null!=g&&g(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
+d:""));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}),e,h,k)};
Menus.prototype.pickColor=function(a,c,d){var b=this.editorUi.editor.graph;if(null!=c&&b.cellEditor.isContentEditing()){var f=b.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,d||"000000",mxUtils.bind(this,function(a){b.cellEditor.restoreSelection(f);document.execCommand(c,!1,a!=mxConstants.NONE?a:"transparent")}),function(){b.cellEditor.restoreSelection(f)});this.editorUi.showDialog(a.container,230,430,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));
this.colorDialog.currentColorKey=a;d=b.getView().getState(b.getSelectionCell());var e="none";null!=d&&(e=d.style[a]||e);"none"==e?(e="ffffff",this.colorDialog.picker.fromString("ffffff"),this.colorDialog.colorInput.value="none"):this.colorDialog.picker.fromString(e);this.editorUi.showDialog(this.colorDialog.container,230,430,!0,!0);this.colorDialog.init()}};
Menus.prototype.toggleStyle=function(a,c){var d=this.editorUi.editor.graph,b=d.toggleCellStyles(a,c);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",d.getSelectionCells()))};
Menus.prototype.addMenuItem=function(a,c,d,b,f){var e=this.editorUi.actions.get(c);return null!=e&&(a.showDisabled||e.isEnabled())&&e.visible?(c=a.addItem(e.label,null,function(){e.funct(b)},d,f,e.isEnabled()),e.toggleAction&&e.isSelected()&&a.addCheckmark(c,Editor.checkmarkImage),this.addShortcut(c,e),c):null};
Menus.prototype.addShortcut=function(a,c){if(null!=c.shortcut){var d=a.firstChild.nextSibling.nextSibling,b=document.createElement("span");b.style.color="gray";mxUtils.write(b,c.shortcut);d.appendChild(b)}};Menus.prototype.addMenuItems=function(a,c,d,b,f){for(var e=0;e<c.length;e++)"-"==c[e]?a.addSeparator(d):this.addMenuItem(a,c[e],d,b,null!=f?f[e]:null)};
Menus.prototype.createPopupMenu=function(a,c,d){var b=this.editorUi.editor.graph;a.smartSeparators=!0;b.isSelectionEmpty()?this.addMenuItems(a,["undo","redo","pasteHere"],null,d):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,d);if(b.isSelectionEmpty())this.addMenuItems(a,"- selectVertices selectEdges selectAll - clearDefaultStyle".split(" "),null,d);else{1==b.getSelectionCount()&&this.addMenuItems(a,["setAsDefaultStyle"],null,d);a.addSeparator();c=b.getSelectionCell();var f=
-b.view.getState(c);if(null!=f){var e=!1;this.addMenuItems(a,["toFront","toBack","-"],null,d);if(b.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null)){var e=b.selectionCellsHandler.getHandler(c),h=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var h=e.getHandleForEvent(b.updateMouseEvent(new mxMouseEvent(d))),g=this.editorUi.actions.get("removeWaypoint");g.handler=
-e;g.index=h;h=0<h&&h<e.bends.length-1}this.addMenuItems(a,["-",h?"removeWaypoint":"addWaypoint"],null,d);e=b.getModel().getGeometry(c);e=null!=e&&null!=e.points&&0<e.points.length}1==b.getSelectionCount()&&(e||b.getModel().isVertex(c)&&0<b.getModel().getEdgeCount(c))&&this.addMenuItems(a,["clearWaypoints"],null,d);1<b.getSelectionCount()?(a.addSeparator(),this.addMenuItems(a,["group"],null,d)):1==b.getSelectionCount()&&!b.getModel().isEdge(c)&&!b.isSwimlane(c)&&0<b.getModel().getChildCount(c)&&(a.addSeparator(),
+b.view.getState(c);if(null!=f){var e=!1;this.addMenuItems(a,["toFront","toBack","-"],null,d);if(b.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null)){var e=b.selectionCellsHandler.getHandler(c),k=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var k=e.getHandleForEvent(b.updateMouseEvent(new mxMouseEvent(d))),g=this.editorUi.actions.get("removeWaypoint");g.handler=
+e;g.index=k;k=0<k&&k<e.bends.length-1}this.addMenuItems(a,["-",k?"removeWaypoint":"addWaypoint"],null,d);e=b.getModel().getGeometry(c);e=null!=e&&null!=e.points&&0<e.points.length}1==b.getSelectionCount()&&(e||b.getModel().isVertex(c)&&0<b.getModel().getEdgeCount(c))&&this.addMenuItems(a,["clearWaypoints"],null,d);1<b.getSelectionCount()?(a.addSeparator(),this.addMenuItems(a,["group"],null,d)):1==b.getSelectionCount()&&!b.getModel().isEdge(c)&&!b.isSwimlane(c)&&0<b.getModel().getChildCount(c)&&(a.addSeparator(),
this.addMenuItems(a,["ungroup"],null,d));1==b.getSelectionCount()&&(a.addSeparator(),this.addMenuItems(a,["edit","-","editData","editLink"],null,d),b.getModel().isVertex(c)&&null!=mxUtils.getValue(f.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",null,d).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"..."))}}};
Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),d=this.defaultMenuItems,b=0;b<d.length;b++)mxUtils.bind(this,function(a){var e=c.addMenu(mxResources.get(d[b]),mxUtils.bind(this,function(){a.funct.apply(this,arguments)}));this.menuCreated(a,e)})(this.get(d[b]));return c};
-Menus.prototype.menuCreated=function(a,c){null!=c&&a.addListener("stateChanged",function(){(c.enabled=a.enabled)?(c.className="geItem",8==document.documentMode&&(c.style.color="")):(c.className="geItem mxDisabled",8==document.documentMode&&(c.style.color="#c3c3c3"))})};function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
+Menus.prototype.menuCreated=function(a,c,d){null!=c&&(d=null!=d?d:"geItem",a.addListener("stateChanged",function(){(c.enabled=a.enabled)?(c.className=d,8==document.documentMode&&(c.style.color="")):(c.className=d+" mxDisabled",8==document.documentMode&&(c.style.color="#c3c3c3"))}))};function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
Menubar.prototype.addMenu=function(a,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.className="geItem";mxUtils.write(d,a);this.addMenuHandler(d,c);this.container.appendChild(d);return d};
Menubar.prototype.addMenuHandler=function(a,c){if(null!=c){var d=!0,b=mxUtils.bind(this,function(b){if(d&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(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);this.editorUi.resetCurrentMenu();e.destroy()});var f=mxUtils.getOffset(a);e.popup(f.x,f.y+a.offsetHeight,null,
b);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(b)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(c){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),b(c))}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(){d=this.currentElt!=a}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){b(a);d=!0}))}};Menubar.prototype.destroy=function(){};
@@ -3078,7 +3083,7 @@ null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edg
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8)};
-Toolbar.prototype.addDropDownArrow=function(a,c,d,b,f,e,h,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='<div class="geSprite '+c+'" style="margin-left:'+f+"px;margin-top:"+e+'px;"></div>'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=h?h:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top=
+Toolbar.prototype.addDropDownArrow=function(a,c,d,b,f,e,k,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='<div class="geSprite '+c+'" style="margin-left:'+f+"px;margin-top:"+e+'px;"></div>'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=k?k:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top=
"5px",a.style.width=mxClient.IS_QUIRKS?d+"px":d-10+"px")};Toolbar.prototype.setFontName=function(a){null!=this.fontMenu&&(this.fontMenu.innerHTML='<div style="width:60px;overflow:hidden;display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+this.dropdownImageHtml)};Toolbar.prototype.setFontSize=function(a){null!=this.sizeMenu&&(this.sizeMenu.innerHTML='<div style="width:24px;overflow:hidden;display:inline-block;">'+a+"</div>"+this.dropdownImageHtml)};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi.editor.graph,c=this.addMenu("",mxResources.get("style"),!0,"formatBlock");c.style.position="relative";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.innerHTML=mxResources.get("style")+this.dropdownImageHtml;EditorUi.compactUi&&(c.style.paddingRight="18px",c.getElementsByTagName("img")[0].style.right="1px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width=mxClient.IS_QUIRKS?"80px":"60px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,
@@ -3093,99 +3098,99 @@ mxResources.get("fontColor"));d=a.addItem("",null,this.editorUi.actions.get("bac
'<div class="geSprite geSprite-dots" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;c.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(c.getElementsByTagName("img")[0].style.left="22px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){a.cellEditor.toggleViewMode();0<a.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=a.cellEditor.textarea.innerHTML||!a.cellEditor.clearOnChange)&&
window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});this.addSeparator();c=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(a){a.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));a.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));a.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",
!1,null)}))}));c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.position="relative";c.innerHTML='<div class="geSprite geSprite-plus" style="margin-left:-4px;margin-top:-3px;"></div>'+this.dropdownImageHtml;c.style.width=mxClient.IS_QUIRKS?"36px":"16px";EditorUi.compactUi&&(c.getElementsByTagName("img")[0].style.left="24px",c.getElementsByTagName("img")[0].style.top="5px",c.style.width=mxClient.IS_QUIRKS?"50px":"30px");this.addSeparator();var d=this.addMenuFunction("geIcon geSprite geSprite-table",
-mxResources.get("table"),!1,mxUtils.bind(this,function(b){var c=a.getSelectedElement(),d=a.getParentByName(c,"TD",a.cellEditor.text2),h=a.getParentByName(c,"TR",a.cellEditor.text2);if(null==h)this.editorUi.menus.addInsertTableItem(b);else{var g=a.getParentByName(h,"TABLE",a.cellEditor.text2),c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex:0))}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");
-c.setAttribute("title",mxResources.get("insertColumnBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex+1:-1))}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=b.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{a.deleteColumn(g,d.cellIndex)}catch(k){mxUtils.alert(mxResources.get("error")+
-": "+k.message)}}),null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,h.sectionRowIndex))}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,h.sectionRowIndex+1))}catch(k){mxUtils.alert(mxResources.get("error")+
-": "+k.message)}}),null,"geIcon geSprite geSprite-insertrowafter");c.setAttribute("title",mxResources.get("insertRowAfter"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.deleteRow(g,h.sectionRowIndex)}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+mxResources.get("table"),!1,mxUtils.bind(this,function(b){var c=a.getSelectedElement(),d=a.getParentByName(c,"TD",a.cellEditor.text2),k=a.getParentByName(c,"TR",a.cellEditor.text2);if(null==k)this.editorUi.menus.addInsertTableItem(b);else{var g=a.getParentByName(k,"TABLE",a.cellEditor.text2),c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex:0))}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");
+c.setAttribute("title",mxResources.get("insertColumnBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex+1:-1))}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=b.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{a.deleteColumn(g,d.cellIndex)}catch(h){mxUtils.alert(mxResources.get("error")+
+": "+h.message)}}),null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,k.sectionRowIndex))}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,k.sectionRowIndex+1))}catch(h){mxUtils.alert(mxResources.get("error")+
+": "+h.message)}}),null,"geIcon geSprite geSprite-insertrowafter");c.setAttribute("title",mxResources.get("insertRowAfter"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.deleteRow(g,k.sectionRowIndex)}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(g.removeAttribute("border"),g.style.border="",g.style.borderCollapse=""):(g.setAttribute("border","1"),g.style.border="1px solid "+a,g.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");c.setAttribute("title",mxResources.get("borderColor"));c=b.addItem("",
null,mxUtils.bind(this,function(){var a=g.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){g.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=b.addItem("",null,mxUtils.bind(this,
function(){var a=g.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?g.setAttribute("cellPadding",a):g.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,"geIcon geSprite geSprite-fit");c.setAttribute("title",mxResources.get("spacing"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");
c.setAttribute("title",mxResources.get("left"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");c.setAttribute("title",mxResources.get("center"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");c.setAttribute("title",mxResources.get("right"))}}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.innerHTML='<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>'+
-this.dropdownImageHtml;d.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,c,d,b,f,e){var h=this.editorUi.menus.get(b),g=this.addMenuFunction(a,c,d,function(){h.funct.apply(h,arguments)},f,e);h.addListener("stateChanged",function(){g.setEnabled(h.enabled)});return g};
+this.dropdownImageHtml;d.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,c,d,b,f,e){var k=this.editorUi.menus.get(b),g=this.addMenuFunction(a,c,d,function(){k.funct.apply(k,arguments)},f,e);k.addListener("stateChanged",function(){g.setEnabled(k.enabled)});return g};
Toolbar.prototype.addMenuFunction=function(a,c,d,b,f,e){return this.addMenuFunctionInContainer(null!=f?f:this.container,a,c,d,b,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,c,d,b,f,e){c=b?this.createLabel(c):this.createButton(c);this.initElement(c,d);this.addMenuHandler(c,b,f,e);a.appendChild(c);return c};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var c=document.createElement("div");c.className="geSeparator";a.appendChild(c);return c};
Toolbar.prototype.addItems=function(a,c,d){for(var b=[],f=0;f<a.length;f++){var e=a[f];"-"==e?b.push(this.addSeparator(c)):b.push(this.addItem("geSprite-"+e.toLowerCase(),e,c,d))}return b};Toolbar.prototype.addItem=function(a,c,d,b){var f=this.editorUi.actions.get(c),e=null;null!=f&&(c=f.label,null!=f.shortcut&&(c+=" ("+f.shortcut+")"),e=this.addButton(a,c,f.funct,d),b||(e.setEnabled(f.enabled),f.addListener("stateChanged",function(){e.setEnabled(f.enabled)})));return e};
Toolbar.prototype.addButton=function(a,c,d,b){a=this.createButton(a);b=null!=b?b:this.container;this.initElement(a,c);this.addClickHandler(a,d);b.appendChild(a);return a};Toolbar.prototype.initElement=function(a,c){null!=c&&a.setAttribute("title",c);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var c=a.className;a.setEnabled=function(d){a.enabled=d;a.className=d?c:c+" mxDisabled"};a.setEnabled(!0)};
Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,"click",function(d){a.enabled&&c(d);mxEvent.consume(d)}),null!=document.documentMode&&9<=document.documentMode&&mxEvent.addListener(a,"mousedown",function(a){a.preventDefault()}))};Toolbar.prototype.createButton=function(a){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.className="geButton";var d=document.createElement("div");null!=a&&(d.className="geSprite "+a);c.appendChild(d);return c};
Toolbar.prototype.createLabel=function(a,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.className="geLabel";mxUtils.write(d,a);return d};
-Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var f=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(h&&(null==a.enabled||a.enabled)){f.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
-e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}h=!0;mxEvent.consume(g)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){h=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};
+Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var f=this.editorUi.editor.graph,e=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(k&&(null==a.enabled||a.enabled)){f.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var h=mxUtils.getOffset(a);e.popup(h.x,h.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
+e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}k=!0;mxEvent.consume(g)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){k=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};
Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=
-function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b=
-document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+q]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
-a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";
-h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var g=new jscolor.color(h);g.pickerOnfocus=!1;g.showPicker();var k=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";k.appendChild(jscolor.picker.box);var l=document.createElement("center");k.appendChild(h);
-mxUtils.br(k);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";k.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);var n=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;ColorDialog.addRecentColor(b,
-12);"none"!=b&&"#"!=b.charAt(0)&&(b="#"+b);n(b);a.hideDialog()});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(p);null!=c&&("none"==c?(g.fromString("ffffff"),h.value="none"):g.fromString(c));k.appendChild(m);this.picker=g;this.colorInput=h;mxEvent.addListener(k,"keydown",function(c){27==c.keyCode&&(a.hideDialog(),null!=b&&b(),mxEvent.consume(c))});this.container=k};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
+function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var h=document.createElement("tbody");e.appendChild(h);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b=
+document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),k.value="none"):g.fromString(a)}))})(a[n*b+q]);h.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
+a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";
+k.style.width="216px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));this.init=function(){mxClient.IS_TOUCH||k.focus()};var g=new jscolor.color(k);g.pickerOnfocus=!1;g.showPicker();var h=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";h.appendChild(jscolor.picker.box);var l=document.createElement("center");h.appendChild(k);
+mxUtils.br(h);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";h.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var p=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=k.value;ColorDialog.addRecentColor(b,
+12);"none"!=b&&"#"!=b.charAt(0)&&(b="#"+b);p(b);a.hideDialog()});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(n);null!=c&&("none"==c?(g.fromString("ffffff"),k.value="none"):g.fromString(c));h.appendChild(m);this.picker=g;this.colorInput=k;mxEvent.addListener(h,"keydown",function(c){27==c.keyCode&&(a.hideDialog(),null!=b&&b(),mxEvent.consume(c))});this.container=h};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");c.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(d);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);d=document.createElement("a");d.setAttribute("href",
-"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,f,e,h,g,k,l){k=null!=k?k:!0;var m,p,n=document.createElement("table"),q=document.createElement("tbody");n.style.marginTop="8px";m=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace=
-"nowrap";p.style.fontSize="10pt";p.style.width="120px";mxUtils.write(p,(f||mxResources.get("filename"))+":");m.appendChild(p);var t=document.createElement("input");t.setAttribute("value",c||"");t.style.marginLeft="4px";t.style.width="180px";var r=mxUtils.button(d,function(){if(null==e||e(t.value))k&&a.hideDialog(),b(t.value)});r.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():
-document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=n.parentNode,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=t,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")&&(t.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),r.click());a.stopPropagation();a.preventDefault()}))}};p=document.createElement("td");p.appendChild(t);m.appendChild(p);null==f&&null!=h||q.appendChild(m);null!=h&&(m=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(h),m.appendChild(p),q.appendChild(m));m=document.createElement("tr");p=document.createElement("td");p.colSpan=
-2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&p.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",p.appendChild(d));mxEvent.addListener(t,"keypress",function(a){13==a.keyCode&&r.click()});p.appendChild(r);a.editor.cancelFirst||p.appendChild(c);m.appendChild(p);
-q.appendChild(m);n.appendChild(q);this.container=n},TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,p){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var n,q,t=document.createElement("table"),r=document.createElement("tbody");n=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);n.appendChild(q);r.appendChild(n);n=document.createElement("tr");q=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap",
-"off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.width=h+"px";w.style.height=g+"px";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};q.appendChild(w);n.appendChild(q);r.appendChild(n);n=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");
-c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=k&&k(q);null!=b&&(k=mxUtils.button(p||mxResources.get("apply"),function(){l||a.hideDialog();b(w.value)}),k.className="geBtn gePrimaryBtn",q.appendChild(k));a.editor.cancelFirst||q.appendChild(c);n.appendChild(q);r.appendChild(n);t.appendChild(r);this.container=t},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";
+"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,f,e,k,g,h,l){h=null!=h?h:!0;var m,n,p=document.createElement("table"),q=document.createElement("tbody");p.style.marginTop="8px";m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace=
+"nowrap";n.style.fontSize="10pt";n.style.width="120px";mxUtils.write(n,(f||mxResources.get("filename"))+":");m.appendChild(n);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width="180px";var t=mxUtils.button(d,function(){if(null==e||e(r.value))h&&a.hideDialog(),b(r.value)});t.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==k)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():
+document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=p.parentNode,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=r,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")&&(r.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),t.click());a.stopPropagation();a.preventDefault()}))}};n=document.createElement("td");n.appendChild(r);m.appendChild(n);null==f&&null!=k||q.appendChild(m);null!=k&&(m=document.createElement("tr"),n=document.createElement("td"),n.colSpan=2,n.appendChild(k),m.appendChild(n),q.appendChild(m));m=document.createElement("tr");n=document.createElement("td");n.colSpan=
+2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&n.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",n.appendChild(d));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&t.click()});n.appendChild(t);a.editor.cancelFirst||n.appendChild(c);m.appendChild(n);
+q.appendChild(m);p.appendChild(q);this.container=p},TextareaDialog=function(a,c,d,b,f,e,k,g,h,l,m,n){k=null!=k?k:300;g=null!=g?g:120;l=null!=l?l:!1;var p,q,r=document.createElement("table"),t=document.createElement("tbody");p=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap",
+"off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.width=k+"px";w.style.height=g+"px";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};q.appendChild(w);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");
+c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=h&&h(q);null!=b&&(h=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(w.value)}),h.className="geBtn gePrimaryBtn",q.appendChild(h));a.editor.cancelFirst||q.appendChild(c);p.appendChild(q);t.appendChild(p);r.appendChild(t);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";
var d=document.createElement("textarea");d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();
a.preventDefault()},!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var f=document.createElement("select");f.style.width="180px";f.className=
"geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),
-f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),a.editor.graph.openLink(a.getUrl());else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==
-f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};
+f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),a.editor.graph.openLink(a.getUrl());else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==
+f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};
EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+p.value:a+"."+p.value;"xml"===p.value?(n.setAttribute("disabled","true"),q.setAttribute("disabled","true"),t.setAttribute("disabled","true"),w.setAttribute("disabled","true")):(n.removeAttribute("disabled"),q.removeAttribute("disabled"),t.removeAttribute("disabled"),w.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled")}
-function d(){q.style.backgroundColor=q.value*t.value>MAX_AREA||0>=q.value?"red":"";t.style.backgroundColor=q.value*t.value>MAX_AREA||0>=t.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,
-mxResources.get("filename")+":");f.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");f.appendChild(k);var p=document.createElement("select");p.style.width="180px";k=document.createElement("option");k.setAttribute("value",
-"png");mxUtils.write(k,mxResources.get("formatPng"));p.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),p.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));p.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));p.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),p.appendChild(k));k=document.createElement("td");k.appendChild(p);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");f.appendChild(k);var n=document.createElement("input");
-n.setAttribute("type","number");n.setAttribute("value","100");n.style.width="180px";k=document.createElement("td");k.appendChild(n);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");f.appendChild(k);var q=document.createElement("input");q.setAttribute("value",h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");
-k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("value",g);t.style.width="180px";k=document.createElement("td");k.appendChild(t);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var r=document.createElement("input");r.setAttribute("type",
-"checkbox");r.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px";
-k=document.createElement("td");k.appendChild(w);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(n,"change",function(){var a=Math.max(0,parseFloat(n.value)||100)/100;n.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),t.value=Math.floor(g*a)):(n.value="100",q.value=h,t.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(n.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(g*a)):(n.value=
-"100",q.value=h,t.value=g);d()});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value)/g;0<a?(n.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(n.value="100",q.value=h,t.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var v=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(n.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
-m.value,d=p.value,e=Math.max(0,parseFloat(n.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));v.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst?(k.appendChild(u),k.appendChild(v)):(k.appendChild(v),k.appendChild(u));f.appendChild(k);
+var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),w.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),w.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}
+function d(){q.style.backgroundColor=q.value*r.value>MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,k=Math.ceil(f.width/e),g=Math.ceil(f.height/e),h,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";h.style.width="100px";mxUtils.write(h,
+mxResources.get("filename")+":");f.appendChild(h);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";h=document.createElement("td");h.appendChild(m);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("format")+":");f.appendChild(h);var n=document.createElement("select");n.style.width="180px";h=document.createElement("option");h.setAttribute("value",
+"png");mxUtils.write(h,mxResources.get("formatPng"));n.appendChild(h);h=document.createElement("option");ExportDialog.showGifOption&&(h.setAttribute("value","gif"),mxUtils.write(h,mxResources.get("formatGif")),n.appendChild(h));h=document.createElement("option");h.setAttribute("value","jpg");mxUtils.write(h,mxResources.get("formatJpg"));n.appendChild(h);h=document.createElement("option");h.setAttribute("value","pdf");mxUtils.write(h,mxResources.get("formatPdf"));n.appendChild(h);h=document.createElement("option");
+h.setAttribute("value","svg");mxUtils.write(h,mxResources.get("formatSvg"));n.appendChild(h);ExportDialog.showXmlOption&&(h=document.createElement("option"),h.setAttribute("value","xml"),mxUtils.write(h,mxResources.get("formatXml")),n.appendChild(h));h=document.createElement("td");h.appendChild(n);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("zoom")+" (%):");f.appendChild(h);var p=document.createElement("input");
+p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";h=document.createElement("td");h.appendChild(p);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("width")+":");f.appendChild(h);var q=document.createElement("input");q.setAttribute("value",k);q.style.width="180px";h=document.createElement("td");h.appendChild(q);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");
+h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("height")+":");f.appendChild(h);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";h=document.createElement("td");h.appendChild(r);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("background")+":");f.appendChild(h);var t=document.createElement("input");t.setAttribute("type",
+"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;h=document.createElement("td");h.appendChild(t);mxUtils.write(h,mxResources.get("transparent"));f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("borderWidth")+":");f.appendChild(h);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px";
+h=document.createElement("td");h.appendChild(w);f.appendChild(h);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<k?(q.value=Math.floor(k*a),r.value=Math.floor(g*a)):(p.value="100",q.value=k,r.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/k;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(p.value=
+"100",q.value=k,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(k*a)):(p.value="100",q.value=k,r.value=g);d()});f=document.createElement("tr");h=document.createElement("td");h.setAttribute("align","right");h.style.paddingTop="22px";h.colSpan=2;var v=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
+m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));v.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst?(h.appendChild(u),h.appendChild(v)):(h.appendChild(v),h.appendChild(u));f.appendChild(h);
l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,c,d,b,f,e){var h=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(b,f,e)),c,d);else{var g=h.getGraphBounds(),k=mxUtils.createXmlDocument(),l=k.createElement("output");k.appendChild(l);k=new mxXmlCanvas2D(l);k.translate(Math.floor((e/f-g.x)/h.view.scale),Math.floor((e/f-g.y)/h.view.scale));k.scale(f/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
-k);l="xml="+encodeURIComponent(mxUtils.getXml(l));k=Math.ceil(g.width*f/h.view.scale+2*e);f=Math.ceil(g.height*f/h.view.scale+2*e);l.length<=MAX_REQUEST_SIZE&&k*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+k+"&h="+f+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+ExportDialog.exportFile=function(a,c,d,b,f,e){var k=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(k.getSvg(b,f,e)),c,d);else{var g=k.getGraphBounds(),h=mxUtils.createXmlDocument(),l=h.createElement("output");h.appendChild(l);h=new mxXmlCanvas2D(l);h.translate(Math.floor((e/f-g.x)/k.view.scale),Math.floor((e/f-g.y)/k.view.scale));h.scale(f/k.view.scale);(new mxImageExport).drawState(k.getView().getState(k.model.root),
+h);l="xml="+encodeURIComponent(mxUtils.getXml(l));h=Math.ceil(g.width*f/k.view.scale+2*e);f=Math.ceil(g.height*f/k.view.scale+2*e);l.length<=MAX_REQUEST_SIZE&&h*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+h+"&h="+f+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function d(){0<r.value.length?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var g=new mxForm("properties");g.table.style.width="100%";for(var h=e.attributes,k=[],l=[],m=0,p=function(a,b){var c=document.createElement("div");c.style.position="relative";
+var EditDataDialog=function(a,c){function d(){0<t.value.length?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",e||"");e=k}var g=new mxForm("properties");g.table.style.width="100%";for(var k=e.attributes,h=[],l=[],m=0,n=function(a,b){var c=document.createElement("div");c.style.position="relative";
c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin="0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);
-e=function(a){return function(){for(var b=0,c=0;c<k.length;c++){if(k[c]==a){l[c]=null;g.table.deleteRow(b);break}null!=l[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},n=function(a,b,c){k[a]=b;l[a]=g.addTextarea(k[m]+":",c,2);l[a].style.width="100%";p(l[a],b)},q=[],t=0;t<h.length;t++)"label"!=h[t].nodeName&&"placeholders"!=h[t].nodeName&&q.push({name:h[t].nodeName,value:h[t].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:
-a.name>b.name?1:0});for(t=0;t<q.length;t++)n(m,q[t].name,q[t].value),m++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";h.appendChild(g.table);n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.marginTop="6px";var r=document.createElement("input");r.setAttribute("placeholder",mxResources.get("enterPropertyName"));r.setAttribute("type","text");r.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":
-"22");r.style.marginLeft="2px";n.appendChild(r);h.appendChild(n);b.appendChild(h);var w=mxUtils.button(mxResources.get("addProperty"),function(){var a=r.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(k,a);if(0<=b&&null!=l[b])l[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(k.splice(b,1),l.splice(b,1));k.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);p(c,a);c.focus()}r.value=""}catch(A){mxUtils.alert(A)}else mxUtils.alert(mxResources.get("invalidName"))});
-this.init=function(){0<l.length?l[0].focus():r.focus()};w.setAttribute("disabled","disabled");w.style.marginLeft="10px";w.style.width="144px";n.appendChild(w);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<k.length;d++)null==l[d]?e.removeAttribute(k[d]):(e.setAttribute(k[d],l[d].value),b=b||"placeholder"==k[d]&&"1"==
-e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});n.className="geBtn gePrimaryBtn";mxEvent.addListener(r,"keyup",d);mxEvent.addListener(r,"change",d);q=document.createElement("div");q.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){t=document.createElement("span");t.style.marginRight="10px";var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});t.appendChild(v);mxUtils.write(t,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){v=document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);
-v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="10px";v.style.cursor="help";var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("valign","middle");u.style.marginTop=mxClient.IS_IE11?"0px":"-4px";u.setAttribute("src",Editor.helpImage);v.appendChild(u);t.appendChild(v)}q.appendChild(t)}a.editor.cancelFirst?(q.appendChild(h),q.appendChild(n)):(q.appendChild(n),q.appendChild(h));b.appendChild(q);this.container=b};
+e=function(a){return function(){for(var b=0,c=0;c<h.length;c++){if(h[c]==a){l[c]=null;g.table.deleteRow(b);break}null!=l[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},p=function(a,b,c){h[a]=b;l[a]=g.addTextarea(h[m]+":",c,2);l[a].style.width="100%";n(l[a],b)},q=[],r=0;r<k.length;r++)"label"!=k[r].nodeName&&"placeholders"!=k[r].nodeName&&q.push({name:k[r].nodeName,value:k[r].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:
+a.name>b.name?1:0});for(r=0;r<q.length;r++)p(m,q[r].name,q[r].value),m++;k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";k.appendChild(g.table);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.marginTop="6px";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("enterPropertyName"));t.setAttribute("type","text");t.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":
+"22");t.style.marginLeft="2px";p.appendChild(t);k.appendChild(p);b.appendChild(k);var w=mxUtils.button(mxResources.get("addProperty"),function(){var a=t.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(h,a);if(0<=b&&null!=l[b])l[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(h.splice(b,1),l.splice(b,1));h.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(A){mxUtils.alert(A)}else mxUtils.alert(mxResources.get("invalidName"))});
+this.init=function(){0<l.length?l[0].focus():t.focus()};w.setAttribute("disabled","disabled");w.style.marginLeft="10px";w.style.width="144px";p.appendChild(w);k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});k.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<h.length;d++)null==l[d]?e.removeAttribute(h[d]):(e.setAttribute(h[d],l[d].value),b=b||"placeholder"==h[d]&&"1"==
+e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});p.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keyup",d);mxEvent.addListener(t,"change",d);q=document.createElement("div");q.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";var v=document.createElement("input");
+v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});r.appendChild(v);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){v=document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);
+v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="10px";v.style.cursor="help";var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("valign","middle");u.style.marginTop=mxClient.IS_IE11?"0px":"-4px";u.setAttribute("src",Editor.helpImage);v.appendChild(u);r.appendChild(v)}q.appendChild(r)}a.editor.cancelFirst?(q.appendChild(k),q.appendChild(p)):(q.appendChild(p),q.appendChild(k));b.appendChild(q);this.container=b};
EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
-"text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";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=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
-0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});e.appendChild(h);e.appendChild(c);f.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
-b(h.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);d=mxUtils.button(d,function(){a.hideDialog();b(h.value)});d.className="geBtn gePrimaryBtn";e.appendChild(d);a.editor.cancelFirst||e.appendChild(c);f.appendChild(e);this.container=f},OutlineWindow=function(a,c,d,b,f){function e(){l.outline.pageScale=h.pageScale;l.outline.pageFormat=h.pageFormat;l.outline.pageVisible=h.pageVisible;l.outline.background=null==
-h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;var a=mxUtils.getCurrentStyle(h.container);g.style.backgroundColor=a.backgroundColor;null!=h.view.backgroundPageShape&&null!=l.outline.view.backgroundPageShape&&(l.outline.view.backgroundPageShape.fill=h.view.backgroundPageShape.fill);l.outline.refresh()}var h=a.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.border="1px solid whiteSmoke";
+var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type",
+"text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";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=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
+0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});e.appendChild(k);e.appendChild(c);f.appendChild(e);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(k,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
+b(k.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);d=mxUtils.button(d,function(){a.hideDialog();b(k.value)});d.className="geBtn gePrimaryBtn";e.appendChild(d);a.editor.cancelFirst||e.appendChild(c);f.appendChild(e);this.container=f},OutlineWindow=function(a,c,d,b,f){function e(){l.outline.pageScale=k.pageScale;l.outline.pageFormat=k.pageFormat;l.outline.pageVisible=k.pageVisible;l.outline.background=null==
+k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background;var a=mxUtils.getCurrentStyle(k.container);g.style.backgroundColor=a.backgroundColor;null!=k.view.backgroundPageShape&&null!=l.outline.view.backgroundPageShape&&(l.outline.view.backgroundPageShape.fill=k.view.backgroundPageShape.fill);l.outline.refresh()}var k=a.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.border="1px solid whiteSmoke";
g.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),g,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var k=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",k);var l=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",k);this.window.destroy();l.destroy()};this.window.addListener(mxEvent.RESIZE,
+document.body.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 h=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",h);var l=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",h);this.window.destroy();l.destroy()};this.window.addListener(mxEvent.RESIZE,
mxUtils.bind(this,function(){l.update(!1);l.outline.sizeDidChange()}));this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){l.suspended=!1;l.outline.refresh();l.update()}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){l.suspended=!0}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){l.suspended=!1;l.update()}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){l.suspended=!0}));var m=l.createGraph;l.createGraph=function(a){var b=
-m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=h.pageScale;b.pageFormat=h.pageFormat;b.background=null==h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;b.pageVisible=h.pageVisible;var c=mxUtils.getCurrentStyle(h.container);g.style.backgroundColor=c.backgroundColor;return b};l.init(g);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",
-function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var p=a.actions.get("zoomIn"),n=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?p.funct():n.funct(),mxEvent.consume(a))})}},LayersWindow=function(a,c,d,b,f){function e(b){if(g.isEnabled()&&null!=b){var c=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),
-mxUtils.bind(this,function(a){null!=a&&g.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var f=document.createElement("div");f.className="geToolbarContainer";f.style.overflow="hidden";f.style.position="relative";f.style.padding="4px";f.style.height="22px";f.style.display="block";f.style.backgroundColor="whiteSmoke";f.style.borderWidth="0px 0px 1px 0px";f.style.borderColor="#c3c3c3";f.style.borderStyle="solid";
-f.style.whiteSpace="nowrap";var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(f,"dragover",function(b){b.dataTransfer.dropEffect="move";n=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){p=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(f,"dragend",function(a){null!=p&&null!=n&&g.addCell(c,g.model.root,n);n=p=
-null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var r=g.view.getState(c),u=null!=r?r.style:g.getCellStyle(c);"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,
-"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";
-l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);f.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position=
-"absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<q-1&&(k=document.createElement("a"),k.setAttribute("title",
-mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",
-function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="#e6eff8",f.style.fontWeight=g.isEnabled()?"bold":"",t=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
-b));w.setAttribute("title",mxResources.get("removeIt",[t.value||mxResources.get("background")]));v.setAttribute("title",mxResources.get("moveSelectionTo",[t.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("duplicateIt",[t.value||mxResources.get("background")]));u.setAttribute("title",mxResources.get("renameIt",[t.value||mxResources.get("background")]));g.isSelectionEmpty()&&(v.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect=
-"none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":"#e5e5e5";m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";k.appendChild(m);
-var p=null,n=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";n=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,t=null,r=document.createElement("div");r.className="geToolbarContainer";r.style.position="absolute";r.style.bottom="0px";r.style.left="0px";r.style.right="0px";r.style.height=l;r.style.overflow="hidden";r.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";r.style.backgroundColor=
-"white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;r.style.borderWidth="1px 0px 0px 0px";r.style.borderColor="#c3c3c3";r.style.borderStyle="solid";r.style.display="block";r.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(r.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();
-try{var b=g.model.root.getIndex(t);g.removeCells([t],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");r.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
-mxEvent.addListener(v,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,t)});r.appendChild(v);var u=l.cloneNode();u.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';u.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(u,"click",function(a){g.isEnabled()&&e(t);mxEvent.consume(a)});g.isEnabled()||(u.className="geButton mxDisabled");r.appendChild(u);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
-mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCells([t])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");r.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));
-mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");r.appendChild(l);k.appendChild(r);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?v.className="geButton mxDisabled":v.className="geButton"});
-this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=h;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)-
+m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=k.pageScale;b.pageFormat=k.pageFormat;b.background=null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background;b.pageVisible=k.pageVisible;var c=mxUtils.getCurrentStyle(k.container);g.style.backgroundColor=c.backgroundColor;return b};l.init(g);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",
+function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var n=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?n.funct():p.funct(),mxEvent.consume(a))})}},LayersWindow=function(a,c,d,b,f){function e(b){if(g.isEnabled()&&null!=b){var c=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),
+mxUtils.bind(this,function(a){null!=a&&g.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function k(){function a(a,b,c,d){var f=document.createElement("div");f.className="geToolbarContainer";f.style.overflow="hidden";f.style.position="relative";f.style.padding="4px";f.style.height="22px";f.style.display="block";f.style.backgroundColor="whiteSmoke";f.style.borderWidth="0px 0px 1px 0px";f.style.borderColor="#c3c3c3";f.style.borderStyle="solid";
+f.style.whiteSpace="nowrap";var h=document.createElement("div");h.style.display="inline-block";h.style.width="100%";h.style.textOverflow="ellipsis";h.style.overflow="hidden";mxEvent.addListener(f,"dragover",function(b){b.dataTransfer.dropEffect="move";p=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){n=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(f,"dragend",function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=
+null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var t=g.view.getState(c),u=null!=t?t.style:g.getCellStyle(c);"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,
+"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});h.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";
+l.style.marginTop="4px";h.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(h,b);f.appendChild(h);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position=
+"absolute",b.style.right="6px",b.style.top="6px",0<a&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toBack")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<q-1&&(h=document.createElement("a"),h.setAttribute("title",
+mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",
+function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="#e6eff8",f.style.fontWeight=g.isEnabled()?"bold":"",r=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),k())});m.appendChild(f)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
+b));w.setAttribute("title",mxResources.get("removeIt",[r.value||mxResources.get("background")]));v.setAttribute("title",mxResources.get("moveSelectionTo",[r.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("duplicateIt",[r.value||mxResources.get("background")]));u.setAttribute("title",mxResources.get("renameIt",[r.value||mxResources.get("background")]));g.isSelectionEmpty()&&(v.className="geButton mxDisabled")}var g=a.editor.graph,h=document.createElement("div");h.style.userSelect=
+"none";h.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;h.style.border="1px solid whiteSmoke";h.style.height="100%";h.style.marginBottom="10px";h.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":"#e5e5e5";m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";h.appendChild(m);
+var n=null,p=null;mxEvent.addListener(h,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(h,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,r=null,t=document.createElement("div");t.className="geToolbarContainer";t.style.position="absolute";t.style.bottom="0px";t.style.left="0px";t.style.right="0px";t.style.height=l;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";t.style.backgroundColor=
+"white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();
+try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");t.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
+mxEvent.addListener(v,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,r)});t.appendChild(v);var u=l.cloneNode();u.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';u.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(u,"click",function(a){g.isEnabled()&&e(r);mxEvent.consume(a)});g.isEnabled()||(u.className="geButton mxDisabled");t.appendChild(u);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
+mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCells([r])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");t.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));
+mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");t.appendChild(l);h.appendChild(t);k();g.model.addListener(mxEvent.CHANGE,function(){k()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?v.className="geButton mxDisabled":v.className="geButton"});
+this.window=new mxWindow(mxResources.get("layers"),h,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=k;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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeKNzGAFJgWOKBdVznGCrFreM/HKITETdyKkM/N9DIDf2cRv0kkURtlU9wqmbZi0/PyWLbc1lyFPVML+0A1ISRx9xkOHMcnWTLiNmB8o4kjikjlm8b+zuQa+bh2qVmG/Gis+HAYE2zZHj9dAqLgPvJXahkWNuP0g0zcIlzrGtpFoK369Qp4fI78Vsse53lGDRGrMlOTTcK/GLUGcjKBk0xzyUesPi+L0VaKqwwAyJsZa1QTJg91Gn6b9BZebsYZ4EWlt2PIafME3WhvvJUC5Te5e2Njdi/n1Ck0qQDos8HmD1qimQAitlmqT6ctQuZDXuvnbYFeZDs2aGrHO/ahjiEB4oTQTESnp0FepuPqhLWeNGFz7OU3sdshlglzYxrUSzgBfmUpPpU8LfSSohuypUtyJVgTLzrapCYpy/3+DL1HLo4Th1tUbgDZjTrfLmYw6DMgpLG2I0PG/UXEiQW/NOdmUJieZWIW7X2uGxpS6pFOc56RJq59+ZiCutggPcaHoJq215aQnIhaXijIqAeoxY7hd6Pc9k/OvTeBi2SZ1U2lbpyNMkVUe2s1qpcEWpG5OW6/NQdOd1ghkTpgtRg1wd2O6nlP+f9Z8vZxfwynOo0yIS1pbu8OYu/Ocu/NVvUEv/5QzTGH+Y/OUEhn0BCXOdv2nZeStgGca+Qv6L7k7ply5yV/GeD8QLo1fUJVis52OdLdW54KDcdgnh5SdDsZ1NSMYB+OZKdzeemUTU5L0JH3kifOr+pplSdm3E9EwTKCDlNXeHjlznnbgWmcIlpZ0X/QQUdT2COw2+VZ0Kd6fBVlGvct2JMGdqdWQlzxMsG9Lo4HwchpO8t1pWzpe2cgxAAVrpeJrPA7zNF9SNx/N87cjBBXSnvLwsp4dPfK3sokXMwDiMauCrQEoVB2i9Bey9fj1h7/HRJWrVmXWaWeIi7ipTkTAdgiPDQphRZj22Bi7lq0fTbl2h0w0Tqg9OxgJ1nM/N6pIbiuZFE7liXfNo+vgERvfzSXkOrzSvVyFHBcuMJ6842apogGJHR51E2SWhBdl+REqP2OxKZIIDgS1TvqL5thqqCp6rgOvhBuYDTzwWmGsXEa71wwPk6zVcaZ47FkIjrJ6EqIZWLa7GMGIMmfmrW7EkNyArDMx8JmnhXlRB+321oo7PVnGvtapXsMwFw7kK/T2OSkWUpKp6+rYKrf/QRJeC6XD9w7ZpIF8CKtBcndvXI4uwewNXTBbHgYD5lo7YSR8sXymxhuVQrDNd4QtSB57RDp0K6Mm0O58nzb3DPoRyycB6JGn8MI7Anx2JPz8S/7kvXgpa79KqQ9HSTcBQ/4Dq0CotVVIe+nbu0/xkKWrPqZS05LyFLzx75yLJzx01EPRQJJW0vr5Ab1tYrMEaHdBdYnvoZrEA9Gg9ZohAmVtHhi359DlmAzyd92ievajkqEH/qHu+GnJYvo0JiMiv9m2vyT6h9WtStVreDrmUaYqylUmW9stWHl2ZhEr0QArLCm8gZwSuUij6ur3sc1PQFH7uT92evohejWaqqiltuElXXLmm/j+A3FjIVhsDuAQF1ydoG5BfGf87K1xIBdNpVK4S5xSjiyiSqXUn+oTtLzTmgdat7X4fNUyTY5imMgjIJXajR7XrgFU4I1Yj9z1PktyDoh1a69DRhEJPs9MSNoQvnJbIC5I5i82MfOy0OrWPXxSlbhwbwJ6vXeg7gIOHiil9HgQiTuwsYHWjr8NPeuOloiEoiV5XaDXoLAyNw1gWeda9L4NqX7NyvM/wpG3jZMXLa0aqbhGSsAFn0UuozURaL35jQQYGiTYcOKvsWCqRo2sRiYS26NxI6cPaVypx9ktnQdhXoNENLhtzM0/kZ3aeyLjHkczYqnhzu9ph/Z6liSi5G+P6TyFokoHR3FRfd9ie9YiCNrGY5SezVumCvRCoMEGUr5BFNCpS1oeBfqvWtnoQpKSAWhFK3EnQpJrNw+T0/cv401zY3LzE1TG/bT23nQQGnZGvh73YYAcmnIx/bsw2i+oq1JX6WLqFriXpUPlYSTZEfrYSf1BG9KKdg180DntLtdt48jVOf1iCvzLhveoeWqIBnV8syacIb5f7q8qNJMaS60e0sM8le6A9vkYOrShobmsmEhgugo691r1yQrtqXCtFI4+uD6aMOhRWwTjHybOe4lhwLxn0ANpM+Z2Yib+G2aAcpGvuSvAABIZafAJ2Et22IcEVW4us6wfq+C6S7kDBQsCcas+wbYINImS/0R7YcrQGi10FbJvU4Ua6m3mxj9J+pQVnCqd2rEttYr9oSL+eB7bmXeu/IU+ZTzZPf+Ir4x9kPrpAF1cLSNL6C1tPo2LHhSPNww7N3t7JPmyTMb3VZPywRzZoIt+enuYfnYbdoTEY6187mW23DfShmYyLPT4DEf5l0UfT/bwu08B8uRnq9mGCZWRP+GSoDsZpvH57U5ppvhet7F6MNzSYt1dTGkgx8LsuqYaeVNrCuL+tIwxz53URloZcHchRr/00+20P07A7cftJPgO3BzSObqMkNTPyh4nQhoxi6C+Kh7umeGXIdYrzyrTE4d5rV+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg837JK1nNA2OOekn+dT/fCb2WwBbrLizezlPixWZ8bSBMBkfKP5KGDE8MncwhpdhPvfPzKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvPK59fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hI4CU1LD5pjsLmKV+V7LRWsksxg1IcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng/2Y6I//yONAG9BDsy/0hb98H4T2Hv7QJtJBMyPfgD54Nn9XzMNV9SGpaSsqKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIARPglobh11LlMYfykB2l7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCsCUTpGAQ6tuLe/08bUXGeA7Ms1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjECUbNApnkPOgUeM/X3eCrRwyjB44eY2kUW34pDKElvowWzyKrfPim8g6prYrSdGFbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWAbhqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgtxO0xUsg9OYDJGlyEbzSFpS1HaoA990z06HU8knhzZKFZAVIpoVV/L92CjS6WtHnxx8r5FZ4xmPbZPYSMdQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRiF2Sk8FlPjIwyemeTOGHtHJCIiCOR0sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEra2FrFD0fVEJwXKwldJ25PbrDKdG6T+y2FbhlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPBLSTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiypwg8lxB5eMgqVVuZanqbKm6MWRxY9lBCxLhk9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPG5yYKpu6aZ3cv+m5HAb00cnVgRBzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C0URSHz/MioFee56VEdMY8L6Zn4/H4j64J+jq/IUgmzp+b6y6wEYxlgxIykG1Rnohhky3pFde0sAJNcHzJEg7bJCks5iZrXimpI5rC90ezHIe2hvdxLPtLT+vGRajDkGp7CYT67+hf/B0KezcseyPicb7Q//TPKq5zGD7AVEZwdULma3qeVjJ2S57b61YwSp+Hph8BE1dXDgpQOjcGb+4p2SrbAdM3KdPcbjaf3VnymLd5WP3beUk+j7fsaqrn9TkFJPQrFsNcGBZy1fn98ihC1q+7DaDQ1oZqouwycRukFLu3dNmOgkittj46JoQQiBge6qE3zdklpmeydmfxSwdGCKWYi9Gw3aQOW5ZhVeZyJcFB35Yvc2AIX5xYT8lmDuyBqGnbgCttmK3uIAKaf9iKlahB3CBCP+hRsMARW0IkMy8dzS7A6PXFWtBxF0yb1JJOhojg6IqKWFkNZDzMIFCirvAwwaIr7K+WkNhVLLocKNmlbjNx2x6lKob77NeplWVXkmbJ2kgP6LoxmMDQJnrgRQixmXBHdhgHEO11GMbJcYxPF0YqWeLWYzXYy6PrBOx6MQuYNYk40E8+lv7so+hhS5RdIZybEIxJ7RrQAY/HYuYJYxPmN93Ro2mOpaLKnJtIDclkCBLIdnpKBu809V/B2YEQ9rFnzXF120k+DyHVvWn16MhY4oLxfZEUdGfgX8JJf4YhBSXl2riksJ0fl+Yc48rnacYyEc5p+kJbKDRMIc8YJ5TJ09OQexsW4VeTUzoFaZFHC9vWOfu40N3JzE/yubPiqi/fPEs25XHeA/R8EazqB3igGIZaadjY2JH9+y67VkgNe3SbuSkWPY1MtR4aXPYK/r7SC+6df/o6upieXkyJMbcictOiI9GslqgwW9z5ZkOSYUybzp1tCT0ZXwoa49uuqi/bZWEsrawB1RVvovH2ws8u9jK2wqZ0J6uoPkfyHdSigq/G1G2hFKsVV/nu8OOqwlXkqfcYV+Ujr4MSNvBv4piSv5N90S+6GISHsyroG8kqHFXr0GiLkSlkrztjR7cWaQxpYQKduHV8lTxnA/F8PoaHds5r9cvtqwllZuaP5Jr04rKxrai0aiNdteNB6XEtitG9YVy6dGx/u3UO7+rqXgt8BIeZbHRmSDrxBfxX7ozPnDnQxIkSZtd4ALvjNdHoOktsECndRI7iwMLi3LlRVZLgaGiZyIC7t85KovOjpLkNggwW7MwhRJdZAPMhwn4LrDY4HH4u6YFOaWCQOcp6yyXKyXaX2jBOBmREmsMMILbD/OiTDw8ch6gm5l5rEsfQm0o6QBIyWfE0gbKjyxM4p6UhNEcFdjSjpRyY14cFqO+L6ytY9Xg42RmGgd0b7Qfb70kNm9lKo61e1DnZ7XQgYXcZB5UR1hDw/AxdgV+HFHW+R3ysxA+nFlYqrk8nDQPyXoyTwRnPBmc8H5zx8+CMX45hnNeVde1ESC/GyeCMZ4Mzng/O+Hlwxi/9GaEI+vYPk8F1Qg3jETqhhvEInVDDeIROqGE8QifUMB6hEyaD64QaxiN0Qg3jETqhhvEInVDDeIROqGHsoxNknMoXM58ZCS8ZfcX127U5iH2Wh61O+Fvt8V59WXNf/tm8lILPPRGSP8XhGV1Oqf1Z8w6RqHUU6Eu6+womgePf4O5qtjcK46FI7Xmfh4sMHUgnA5MC1SnzUnR9wVj7UwjOkHgUfiQwR7Tlnl8wxY6ztXuTfE6pfddfnHoyi8mDDH4v7vqVK1Li6qZIaAYNHtn5oh/xfCNTabM1hpvqbK7le9GjQwwIhWPQ3eXYDmuvceC9BMz3uYIjmnUBfc/SOLNRNdvOdnYimvQmGkCW3lLAHouXRLcBs6wtjQtO6YtjuEY3T9+L5tDeEMz8W5rhMRpytYKbzbsytdA52dubqe2n7RkdmJbhR7+g1HxX4u/+fiahyYcn9IBud7c3l8V7JVmwm9pSxJIO16tsuv3SmvwX0zr7L6Z1/rFpzR/m/7Xy2knrg8trJ60PLq+dtD64vEBF2cjozv119wQmH5jArfXCwy1oVdqmnlFxyjr09OTdev1ErHWH/JLkcYfpqh98hCu2C8vAYC3RTAF75tSxHqSzEqk5mQOXy4dknXwI69lArM8YbPtNBmlb7O4GDlzfPZpj0p0k3cA+LbApXyhkLjoaNZ1d40BB1qnx4LbGaaVDdyVfrm6SOuXjit+Ztvhn5XTSf1wnqVpoJwPQzqul7TrsbqHsMyOyZW8c1qjRj9lcN2KFTL6OQInikrRX6yS+//ToApuTp3ibs0IZg4FVMCYjRjJIRUgRfEIR+U3L1iWOS4pZo3iMDlXOmK3ZLat01ZcZaXk4OMWRAEbHyQbdepby8BD7ShA1JGaiyXR7SylfMSnZdCJ3BQxEKyITQKzeRvfFMlYJvjKn3KVSBlWvWQOdsoBHvomT7l4dphsME+CLxMuSuvNoKoG79cfmsANQhrpFYVgNXzSPEXdQaKTQuBCnSsyR43ownoqKMwoqSTDc2X/YG3NN1pw20RyYrxLIjY+CrnKyRXeUYcWhIJ6MnRuXhWGHVFDELGnyJNkh2OKMnw11g4Ygd622V/bY+cn4H1dhnL7j7ss8brDizK2Jl3lM2GFgyqJKhjqSd7TIMX64iWZRLOk3nS1T4rgOWLLZceFwTf1aBqRfpFqzSPx2LnkCGte1ljM3dmDKaNXIxFtn+wc41SBvWIalAw242V4ogwI6tnGtP2t3cB6gvnE6eWjDtSVdtxPoECVRszSFIjnA3JXcTA6dXOigrHLNaKWLMDhbOXaomxw2eFN+ylHr5p9d9CuOxmLmGzVbeTBsNVa+klvSjTkTqSZcfA3+3kSKz1svt42yCP7eRpFjPepdikOenMHJjgyGxwFdjlPyJskyh+TpZEut1OQ6EnkQdyXa+IozQvPFCzdBJG2YyE/Ii/6HPnXBRNJ0uWmmlq08CcyoPgu+5XRoBzo61vWBMqbth22kb6Bj8RyhXGExPDHH+QUfJHYtekSFORtmCfouAkUgKs6QOyD4rm2dKD8L7M7E1dLGLK49KZlHcKjM+SpG3MZEGyx4hVFZh1IcnZ+9vQx0MDOq6cQb80Ba44HuJMQjz7vdleIJncQXc6z1iqfK4e0fi+cLipzVkYIe6y/Eopxp1fm6n58eur+vuTmvpZJ1Q2EGs9i8j1OeLvRQISZVOKX+Z5k5V++F7oTNWW0p6RITC84nS6kNrkcM+b7oxu3jh9AUc0JVO2XWgmS8LaJxtljmNQwHAxZfsZqzfA/hGTZVbKaOtlcVjTndDjV3w2Elhzh5MDZwwylt6Hm4CV33De8U3XYpnPv5H3HnavmDgt3AYbLMhv5gnlv3lkckbNf/u83PgdQsSMuMuoOKyNBV4J8soGhI1LbM8NwBJ66h7y1t+W6BYdiHqT0vsDhC0AlmZix3gmrStI6LSYccnQd0hCJtYU/oc4Fc/YrJWLGg1pJAmDnLt0tKd7rWGv1o8zUxh0e5ETzarPB5q0d+CWVsoi6iLuyZYf/4JpX4DU0mgKFhzXlhDjzP0Ga8niw42wdtd8MrzPIaUDe9jhhUL035tEYAnVM4Yj5s/RIJ8dccDVqB88zUEW3lzqeRHHAKxmbB6EEPPU+1HfV2sjO5507QBwvHclIoEjydTFtegtsjbu1nO0sxrWQuXVAwowseJnbKxVy6QPVzGUm9zNIUp160/j6hKMPgQ6Z/hwalvzSWRkjftNAaNZfgfq0LU2Pi3CDuSPCNNFBX/A03PRrO1PIUNZfpqk5aOqdKQjMYtaZAMSBsFkZXCFwOYUtYqG2JVRXjYYixMOe0Fhu88o5CSRNpm0drEXGudhtwmWkyHNWIwZ5Os7JjryE/U6F7s0qrrAI7urBIrfOmSibJ6SVnIYYAgztQFFXn0TqwXcMi+OllwPDA1znz/QCn6xri2N4UlHHMtCrUbcG5HRVgDPokVhlNExR37UAZxnAooglbkd91AdLa8IUwEQsKhk6rxPukU/sSuDOnxDsZn+r/T5laCjzNdqbHl+SdqdrWpPbSeDl9EYns+N4qSzYQZ26ta6qJU4zfnZTPBcMf7SfFPCKcG+doCt+gJQJZe2OTgvDBNok9wlqBda7QLCpe4Od70xAGMNQWi1YJ7yYbfRZKqNGVWfkDcaVpGhfTP/pUiCbKGVK6L8KX+TDcNBtGth2uPkKtOLcT3XjVWqS0ldtxU3cJMLoTf2cCD2MlnBb4UkjcNEt231I0x/Qgsnyktcp9dFsggdy+JDxKrB9j5NLUNpylL/wXLEGv6XXzmxOcOk/zC3eW0bX4Rb7AqWJmt+ZTtuSwR/gbME3GV6VU0mzZrlL2kzjggZ5G4smcmNQfQxJfw/jEL94CFMY1iwZNYz+vepP/gIzfsLgscO9s77VzHYChrgJYn/DC8fHRbXR6Rz3Oo9QjF3Cwvzd4EQVt/vuVRAuwg7zuRGRQlYiOxePknteJIiMPcPh0e1j3tj7OIxmIXzGptINKOFpEVmeYm9bEEl2/9Nu9mN6YDoSxvWYz9A2Oh8axD125AkYzmS1xpgwCcCqOu4ifmF0qS5mggacnILxwy2tbTsRjc362whzHdbQsureQMv1jCKJSPkH02qE4oR8DSqlHkuHApI9Srj6AUn/A2HJgod/0YNIfkotq4mDlPxPaePWHzNUdRpL2QyrENQswYMaQlIG0kTMGy449ziOKTzHv1cQjtSGipyxlwTuuw9rRbh4a7Ww8GeuPFU2bwNazDd8GPCX3G++VfDMGSuvTsWl1BYHbLB24s8bTzSIaNOQn/b2HS5wxM79X40csgk14OI0Rme14qcwUrRLTVVj+sZlmhIEVZnJtzi1bCt9v2RBJ+JWUfk3SrbjRlGFQ30J3kY8OLR0t8d6J55ph2V6TLCFvcaIpIR95krJMschu0lo1cLQSTLoRkOeOR8uwuRtPyH3hkaWxkUl8GHKulkXnJ27WvMNjMzx9A7GTxO+mGMk1TLcYXfk3s3OLonTfjWkhPQqA5hyXvIboaTaD6gWrBHuxn3NvcZ+zlXlmP2z2Hq9ub5nmvGIK8zyGyDUYrFW33tY6Z8D/zHTh0BkbFr7Gste1UcGI+L2CsJrqnlEczzt6Ad0AmN/sTrkHR/v2eDG48jL1PggVueokeoAdBKJlGWsH+cDjNKPQ58cKMQ8y9Pw/mmjBzL7F45kiuV0F7BWe3DYtBFRh8Vgf3MiUtiyrVeAmPXFnPXHnnXE/tBrNBqnIz/xYIqdw+oeA0TXX3SkWruyEuydUR4ytDybNTrhJZ9xPfCXTT/J+2EkXbMJWHI8Y2LDfVSZVHQKsmW5mTIHTHVVIzp5g165p7Q0+tXXX2jMknoA5kJHugSXONIDwQcUpVhXQWCo6hxEuSp8OKAgrKdGA1WZtGJLwsaxdd61g+Bd7Z7j9RG7NSrckL1MWybrACTsEj3juzTJgZkEjPwdH5T+0Z5+l2prU96VxQj+foN8RbOAh++CNb4TXbkoa/IIJGu5hiom+a5ue3oNHwkztQRQNmZDxk69WFodopeAmBZricENBDbXHI5zqA8dVG3vjTZvdLqaC5XjVPbLOTWWKKcnvO3BEWECK1hkSe1e+bgx9uEtma6zdatal1pbAE3dwyr1N7Wk0VcZjA8veYXB0RmRYOkBy99jFtDiUrpbTfX3+APq4gMOCYAkI2oCgQKVkfSVwNAHqoyaCp/ztTXE0nD7TCJ4cAz47Bnx+DPhzFzDscoR6WGrQb9ycJgGn2HYjGF2gr3iR9XjdVYwyy2QQlrNBWM4HYfk8CMuXQVi+9me5xHDCWMjZMsCKkj/Ri2oyHNXZcFTnQ1BNWR68Ww/mHLy+G1gmg7CcDcJyfiQLHNeYqgw9JVcCp5DsbReaG4V7TSbjpwptVlNgraQLWo295AGaUPpuSZcdecySE1Mh+QLBJ87PO1p0+3SKiWiohmfJBml6lmyQxqfJwgHfMhzuJaF6kmBHVC5LMxmG5mwYmvNhaD4PQ/NlGJqv3WmMAVSzCFAHGZFz7WT8cHWCx8qkm1NOe27xhjfuv61m+pkzbXnBZK67MC1ApkRmhUx400Omxc+cyciBNx1kumTrNQ0GgsxeOUPVEl1xFrSdZMOE8lriye0SQOiGyfgCu4uFzN70aLTEByEdktJl2nh6xA4zbSXx3ksePCcYI85tkcCwXAX8zXh3BGLV4cVwZzB5AdvtWo5InC+aM2Xmi7rMOBmGudnq6dksqDzRrBoLGY8zRpTrXXL8R6zHpIK8YuzF3r//Aw==";
Sidebar.prototype.searchFileData="7Z1rU+O4s/A/zVbNeQGVe8LLXLjtEiZ/HGDqeaNSHJHo4Fg+sj3Afvoj+RJiBWbOY3VIO5mtLSCB3fjXklrdrVb3X83hX82L15X3V6P2k8mQC/+v5uivRqN+WlNf1bvMd8Wc+4v07fvpxUlP/6J58Vfz/K9a/6/mMFzSgIXFl+o/DKM3j6X/VfpWc7R6XUgaLE+plOIlPO3rb2QkXtRnDpaReojmqK5+VA8ScZd6N3TGvIkIeZQ+1kxEkVht/EHf4wv9i0gE6t0wkuKZPfJ5tFTvNdbvDIUnZPIgzVryj/pNyvaSPl43Q12mL8+6ycuL0kQ37CnaL1GGkBNlgOWJ7vhieWBI98GhTLoB86NkzpGEDNUw2WIlE+8Aue4DhFC9ZmmoIfU8EUdKmcczj2Fga4Otr5ztPzGdYyCDm4o5GY7Z2DFGrFeea8l+SuFjgDrrFKA65betIZdu7FGJgqo4BTtnpan+jlfBCc+GitRRDdYZFFbjULASK4P6cyQawwTr2IE5SyoDcj5fsDm5YiiVvYX+uBWRu1Rkjnou6q0nJ6oRbJbHO7zdObV982HDgFYcLAsXbHOlYQADW2S4FlcXanE5HvPnTGL1Mm0GLCObvgjySN8OE049BCNTyj0kyw3MJnYiyQMkUGDxKUf9BQ8VFV7VbzFkU8lRbtSd8u5mQXeQKyH5v8KPqHcwQ1bge8geE1ewoLzpf0+mscS4X1sEQDImfbSCEKzTsAXDYodkJADGfgaGJt4NToYkYmA/E0P1IOEp9fmKejqaT6UZtnrinvfRkxSf0Rc+Ky8Bmr1ymR8xuYXZ2wVmAxtmvVYvcpbYBYqcI8YQDmfPWIwlNoYPMNENJ0DoxMAUC/Jd7xY0XGKHrVvDxu4zNsh6rV30ikqcMBYpL3i4JFdUO0byDRuueZ7atqX9h/k+85BjnrVsMcdChAwdpbGHWg/mrVAG+SJEzmm/uTjMdA73D1mvGf6itUXkeCLCt6mcFRWQ9abi+PQZ+8oEmLERnXmHjzll8/kb0aY8NtROcd6WOaFOUZ+EmJ8O8AGCjWUCOKR+mBzDD9QzeQzdltJtgdKKpyeGfXV2SqvahHEkuf/M/QV5pBFKDxR0RA1adI5otwNJe0HDiFyon7BhGlO4V9rfTjHVFzKVCL1Qg7Nd4iRkg/Mfnz/h00ZFl6xup43uWBjRWFI/wqeJmm3ItblBik4LtYtRv3qttJ+9VB5ZtHSpZKd9T32STyP+k5Exm3OX+/gms2ENlva8N7l9NdJLFnKKjtbQwiC0YcjDZIxv1Hfm673WeVM/rbDR96C22g36gaTcxwa6i2EeUjnn6tkX+CKhhr9T2rQo0jKiXPWnJ9KXDN86tj+9/wA5WhL1lOhYi8ObR9csYfUfoIscdqHO3jZIR4w+oeM82wWnXNEIp4IycEufHG/icvWEEb5wjOn/QGw952/YzUYoTPKI8fS4WZy+pQOmG6wXdMW9NzKR1FXPg294oUKom8hchhHpc+yhGRDYS+Yz9SDY1RPIXL5KfiTn89il6TPiZoYYX8UsEQZs6jVDV0GEMVJWdCEbc1hLp7tsooow4BH18I3sTiZxTotubHtQgccN2uvVKvb5v4mKwqeXd+ARXPtPTFkXIg7JiIeMok/7AaIO1BCrj0MHu4Po27X6ID/UsUcdsEFHvJPhTWLqHtqAercOD/0Pn/sMnVu/C9Kb2EeYtWeAQhjNY7paCfU7dIcEu1i0yVpVazZZvIFk6cfiwjay+SACGjn2DZ9JijCDeocjfcdcIef4VvJOkPX9U5J6wdiAwXKJNoHvrrFh7sIXvGWxRBlO38WY3saR5CiDN1DZqhuw330X5cDuQjt9jyMywekQte1LZW3hTpZUrqiLbmjbTfihnSzfwmSznS6Z+gt0zKZJBTG+d2zBFQHOOPMOHHxd44jcUH8R0wU6V9e8EtyDiDY7wuVqTjtM/uQuwvPdHQTqnFguEN6w3LrHBcE6HY2wce7CnpoKhDfWesXxzJevHem9p9RxKGIf37muMX0h9p/HJWOeu6Rckr6r1FPIdQlmdKdFve5XoeM7OtpBauDH6E1s6OZVmtKj7tMo1gk5VOJTYmBOUgb5dxxwhPHIHlTSUYY5poGasjcIkyF7wAM6phKf1QjNyKQb47MYzUJW1pNW4PPyoJXsLQuiGN8xJtg2mmFOvDgS2CA7UFGZDNLR39DNWLN8o+2MdXzx8uQhrFUBPWed2Mdn2oMFxDcg0Rnxu4BEZ65DGwUasnXokNMw9umKo8M0Yt22mPeS+jE6M7bTgl2WDwwjJFTuacCE8rlOB3T2hm8bMczYeq0BgYluI+lCBcIyyuGS+ovkhneE8wwKKpad8wpfPXzsYmQ1Awe2Y3vBVhRfZTKw+jgZ5Rgho3ltJX9tQ4nQdG9C+ScbkOg0bhMqPpJDxqsVukCXWRjHFnLC5kw9Paf4lCxU8CAjdZbiBWPRNTOXwXpxZqDo1qfpkNnafY56cs/Dd4BiZi+Uz+jOQO99HrJXbJhmpMR243yk6rGUfXsnxArfKjXMeYtaKB/holurPahkozWtp0tBYsNsA++mj2KF0fxrgRXyKXCim7UtqOEM6ROL3k4HXCzpv1SiSzCq1wxbt3TlrYx0SGOMjjZYND7HXLJVkrj8yGiAH7e01s1wL6jnpXuM+4wu2glWEGQDVre5d5bMQ5hWAz2VLyRdcHwBlS5U9lCGeUX9ucfII4+WOG+aQ93QzXn5YkkehBfRBcLszhawgirQ4jMnoCIQH9HiOxSGOkjMaP9hLCAjfKliYPmNGectuuQi6K3mVvgn18Ln/ya2BJ1znAdQRund0vGINTU59yN88xd+dImzEhi9c2hz+D3WTYZShCFGZKiklQwZ7WrNj/3t68VlpI7HA3KF0lvvgoVfctZISJZ1Eb4P8JmJXWDDyeBFZyjCrVqXM99lp+rphKSKGt/uA406pgufoasQYPa2Kj+Dc0zuqi3HFQE6DxYstS5HvY1dD2e/bDAPxyBFr5Csx/SR+/OVwsIGatbtLw8aCBmFp/1VsOQRoxgDiGCHGxmqRNldGawTQ4Y5oCGbUXwztw22RDNO7gs39g75CmJOKpSN/0I9fB3ooBIm30EjckNj38V+F7pdOpcnQx3SVYAxOcswGbq2qzTjxG4wtCE4nzjC4xrg3UVzLiTKGiSGsVs+vpKT+gLhiRRYd9MCJrr1aeapt6wXaFJT5IY/oXO9wYoi5aQeX80whnrB4vgZpw5pk6HSRZF8I84z16c12NerRdj3F9Tolq851tbm0pvrYZzShjK2HdwRlxEZcHz3/c3xtAf9iXE4wSKDGaV48ZeKCq9yMobV1pgwgbHrJesFe/7KpMsRtnsBXq8XyrV5EQKd0b91l6j8SWMOGi5RLtWtEqHl0z2KpPjWqHF6XLfVSjnphCMMcgMb/5qVDD1GfYz7a3FkO7ZT+FJ46GrsmYWubG0IzYhwKMEuEq0x/bnwKDZMsMLqGeYVVXro0uNzhENqsHZK947OWZUfg07fgtWhe4fEOJRQTVpySiH1oaL7TKaScnRHi9CRpWuXkcxoOAZU55lGGFGLW4xNFmHGqrYYIYnzwlcrjLzAe83fLNJ+OHZM223mH/pG8Z2MAy/TG/7EyN9KAePLHNxyTG1ZxyIScqZTAdA54cawWh9KvaPi88KLqE3bZTrhrs9dtJdVgU9pMtopRdmzwrT0bY3gAi32mWx9Yn6nfDgm87KECEcXOOXD4MU3vlBVRHNeofwcrIfoYDUKC7C6rBTKwpPgczkpoDXzKMoADPDx45140bYFOkxDH5dujZVjxj7GYLd5J8x66j5gIzTNCNskD4dyjwwwztgG7MJ0qM8jKt/IiKt3Qt2DEWmNY2DTyVEfowzFB85eAsHx9ckFK8G55o1nlCBNdjHG1jZG7DAW0hfklG1bx85h3hO5jJMDnOMIhlfEY7cNDusgOJvpmzYI12oH2Op3njn5O14F2DjPgE/nHI/NMY6nmTdqG1xTnCxIeiUgXaxnwIt1Rb3UVER6XQw8W0t3Aku0E/7Btd5wFOpKzBDW+jNNJutprEjVkhUMoYoyb6VYj2osMeYxmVdYrTGzw2WEYeHintO19tZzUnwBYeOUrnQ5+ndShBMXrsZSSjllvs/x3aUH3lyOwmXT8RVsjGAdQzPGR5whfLAKfjml+pAwuUxz8KhL6rEkNIgRFrh4iS4vFCK1iKDHVYg5uaTRkkmMtFAHjBFzl6d9jDlLUFM3J8Ru752VtvcSwiFdMUnRj2P5q4ublNjHsryXklIyzyOTZfq8qDhbUOZQyilWK4q+JIul6lGQQYwxuAlV7iullAJfWB50HM//m7noTn7N6Ejpk+4UUVs7CKu8mpERu6maXArHWPMK6gpmQjnGHzDo2lk8E90+Ex0iVJPQBFGXhcfetqJd+hQwRXQcdICgrseUeSzQthw+27xV9CItgrEGKTr73Ow5bbcs30HRdQcyCqLnhUbsSVvoSKE6ehmgbWygsHP33hlgA2xBpc8kgA98zgRJAwXYSI2dpWWnbx9pWiBmTF31HZ0924W64BJJ6idR2STZ+LRFHpeMIWwobjpj5VVvEbjP5YyiC0GbpU7PytuBW7iBRzHaS+bl0vL+yyfE6Owms/1Tu3yA4RNkdBbUGViI8xNidJYUnM/6CTE6kwrs7uVnxB10xMVZbeMXfILcxYZsJrO2yh89GcirWayQXXQWF9gFeRPYd5cCY9cHsFPwD3nR7cZgVRc/5sW3FUPldHzMi28jBjuSK/IOuPvmYnSYdrQNZ7wIFRbU1eNPgPFpLLCzgo+Bsaus8g16PgHGp7MMYOg1jM93MFowQVmVgzhEr7DgNLSCxa6sGmDKSsFiV1TN0jf9PoBFp6R6xQiHzUFnkXZ40P1zP4BFt2hNLx9sImta9KsWcmjRrVqw6+YfwN4IF1/1VeP8COp4QRdymbM5ueKL5QtF10kYrJGcgX3BJL62yWYvCSj/QCc1RjJGOKkNjQUVd74Q8tlD2BYRrNGlwXtJEboHYG0JPoBFZ2nsKp9Bw+IzNHZ0Cqph0RkaOxvZpOOwrre18S42eHNHgopJXlE5E/hCzlD1t0xa5nFXBAjv+ZgOUvn2VSYyTnOys6NDlL8ZC/DtwGY0EmpwE1p0WzDcRaAi7Y2aytFSxCHGM6MdzecNZnTjbLZpg2Iei0D5wdiHGCzJLsVFN7q7OkFJ2pIkp0bIicv3qDOIJ1Q9C/W8N+LEsxWTCzXcj5IhjAIYoS0oAegLclSNOkkqziCnLt+exaB2XCEw4hrZDWC4jEZkwDx0sZ7ejhJnFTCZ6KRKbMC7SjB0lrwCtjWUZ5zQ4tuVd3TUP6U+uu3I9InbUGGAKX3F17lwR7vQVLyQPsIAgMELduIwldSNUKZBG2UVoIyrHBi7qgI7KNVVNhF2RmvvyMxIcdGNrtk1AOqINMXFd9Kyo5zgFBdrhx6wEhtb0Ct8C9g0JAF3pBW+9WtmBMNN6Nh9Rji4Z7saXI2LfXTL9xL+EBefdjYqNoAZzwkuupPwXWUFp7j4cvmNjG+owHuKi+4ScHdXLn6Ci+4CsKmqoDTzvc9+Mp/cCYq9dClYgO6BLbm+jYMzp9KAtvF/fzLvtC9l0vqQXHj6jBRdc4mtGl82FlYGLF7IOQ3RRdjNbEqb/eid9PYcHSegZt7gVOsXXY+xHmDO6AbqIzZOyLyNd04H39TdDaeIj2XqOkcydR8Zwv0FqptwRjqgiwVd4Du3NbZRW4NhgPBMzxxKWytwQOWMSd3nMECHWtRDdtdZE1ZG4+iNONRDGCruQMMK8Uz6/lzvMcqP40jH2NDBtktWX3q8U59E0VWFN25f2JUmS1HDJUefHmV15pFg6j7CwyXCbD8zvcKqEmqCGkvJfPeNnL+6S+oj3GCNsbW1I4ZxqB4GXeTB3GNtouEacyRe/DCiXKIntR3QkeT+cxJTErFSwhzdNpvZhHBaeJQF0aYixqeKi7DWqvjcYz91GjI2zo65tdraTuehegKMpHCNkAxQonUUOlpDO1nP3zXtPT5D2NharadwLNG11OmBtXjIGF85vlCL4dDY7qhXymxwY3SYbbAG5zmniBg6n808cgOBJNf+k5ArnAlrRpEaW417vVpx9fZRoL6PKsLsLeBQ9yYsutytNvApoy6ihS/O0gXMLU0pwyiJF2rXDXvGh0UX6ZR2HIcsXqGjBLzDoilvBZlQ+YyxsztwlDDDxKd5u4Bl3zZB0Wld6C1mIrgfke9PylxSn4b/UNV+CmPUu5BlZhJINZLqg7BhdoE9U33Uhi/Ya4yl7R7q4AxpA+fSTbmy/iKs3Qd70H54hjuJpbukITpe6Dk8jX0fX9wBOlB2HyA9fjLWaonRXLjB6YwvyJxG9HTAF/+J2W9St1vNXvdipN5X/4M5V8+1+btOr3ne/1IZ1BtFO6JeL6GxClIYeiKek5H68ckTL39kkcrCo7M/okhFEUj26/OPo5KFcP/IYq42/JkTH/kK0fOBOFE8578+Ojt4QVwyX6y4+2t74VCl4IpVEEfstB8E5Nxf/M7oP3QxpOrhIvZd/XjHPSWG6fc/00KLIsnvYvKPMDaF8T2I+Ir/y+bku/NHJIlI7tiCK5DjdMpycVxO7o+Sf85+Mk8EahpEQnhhtptM9c/kSUgyES9MOkvm/ToGc6zieeBhTL1jtklNCY1Y4Im3lfpQMqY+XfzmYP5QxcJeI0nD04EXM3LFXuniNwk2By4H5bAwyV1yOZxUWwwlTvw3xSDEwmMk8+g9GuksnUoJpG6eZ+xAIMQT7nNcqQhYo1m8atQoGSnPxDKRbM4Tf470J9dVEgSY4uBz9f/n0Ruh/pyEzI2lenE6YG/Cnw+FrNTsqDd6uxTKe7CU3IgwJGr2/NR/92f2fCio6/642jIpqXJ/KZP8d/0XKpmaQeL1OP3BXwlpvT852ft/JLSWUC4S8g97I+c6+9hlq98lEh2qiFZpLgrxGJU+9xfZ/MlSVMhN9vYf2bzL5kFNK5GkEnrqOZjvsqPdu7Yk9LeYhX+kkUvjlkaxpB65of4iposDmCcl9/MtyTgBY+6y+vKAmilJw1OPHrUhvCWUBx4etzx0TDIJT25GdJU4jvPk9BN5nPvzQOf3/xFKFtSexYvKh7JL7zNb0vgT4v9ILudSCn2cqusVV968h5osN2KxqLwwoGbIWPg8EvKPPDJ5OBF1n+eS//yjQlKB6F5Xx5mq47PoRSRXJzMTZDi6/SOIJLB/e5yZSluCOH9VH+cr1/96QvrzuWRhyCpuoJbcZbdEc8Ele6GeR+5i749MsjMN/XGu8H3mHmcYeksiN4LOifp06rvHaoJsyeQ2feOPMJITLiojnRL6Z+mYkrkTcVR1IxVKsSay+LPJZOdWMtIZoH/UyKZQJhU33UvOjlD59vpESt/RmlFlnGbyGPCFesM7TsfuM6HofCX9uz9S2ZSKE1C161Z8o4GWyX9u/shjUx7p+39kkshkwmTIw0jH0EY8PL4dWFL3+ZQG7ml/MiTOSlnw5H7ikHqtVjvRNUPIQ580jMtNnkEhdYPBjcf12JN+GQZUO4o3yatRXfdNndNwyebqVVKIZEnnuoBF8sIQ9VPyzxZxx8iTLlGU6xPgdsbaxsrahRvcbjtBrWNFLWNAJaguD11xOtRfSf2s1iYOk1xH/NTyUX8Wsbl+5yd3WfihS3ZoEmjUq4deek0X0Vv1ZPAV7XFKoHFWq+Dgg8z7xlm9guhlmrJ/gF7FJQ+E3j5W9OZZo3206K1t9KMg73ZqTdyYbYh9TGG2cGN2gUazgxuzXivrgBicZ7g5m/USNVY/4KwjX52NToneslucvWarRvpB4HE3yZQ/+S51YIStT0Z1MfPk99Q3U5PQiAJEH/edPmm3e+2TH6Q/p0HEf7L1TT/0EgBxOfrOnY4b1XHPexAXI0Nt4EaFHNWGmtdHA4vc4gAxrDJU5FZHr0Rt7E9QsW/I9TLdsT9kPVNKGCkk2CpVjB2kjPUW1KQ9q9VrSCEbTbCRPFP/H5yQnXaJ/sFbkIpnrmzBFx65S9KsNdEMqdFtFoJ1SKVyACSZ0KTPRHKHVl9oIo0aGuxdqKRPudtYsUHs4E+xO2iHG8SiGOqOA29hRFpqHxpnaxspMND8XgM3esqYIpd8QWc8IufRkklfjT1qGQBN9rUMWn9koGVwRLyddq15co6MuNWF9ws3iVvYiUFi75vEHezE9W4XGPkMN3CjAeEWbwDX1TrGynoGEZNfsxqOR6OWFJ2+mmChN8paNiAOXj6DbzYS+NFWKXI0+C3QeW7gt2rI8YG8zw/p6zXs9Dsd/PoxL/x68zjGfl2CdZ3881HjlsMyzq8nDmm11eJ2mB8KrHF9EP87O00nfVcNbUh0+xUp0EzoXQzuLXuNQ31sU1vfklxPbezH6YAC0KcJU3JBZ7r/gS5h4c/xnmABYjcaremEXJ4fI3qzMZmomX+s8NPx0cK3epP/HDH8ka74Zq3eQRaE2SXsUQSOc9hO63hg20c0sm0FOzki2rPOFCkmkH+VY94jH1VA3I5O1kUNCziFOzqtEzUsyPFdCtvVt9nrtRPHE/mpNBkuaRjyECk8zLWLTfpelei7wPStCsGX6gL4K/izCsE3ahDnud9vHVJvN2ttMo69iIdpoIwM4zASKybzsOHHPSPRyAJE22eiUMpveEOc77fn06JMjksG4z5xRleoJdBrFwQAkp+XCqDVbqUz4GRbBlL8TFqZ6PtpyASyNSXaEFkBqUiUFVQURKokEUpBJwwXFGUd4oR4snwLdZ2l96t5rfuPK2KhGX4Qs3Cb+0OVcOA1gf6vUji8gldlpNDCKgWQFXE/dEhbZ4bgtg9BtkPN2mm0eveTPLj+eYlmNOQgKz4lT6I61SEHWeWafNhokHEzOTc/7HOUDLZ2TLQt9LCA87iFf2gBaTvHRNuqwLIFpNVj28BNC2JfPfbPT9p1rDd7QfSwRuwcAWK3hRQRZFlqxG6zddAVE1LG7oEzPpyTxhnWuQq0HBVj+wgYO0fA2G0futJJII9A6/QOfSTZ7INadsSpd2tIsWFW6SfYTbTYOx3tzuFhz5nnneqrYWQiXpg8ny/YAR6BfER5eEccH1Ee3hFGQpkAEieSPEDKZzdX3wdwrBvRMHLuu54IY7PbFyLcssc0Jm+rgUbJFq+pNttAhG2shKWvoJuEnXrtFSdi+bvGW4wHP4o9rIRwg3iWPN1BIS6D06sJ6dQb7cv3ulybJQGQApeugZACJ4TOWxixFXGTvm3Yt8zSiQ0fAHerAFxvwQ1x2GlXgLi0kZsCX/tP3OcD6s/JxegO9fJtWI7tRIob5WUrTXWjNlY3Ox5Mhxwnsa3C2iTuHB1xr42SuNnZDfHoRqkGctlDggnmrG5hNhvKWT0Gzs7RcAZHwdnDPJ6lQ4IfcSIeT0jO9lFwtjFvK1CYzk2jWQvxcPZ2o4UUZhsxpuVo5jXMhmnmObnw2OtJvab+HSHhBTN3+Wx1ej0Yk7qO3T/0dctxLIhQrRvXiMoNP9FX1VBjlp66a8xuu0VuhJvO31B4jIypTxdoM1hL66Q18b1aoTQiE+qzd+h/eHSowE3sa7V0k8acsIOdsHS4LCecvyp/BSmctQ5S46b3E6x8pcPZG3xtHca+ekBKaL0AFWG3fbgD+NpU9isZt5DyWe8Qr81288D5Dnz8Onr8mkj5rDeIjA/r+EHwYZ6fEHxnWDcHALgu2k6AIHDtg9YsPbXyfqDJlYH2G16bZwfJJ9RXj53eskjSLAfoR/OkMUB2+xYq7lbAHU6a+hp5fzrs5+lPqKAN46behILuHh309KyGmNk0Y0v3r9uGrh0FapYnojUXUtDSG2yRM6DSJdPWSR33sELT5tsRGYt57GFJBdrNrrSmPtQKGAXaHy29G6EGhZnMPzrvoIc9jdMJfK5riAWSh/rCDvp9qHRk81PmNnrm8heyCtCHvxsd2z5UlR2o9GmLydnCzVk6BSPnjP3M7elU4xKIrV4yePMrTnmDyPPXQOpS7+kiJo1WQOo1cjk7xyIQ6PVclEeWZsX/ZXPSSrg/kczBi+MIIl0bsIkBuq6rd/hjPKIRHTJtkmXXpGb6mlTe9LiDhRzqDHODPF/O9Zpe3BlxtxEcAfJ/Rnebl+IuacRe6Buyi3E74M8jYI0TrIef1tZagRJLBvQubDX80UzIGasob5BiWjuOGjNtnEEaOg1a7b59KenbAfP+vwtnzdyt46kPsWvUJlpU20CtQr3gkpFpHW9qKYBCShh/NOqIGOu7YWxhYtzROLbwZtFCrccfrc5BMQZ8fkoXPKJKpYan/eynvxpDpWS5lKaLnjO5iYun3lDWRKR79twYQpiJKBKrjT/oZ/9lJAKTvABlXuIr45R+DEW+9X13KeR/HRLSUIowPBkwujoorBEP3b0Dlaks9xmQvrTFTtKg0ITO5x7bO16Z0jCf4V0mV9JQYEFOwyvm6UfZO1MTkOl6FTDPY/tXg5BQEyn2RHXWMKgacFTTWM64v/8lVVoRBgGVNIpDwjy2Uo8bno6pvxRmBHz3RHWjaWf+GgLJEe4zi7TJlN2hV89KbsW//349ZtOI/gFCxkEgZEQG2ihm0dePnzF84GA3bPHVUI327uZkRnWnPI59r7UGnPbIsZxnLvcwB4F0iH5EyZ/iBQtPh+uftQIZMZcmZ2ffHFeyl8QNEx6fE2epdrcv3wfqW8sOlFjZV8pVJk7A2Pzr2czRLKtTPmObMPkk1Pxlexu9nRPG6qO/3uLa+axcr739D+HOUVmiY5WxuRePe+dTVG0Uq9VBztF9bgtgoyZWSeqT8nrICeGhOB14ugi4XnsX1N87V+lB2+Iart/RbA/UjeMVmcSr4CAZybf1VN1D8OSLEEdc/Z2ki68PvH4R4Pl/K192D+HyL8Kb8DAS/qHSacfvYNmEjvQpLbqH0NiXIUZUvh0qXWJgHyqcDtqKCsPJxKsLyUJyf660yOkwfWffRB1oIGWlCAQaZAdcV3Q/Ts/uya5XAXWjQyT7m+5fI+4AK92rD41MR9WVH3eZvUnG1FXv7f1UC45yzD0viYDFnnoo/u8hqf9ttgPUmB9BHpzy1JAHqGJSrAc+k1Q/ZGXJ5pIrrtOR/rZvhtLZTpsQOo0r5vPkEucAw5kVDFTmTytr+Cd7Uy7MgHn71xL2bG96Z/7+k/nJyWr6crikq1kaYNax8yf9fvUn5xWjUVILPl4hgCnreWYwaehDDUy8IqnqUIM1jVczTw/gQSgTJ5D07TBQkmjH+zjpU8T3V2PxU49ZvtKqjPvE2FzzXiTf8wAdmdLZHlJe67UWzJLLqXT6pJD6sahHUsS9j9QOmMi3MVOPv4/QeNPAa++CLpuUD1TZ/PvfwG0HMNWS+0mkNGFKDxePIjXdwtOB2r3miXr8apQWlAZco0hGn6OlFPFi+eXLqAc0x3KYoUdXgTLnLzzqL5gyouLA20POZBtq7ay5hMLyw+Qy134nXM8e5UDGRM2xFdN30Vm4h2HZMQ75NmKR2o30Y56o3Uk8VXgH+gzx/DXw1IMeMKG+5Hpyx0IeRtRHEAXYMWCadH2I81btZvONCylfzdQAtp9yolG8Wr0prp97uJncBkaK1eB4X04BbQ5eifDrzXODouxVwjXEtZ8mu+15NKwH41o/qLvUa0VHJtJ4zLd35+PLdRu49/Ex4Xdl7KY/XvtELSx3Lwcn4LBrrOqTSP7EXUYm+h585Wnu2Dx2v34H6gJvqndxEMWS7WWGgbsjDvOeTtSC0Yem/oLcMY/RkKXBsK+36MwAbYkSO0U67jF/D1Oubq4d+3FSX5XeTg26L591sAvIiSTl/tePCnSIJefYU0okNM6DetLK29UPnL1oRXbp0TDct0tqvVIKNOTbja6RVekrCkt95s5eU0tU6iilP2d+uPeCWWUXj8kzErE2ryc8YCTJLzjPf/fVgGcwU9EEPPeUxye5m9BVeGM1uS74q76vrDW6WmNkGs9YuOcRNBddWd1ool5RLgPu73FqFotFlg1DbHHtZUbuSJEUp562MLiXzsq9K3/I8dpEvOC+r9bg8UBmF7b3zgqmRLdgPZG6leoX+8/73NWQJsGZg6VzAi6rfB39t3yFLX/vnFDDmExKovtKXEh9lIfLlCldbtLEvGMztTHu34Qp0fr3I5ykMkkyano2GoNG6l9NaVRKLnuj4f+PsnEUlM1DoUzjkhMdn0Dl8EIp0nT/Q6Y/z0oWBzThpkvun1xwb0XOf9JAyH0kvkFVIjbZ7k8+WHf73ieg2Iij/2qOMk5RFnLFXzXbtX9yw31GsrTssX73y5HOgKxPg8mJlD/k7okJyqLOmP7xlVO3B4wuLIYaC+2hTmj05WnZ5p5cGiWIV0F4OqQ/efS2n/pojWZRBZTcnzKQ9zJoCc3XG77GHOt0QXG+3sJtFHC6sDhfbsqCjo6+BYSipmDZ8H6KcUlDkpWB/OrRaACOhsbYqPq47/NbKzV2yajcy8xqd4vOQt2G4kpI/q/wo2y1f/mQtI1y73UrmopnrKYQEyZ1Hr6nnmDfUYSSvbNSjqSg3V5mlbmDdGAwvn5nNw0vu4nlxLOVsol5ksKwly2xSFOmQ+0mjRoRDBj1ntX8yvrZfHnoonhptGzAMGXYY+3ms7PiCrFSWQ/Zh+/JyzKz5WzmFTkhc+5vmvP7Nrfs/N+MZ11g+iBozt20lL1LHoU8EKQkg0ys6MJne7BgdsKkTf2DALl6m0saewcyLDf8f2I+J3/vo/PWDnDumMsDKdwkp+YwiNIYf1pU/iCI0i44VSfR1bnVqkmdmm/pMtp7agwIVUp0EI02trEOoLnGNpTeWw+J5/BWU/p4P5MbkYFH3aTt4EEBSrHQEWnNmJ6yHRJdwawgVW/wss1X8b4ZYd5sLjy9lOkR77r/XFKRlUWRt1mltaL5OxucacntDczqIxWHjD/t/6YKKJUyqd5cbx+3YHdLZQQrDpMuTLOSJlJvBGkX9aMB1cvxkX29tbJb3gmTK+qrhyfjZOYeGJ6+qR5LTtTOHs9me+hisFs8NR8PC013XeVPSdX8oSfCPfQA2DGVrjh0EExJ8eB87lUWSL2nDeJV2l8oPD1/jWSc1Hrel3djNDYue5j6C7I9eTm7Apswz1MW179J94I9FFqC6uayDaYDCWj6qEJjVbyr0BaWk72RtSoj397T4Q4YMs9yqCziTzUZmReeDui+61+Xvam1QUC+XTvfv3wowDmkZF7aUyj+8kQGIwG+dCzuY5r9DBDU5ZE1U+w/Z7XMkgynQfJge1cB1lyKR5lGESNT6j9/OY0xSl3LZTTUW09SO0+3d9JA6vtQ2RJM7v38vGs/UJ+ykW8DIfZ/plS2us//FfFgVtwvKG/YYv9lNuo1qIWoPC8dCEiK+aRHu8mPlzTcRzURY9cuW/Utp8zK2R2UCk12bJE0btxP6UGgO+E5z4WQLpufjCR90u0MRXIWON3HTTAj0/qsZKb1GiyWPnW/PO/diEIBUXz5zRAzmGar1JMLhuphvC8fkGbxBpitJ6JBroS3h6vrXViX6op6T2ml0ewO+0Pyi71vrd2SxZByrmtfl4nHodGKd2BsLdy/qfusttE5tgErec0qx/rHF+7ziYijvfj27TroqtpLbQ7jYk+vZ82QFvOn+7jrakaOSl5SymGSbh6D2HsmjoKhX1/9Hqqqdw6UhMpjmfRDx6EBGrbGge6rSvqLLKWi2otnT6umBWscrLMC9+KyAYdNEHX+tkZJdRhxgiWT+/ZtrJ2CPLiDQ43Zmmf7WCrAy14jIImVli07UkRZh54GNNxDkeXGjpgO6oSlSHWHoRnoGThSUsl1byNW9HHqtiZojqceZA/JeFt6G0TpZTR6O0Kh/3ogVCOuPw/JooImSs6FkCnDBgjkBfVCti8ms0dOvQGClDdzQDEXIWw9gwmP5rBl20eotF7s3XhWsgxggYE88mhJJtR93kfBA2CgtIrT3qIkzU4RxzJIr69gKEdjPxd9CyRls8SLJIn1UH0U/V1vsU9PyhZSXCNOV8p7kl+fimBGgS2XzztaYj2kO2tylzKWT9Rl5Nqfc32Fef8NrHuwqOd+mlEykMnp0dePZAfWCvwEL28smPVa2EeXS+CU109AM7qT/GAzPRT8etjGV8DuJdnLtH8blvbvJ2x3e5mjXzJszjOXe9A0XzRw06W+HuupLSOMvf1sGbsaRrH6+iDpmdEeHIjlIva89xYumxpT98LceyjY1gHNMSf863X/jkbMYSuOacTq9iPm8tAVp7OYe/OkIbcywnx3Sb4/PXEzM7HwIE/c84bC026e+t82a81OT1nAzUEYSfHMNn7zlPyz/s0jn+s+JKNGWYH8IjOmTJjV5FcqtCrwRfe9XSILxYS/ZD7TpVgH2TvYRWA2MWpCyED7yb4u8FUZMdRrxX4I3RIJIqYYxqN77NidYsCnTFDRpHaU1eSpcQ/1tdEQuwCM5M12iSxHUwBTprxUsVrFassiVyIO0avBeq2oB8tkR/1eCmQyPEZB3Pv8p+6XEL2hp28WWxK0S4R/U3o18IEe+DA5EA/UhqgzmajO2x6MyZhy/0k3HMYukDaUbfgbeXCfk77TqtWwC6RVnCCdEq73/0UgH5xNIZRF0Tsv0y/td7K4oUHqv6AWhGFBdkqkP/1OEGPqcj8S4RK9LIq32zqlzYlfyIK7UgRLYTZ7wScM85Jcac/ic2HgNym69reDfi8E0p8rVaEMrSGVc+wS6Rg21k6mBbkT+lduBeTxFTNEcn+rmCw+SZiXnnegPR2X+j5+SRiqs3xU7heSCBh9xi+JdtHkPNvFnIh93TnpOan8arYYwSeRXjEwX6aX6u8lol7lv0YvD2OGlLiL/zt5TOnMM/sD4ROEoT7L5H//VhBMrrhvdoHDJ4qOIYodaI17/LanMSF2YWk98DkTyuxcqZfYxdExWh6XDu59Lo5HNiMDKV62KsYglEYxfrELV7VKmypcZMtXT6cLnKbyWIl57LHwtF67PCcXQ3GOXRKme2axSj6WRLPebZFvIxY+q4/+LzL04jBxXdd/jl1C3aIeaYLPleYPLaELTwh5APIp0zj71/LRotCHy84Lj9wlGSdvY5dKrwOmbz+WygWX7EWfvTpM/uQuy+SiJtKLM/4v7OIx/LwyF+N+LZ6iVNCLo77jNeS8Ka2yqpBWMU168H3pgcsopl6uVd4lQ749OMNmrVZDv4ha9vd3UhnNlS5xk24Pua499xdJ2e8hdZe6iV/6e/QSMQ+nSmvdd4nk7CdDj4YhueAzyXRfNd9n3low2OVi6pfSQZNNuajn5LNY1y6rihgMDxlietwI9XnzivAbZw/t0me37/za6VtIEQeVmQSm71c6oLqMZ+mWsqCRMsXetNdX0zVJpuQqnmEXg6EqW6UtsG0xDPX7VZCBkQ9Z3sjYlkGeGHyZvlExSZQp//iZJI57Hoz7TlXmQNvYHUobCdtSSLOEKzATdqgVs8xQ5XJUZT5AXZfYlsXD5LYqUjBsxlZp3bBSX0/r7Qb+vM8zKHWYIHe6tZoOUnGG/nqAEQwv7x8k4N12rUZlSL512/UmetfZzEuyG/S+6+rmbxPBffQH6d1ihkX5PKSUfIj+zAcsSpIBO9iBjREuf9MhBR6N0QNDOfopsNMn7Tb+fattpGOX9uxT6jDpCy60IsMf1TCM957lFHfuSL1WmX27Z8CXtlRT+GkfO7BZ/bN88ldGPCbNHv4FbqT0lM+TTakf0G9cwDv1jwl2YNMKtQMeDBz0W7W5lFul80tSZMnos+67MhCv2NGN+4WWy3kg+dzsBIKPuQsVVEmZp47apysQUjDv1toN9VBHE8fUp4vKJTI07fzqIcUPXLTCm3ZWuALWPT6SC166bFCayIJdBrDBlOFodE0u1Bfs2MBm6RC/o31m1FAofWaSAicHp9rxws5t5O+17LaxlHuI3u0CSx3YoL73efRGzl8DWYH6OWauL4QAkmsD2MHBbuGl4LpTtBuRvvs/MZf4bZgzqGTmAv2QVeGWcgcqNXfNrvMrp5L64ZOQq+S6zHu65fQc/UGRUUPLdjI4J+P+HfpAjHmCYGnYOOMT9MjmzSBLl825JyMHfYU85UwXDRtL6vsB+tNAswqa5enYiEWVSAM1TJnyd4ZTahGdzAX6o+5mEdrOLR1Npth5jb3KMnln5Nz00XukxqUQy6Pfkb4iMxZz/HHVNuhyfhyNyQX3KmCfmhWd7SwTHWVKuhhgx64bzYssl/aFFMmtp3l1TvyNioSWCz3JV1drvR8EHqc+/mLehnlqmaSYp+tXZvRh8z2uqD9fMg998TQjAcDybOFqkhRjxQ5tnJ1Zbm1XpNlookeuQ+q26yF6q80wzMuXl82A0UcXujVQYB1J9FlEnEgyXZ0IO369VjwltUx0uf7uEOdmgJ3avEthF1y5Rp/NZNgoXbvUnuvJFH0Nsq0TYLtwuUJ+IHnMvCIJH7C519cTxb9axbojdgWiaqZbZqvXJmTk3GCHNvYyyxOR6yl6vWZOcTvn4+/B9xF24oZxtcBOk//D0F97bBWHuG6X2KKA0R/xG5mZ5QvLJsQ3/VsSCaK+Yec2D7jt9qsbvlhGL0x/JX30igzYXLkR/kL5H7qc1AT9uZ9ZYctuvo/76M92e8WAacNurMdD9MBt0LSd8Xm9jj8xEfa6/pjNeRXMbmPv6tmZJ2PGdK514FH8xwAtUNt7zMLl8W1bY6YekdQrcMMXrFBPyq07sT30f2CnNg4ALMNmYzHjHqtQpNQIotkdcI8d9IYZWJPSFPge/fw24ieW4YTxD/QjbBYqsHO5bvvD6hzbm3Wx7Xau22MrtnKrtmrqVyEKbuRjWU5xFoXCr8DdRyMpyW6nVtQvQj5nBx+6wTp2fkOxWW5dt+w1DitxHQ56kWvuhq6/ckFnOi3p/DVi/hz/qge+AJoKol2BCbAT8G4FwMEqiyfc392Ioe82ZgRbLK2377dOvQrFtcwr7XYhpu9B8mGkv1J26xPHr9mMzENLeybHT64BBkKi39i7oPlpk/6I1LEjG0XFLOMOGrmBHrlotFsGzyfKaCXXLv5ucMZZt+UeNhmgD7iYlb4tx3lIHPEUvVCJPvoA1iIzB08aYmKnNk967eJrkxH6Oh3d4klvbpyXJh7jz7tsFJFtN2gpIuGKzEDxqnAEaihxywpjkx8X2IHN+/l2BvkdjdgqRl8yELZ83h0LGK3AHU9jqC1LROpSaizve1eZC2/mdLcc+Ymj/sXODJtKnrXERJ+IaaQtWQaR80agWYNH7PCGgrN0wRwWkakIqlAMtl4HVXKOg95mM7sR2plsjnNDpkyuuF8Fa828vW3ncjtT9FffjHNvy5vLDv47ImDdxFLgimQrGfVALQ8CnQf8oSRQg3zKPObq627KKK9E6LBTdLstQysaX9cBZRVI5Kk3jQVuFx+fqudDP9qweVvTCanAJQIjlmbpd6UHXlQ/Hm5so4q5pSKfyth9xo68taItlVksJUN/sFnvGJV9Lef3A3Zgo3K35SDfD+7O6uhzF4Czc+7HlxVpjAUNfmwhswcae+hVGKzP8VC5siqWJonuRTwUyuL2I3l8oZMHB/2Shh3ux/6RXRl4vMbfBK1XJD4rP8RizlZps/FgKXwWng7pzGNJCVv8XYOKE71Z/gh7WwrM88hE/4xdCE2wup5bQrig+E9BGsbhV3ntvoV/JUQUVGEKmMfdgNrgelKNVWBsARZ2+5YIsvu/WYf2igqkByqQKuwNxQTsRvnzoy3+ZPxPniqgHGudnSmGSiyCHSrGu4tq2EhGER+LLIEtEegk5mrsj1DVPwImAo+d9v25FAvmizgkEybDChy7FaPz5XMfMwmMqUsexYriBy9uA/Va6X1gTe5Xg9xU/vV2afcoQ58M9c1q/NxFpV9vlXYJMu672Pd1K90KwBsNN89KH1Zk6A6Pki7ClZjxRh7kWWmTN4eP1GZXkYFvFLf58vVWTfZKjDwYvdSp3jI8VftE5W4Ylz+ZzKn703HSNxx/2thO0Kd0kWf5V0MKYDdacikMpKBzl4ZRRQQA1jY+F0BeOj9Pgq+kGOxXwyVf0BmP8tWQL45KSsN+Ulz3R9VEt58I1xOS5FgqL/+tmjIofzl9LQNneF0RdjN9pfylzhy+GPyuhhTOjKJa1grgdnheEXRwBXDLoidPvFQF3yg6U9oDzPHzujP5VcCqyMGouFQ6ISKXQ0WwoWd/ik2ufTKIuTevQJtX445cnqJsL4NHHi2Jwz3uCj+zC7HLwsjEL381NBfFkXsFTkArA19vQlXBXtNHQuoCTdXgNw58yqf15vjT0dHGhh7EES/6R/pTOYD+IqpKUAzcBnzkUkmgMt6PGf4ofeAZMjeWPHo7HepMb04ulBxeqIe+IkTLSO8vHRV9F4B+qXyA9CV2fnMClF4Aa/6qjLzZdNB+6l/SiD0zFuBf9kYpyvJ5sO/sMZVz9NhQvT/W2Lo1dFUmvNnMqXRi05r+RuC/d2vcyCx/q3xNnTcOqIqKbxmLvbRnu5bA5PpHZWa9aeHZj38W46iMAIwjDgsLR/5Mjj0TA+fe15XF52SSVdRIop74dz6joorNrp9JY90/XD1JWE0plM9xzaUwUovBjYR8q4gAjGifjQGUCuCCK6+vEuiAHs87ekWG3WC32QpT9isRor/Bbua42myBKfX1ZPpQkREH3P5T9jF3pXhhs2osdnj871cVGXlwPZdip2db1YjuGSWHyp/srkWgLzRK8VqVbd5wfWyiW5kAslYMZEBDZfxWQwodqPYyaynofG8q56QK2x+8HsjO9qox+Iap3yt9xpPjK8cvqsr6N3o7l0/vy+HT0z3t81Vj/wd39B4fHysy9ka3UAtPP13vWdwj8XbO/QXHf5MVrNLNWgKeiNEH+etGMej8aqMF94iHzyyK0A94G6oeXQ5+MSTZbocd3XB0WuW3uRydz5SZN1xS32ce0TOAOPEsfAsj/Nf44UyetTCU0hvSmVJ66O09s2eqNfwd85LgLlXTgEZ0pix/7DIw9r7yiT25DKbql6QvJcV/2gU99x/ZjAy9OKyAvw+59SVJuyy963ihL/nl17zOo6UyBCuR09uBymwvSKMa+cxwln/OPvRoGJIWaVdEAkZWa/kb/u8SMC58Zjce63X817/PwJfCWhjVmAxQZU7X/EUD8YLOJHcrIoytm3/2s+GS+SwRgHiKqrE5GLGh8rcf1zK4VgvC83j6WjlOFH92lBkkKR8gWwvBGd1WZBmANVFaw9/QNyZJg9yxlVh3gcQuBrgy9oYcmhURALyZOL78QXq1Wo2MYy/iYcFcwC4NsIoI79LQQjjJd8j0FLUasjCKRAHsEYksvGR5VEpJmPYT0KzI9soR0wsEuwxMRQmgKCaDHxWZAOZmWT6ktGaXQr2/WiUl5CsiBHCnusrqEAKfr94VYkWEYCwEe0347jORyeUjGV+ib65rTAQARfjAZRRTj9xUaCbAxxTS9IJjDjKmEqgG/Q4cp0chnxdSxMHRieAluzh92tdhRZ9iJzfuEuZJ1jbkl2rg/XneZxz9xSKjcla9UfqobS2BOzrngkzFC/6ztqZZK7x0avWa3qFJ/BB/nolZL6VV2i/eZtepFujVnjH1y8fP1/yP/OSC67qZ2NHBqoVtoKc/YCc3Vnz5hMItcjKQfF6BHCujma+9xlsL4EakFyhJPwg8TivQof0MqpbAtjDSNt5Cok+1Mm8XAcjgpp/0C1XP6nn4jYAt89d0gNTPCXGYvvO/";
@@ -4159,14 +4164,14 @@ this.addDataEntry("bootstrap skills",800,480,"Skills","7Zpbc6IwFMc/DY/tEAJeHtdbH
this.addDataEntry("bootstrap chat",400,660,"Chat","7VpRc+I2EP4tfWD6BCPbmCOPCSTX6TTTm+ShzwIvWHOy5ZNkQvrru5JlDrDvoI2VGKZmQqy1JMv77bf+tMMgmmXbz5IW6aNIgA+i+0E0k0Lo6izbzoDzQUhYMojmgzAk+DcIH35wNbBXSUEl5PqcAWE1YEN5CZWlMij9yp0h1Rkuax4MojuV0kS8YINgI6EqhcQ18Eph+mfbtXmW0QKfQGk8HUlYatNBS/EVZoILaaeNqgOvrBjne/aVPdD+kjINzwVdmnlfcCq0udWC1LD94RNbk3vczyAy0PIVu7ywRKdVjzGpvEJSYOvUDZtMnJGqyrDejf3uQDxxPmz3Z9Q7f+7sbf6UoNjf8JfzTHCuh8P/5uHY2SRwqtkGDuZ/i9fHDa//LtIcLXdCNPxfuxanYIWChi9zkUNLWBLzQTunC+BfhGKaiRyvyer57ihna9PmsLL4oKNZvv7DtuaBGbkSuW6bcS8gzvJ+1O79V8f3UVwN2UMjagEj+rdguDt+EQwXEpJ6fe5u7u7Dul3PIFYrBboB5m7dZ+Ebe2dVqUCeGQk39jgXrHE7WNsjsH4CXtgCXtgNeMOAHKFHPKA3aaD3yJYpBdPnSSxYrpBInlnqWFmTtCatY+mT8+x70PRwwMeQdjh+D9Z+ulzWTv5n7bSBngkS8gyFhmyBfg9JSIKoc3nj9I18RmGCPeJzmZ+YT5O+O9w/Xv68lbwO7k8+uHrTQPs3hu2M5r/0BeF78kDmk5NKK37L1uE0stMWYMfd8Do8pHUQ+QC6zhV7SE8H0W2Mjr0NUKyQ28fOAW/bsbRgXJsOCZzYw9ldyNj39FEYeMQ8aGNzR8n8GHQv7A6CJr2xB+6NiE5Bwmg06gvL5zf384fpGVLNB88PB5yKgI5oPwyOY+DGSww0Sz0XTvw6Mj42CjoTdUdREPpJ/80C1bxkytym1GA65qU0/xMLhGnbZyskpJAnIJmujRvBy0JTO2oD3F4ApUxzyTgrs3oWY4ESv1blmlHTLS85pxUYaChlb7LPCY3xDvpil1X2Y2zq5V0Txl4irFmMu/A8c1UCI/KTVpoVuiegnOPwB9xAkBnNfzVrWmCegA1Y3WEywaxne4xT6uPdhUfoU3g0YsNPQmjW/y48IVy38Ij8yM9mNfA2T4wy2IBREzk1eoGzBUi7LYGssMrBZIil1RIK9YY2qiEXC6tYQFnJgaCgMjHVClFoJqr+30qTZHKWMruIrIDECpRvpemQocpR1eKsKbFpaMsyM6jgCKiVKSs8seqlEEqxzAwxyxFZbu/vBJCiSpUZLoHWa9rvZBVQb/JbT/XNLr67fdeNvZS1g2Zl9MLz2VUJnNgP6M0C6Z9fcdtC5ihzekPv3skXj9XS4S6mauC9KNvw6uql161eYi8F1LClgFqm/amavuG97jHrT/yx/xh1L5o1vLqS6VW96SddJHxsfv+1ZdV9/8eY/wA="),
this.addDataEntry("bootstrap log in",240,220,"Log in","7ZhLj9owEIB/TY4gJ04CHAtst5W2EupW6tmQgVjrxMjx8uiv7zgxgZAAUZVsD60RUmbs8WO+mbESh86Sw7Ni2/ibjEA49MmhMyWlLp6SwwyEcDzCI4fOHc8j+He8zzd63byXbJmCVLcx8AqDHRPvUGhmMtVKmjELluKG8v5MH4Xtj3WCu5y7Dp1mMYvkHgWCQsSyGCIrYM/WjE8OG3O04RIPlGl8HCoFK9zZdM2FmEkhVT4rXecN9UzwTYq6FR4AsHOqXvkvM1VgpsWdvcGFGckb9uxAab5i4pM113Jrxm/ZiqebH0aYe2bcGk9nJ3T9k2wPZ460j7mGVzQzij1uGHXWRbgCHG66OVdZHz+DTECrIw7Z80jH1tV+gYLEwDexNTvxISwrFJvS9kwNHyy4Zoi0BvEpYbw3dHeJTPJ2B3ATgYtxUd4uAkHAWp9RvuTS3Cc3WCnIcO6f1utuW3reQ3rupIEetToFgmm+g8r8TUTtEgvJcWWPHKrTHAsxvAoJuV5noGsBUe6zVYz4tRjpOjwMqOm71jL94xiJzK+k+OXk6dYY6UOMtAuKbfMy6N3neZo3eLj05JWHS88XFmWeDGlbF/vNLrYGZBhUQrmULzMprCNwvU4SaTCurD4Ie0iksAZ1wbJsL1X00Vdlyxz7X28f1FuX9FFwR/9CwQ0/puBeYeyU07h3TttTfbhHplqQW5fjUT/lOOylHI97SLNJDd93SCBZ4ruDRxLomuUqhtXbUh4uMo42cQ3zdqd4C7YEsZAZ19zk71wV3r9fhoOrek46rLd+Qxj4nYTBiFbLrd9HHLikFggvcoOKr2lf9/LtkpvKFOrsg/F0EozqV/DdV6NHL6fdXsDHisHfuY4HQQfXMYrnjyjF8MtvLL8B"),
this.addDataEntry("bootstrap log in",240,260,"Log in","7Vhtb5swEP41fJnUyJiXJB+b0HaVOilaJ+2zAw54NTgzbl7263cGE0ghadRCVWmjqorPd+Z8z/OcC5YzT3d3kqyTbyKi3HJuLGcuhVDlXbqbU84tjFhkOYGFMYJfC9+emLWLWbQmkmbqkgBcBmwIf6alZS4yJYX2WZAMEirmc7XnZj5RKWQZ2JYzyxMSiS0MEAwikic0MgOYWWv/dBfrrY2WsKFcwe1IShpCZrMV43wuuJDFqs6quMBOOIszsIWwAQqTM/nI/uilPL0sZPZEG2GouGBmQ6ViIeHXJlyJtfZfk5Bl8Q89CLD2W8HuzIK2W43N5vSWtglT9BHCtGELCYPNlAieQHcny1yYTI3vqEipkntw2bJIJabUbgkFSiiLExOGfWMkeWmID7E1anBjgOsG0WmBaGGf6yorsoStYRRCwJpEERSjcPB/P2uGzVB9a7xMyc541VyojGaT1zZAgTVO1Q5rS3MFPzZ/yxRlyxLpehgg60DDiGYqm7ZXyqJIb7nhVWNQGb0iq1ZK91koSn5q1ZTJLKvJm5QwXlkBkWWdNgI6dkQsSJ5vhYy6gw42vd22sVUVbSzRrOzDCPO03jKR0bZyb3FwE9waKTXswczD7hzsApSz4kU6OvSEyCTN4bk/DVT2pbLDr8rOnnbIrpKipJwotqFH63dJ0TxiIVim2WEScswy+3LovdCyWK1yqlpKPuR5kbjdlrh/iSSzXBRrQo5CkX48EwDeaXF1NPJI/3R02kqqnK5U3ZofilHgok9BC2cQWhRNsHdeeB1Nv18eaKRmz0qJ7M1kqE71EsavVakvxtF9FUenDxgvPWj9wWteHDIdFa5ldVzhQ+XLiINQRs6lJfa6S2wC0Mg74vJh3JSS34bAxr0o6Wpy9PQrfwAhjVugfjHX/8b6yRurO0RjnfwLjXX8uRrrdPCar6t/xs9V+biJXtxCJ8O0UH+QFjoZQDI2auH3naY0Xer3NZTSvsEMExo+LcWuIR+nC1i/uM7Ih5Ml5QuRM8W0GANZlv98T/VeNGH0zua5PwpossLtYIXbCyvGzjErxngIWtgtWjyIGAz32ccfrd1vr95kNvXG7bfXA0Pe8sGo37P1ND0+7qS96uPVFob1h83Svfnd8y8=")];
-this.addPalette("bootstrap",mxResources.get("bootstrap"),!1,mxUtils.bind(this,function(a){for(var b=0;b<d.length;b++)a.appendChild(d[b](a))}))}})();(function(){var a=Sidebar.prototype.addBpmnPalette;Sidebar.prototype.addBpmnPalette=function(d,e){a.apply(this,arguments);var b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;",c="bpmn business process model gateway ";this.addPaletteFunctions("bpmnGateways","BPMN Gateways",!1,[this.createVertexTemplateEntry(b+"outline=none;symbol=exclusiveGw;",50,50,"","Exclusive Gateway",null,null,c+"exclusive"),
-this.createVertexTemplateEntry(b+"outline=none;symbol=parallelGw;",50,50,"","Parallel Gateway",null,null,c+"parallel"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","Inclusive Gateway",null,null,c+"inclusive"),this.createVertexTemplateEntry(b+"outline=none;symbol=complexGw;",50,50,"","Complex Gateway",null,null,c+"complex"),this.createVertexTemplateEntry(b+"outline=standard;symbol=general;",50,50,"","General Start Gateway",null,null,c+"general start"),this.createVertexTemplateEntry(b+
-"outline=throwing;symbol=general;",50,50,"","General Intermediate Gateway",null,null,c+"general intermediate"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","General End Gateway",null,null,c+"general end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=message;",50,50,"","Message Standard Gateway",null,null,c+"message standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=message;",50,50,"","Message Interrupting Gateway",null,null,c+"message interrupting"),
-this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=message;",50,50,"","Message Non-Interrupting Gateway",null,null,c+"message non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=message;",50,50,"","Message Catching Gateway",null,null,c+"message catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=message;",50,50,"","Message Boundary Interrupting Gateway",null,null,c+"message boundary interrupting"),this.createVertexTemplateEntry(b+
-"outline=boundNonint;symbol=message;",50,50,"","Message Boundary Non-Interrupting Gateway",null,null,c+"message boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=message;",50,50,"","Message Throwing Gateway",null,null,c+"message throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=message;",50,50,"","Message End Gateway",null,null,c+"message end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=timer;",50,50,"","Timer Standard Gateway",
-null,null,c+"timer standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=timer;",50,50,"","Timer Interrupting Gateway",null,null,c+"timer interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=timer;",50,50,"","Timer Non-Interrupting Gateway",null,null,c+"timer non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=timer;",50,50,"","Timer Catching Gateway",null,null,c+"timer catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=timer;",
-50,50,"","Timer Boundary Interrupting Gateway",null,null,c+"timer boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=timer;",50,50,"","Timer Boundary Non-Interrupting Gateway",null,null,c+"timer boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=escalation;",50,50,"","Escalation Interrupting Gateway",null,null,c+"escalation interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=escalation;",50,
-50,"","Escalation Non-Interrupting Gateway",null,null,c+"escalation non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=escalation;",50,50,"","Escalation Boundary Interrupting Gateway",null,null,c+"escalation boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=escalation;",50,50,"","Escalation Boundary Non-Interrupting Gateway",null,null,c+"escalation boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+
+this.addPalette("bootstrap",mxResources.get("bootstrap"),!1,mxUtils.bind(this,function(a){for(var b=0;b<d.length;b++)a.appendChild(d[b](a))}))}})();(function(){var a=Sidebar.prototype.addBpmnPalette;Sidebar.prototype.addBpmnPalette=function(d,e){a.apply(this,arguments);var b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outlineConnect=0;",c="bpmn business process model gateway ";this.addPaletteFunctions("bpmnGateways","BPMN Gateways",!1,[this.createVertexTemplateEntry(b+"outline=none;symbol=exclusiveGw;",50,50,"","Exclusive Gateway",null,
+null,c+"exclusive"),this.createVertexTemplateEntry(b+"outline=none;symbol=parallelGw;",50,50,"","Parallel Gateway",null,null,c+"parallel"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","Inclusive Gateway",null,null,c+"inclusive"),this.createVertexTemplateEntry(b+"outline=none;symbol=complexGw;",50,50,"","Complex Gateway",null,null,c+"complex"),this.createVertexTemplateEntry(b+"outline=standard;symbol=general;",50,50,"","General Start Gateway",null,null,c+"general start"),
+this.createVertexTemplateEntry(b+"outline=throwing;symbol=general;",50,50,"","General Intermediate Gateway",null,null,c+"general intermediate"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","General End Gateway",null,null,c+"general end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=message;",50,50,"","Message Standard Gateway",null,null,c+"message standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=message;",50,50,"","Message Interrupting Gateway",
+null,null,c+"message interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=message;",50,50,"","Message Non-Interrupting Gateway",null,null,c+"message non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=message;",50,50,"","Message Catching Gateway",null,null,c+"message catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=message;",50,50,"","Message Boundary Interrupting Gateway",null,null,c+"message boundary interrupting"),
+this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=message;",50,50,"","Message Boundary Non-Interrupting Gateway",null,null,c+"message boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=message;",50,50,"","Message Throwing Gateway",null,null,c+"message throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=message;",50,50,"","Message End Gateway",null,null,c+"message end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=timer;",
+50,50,"","Timer Standard Gateway",null,null,c+"timer standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=timer;",50,50,"","Timer Interrupting Gateway",null,null,c+"timer interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=timer;",50,50,"","Timer Non-Interrupting Gateway",null,null,c+"timer non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=timer;",50,50,"","Timer Catching Gateway",null,null,c+"timer catching"),this.createVertexTemplateEntry(b+
+"outline=boundInt;symbol=timer;",50,50,"","Timer Boundary Interrupting Gateway",null,null,c+"timer boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=timer;",50,50,"","Timer Boundary Non-Interrupting Gateway",null,null,c+"timer boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=escalation;",50,50,"","Escalation Interrupting Gateway",null,null,c+"escalation interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=escalation;",
+50,50,"","Escalation Non-Interrupting Gateway",null,null,c+"escalation non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=escalation;",50,50,"","Escalation Boundary Interrupting Gateway",null,null,c+"escalation boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=escalation;",50,50,"","Escalation Boundary Non-Interrupting Gateway",null,null,c+"escalation boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+
"outline=throwing;symbol=escalation;",50,50,"","Escalation Throwing Gateway",null,null,c+"escalation throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=escalation;",50,50,"","Escalation End Gateway",null,null,c+"escalation end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=conditional;",50,50,"","Conditional Standard Gateway",null,null,c+"conditional standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=conditional;",50,50,"","Conditional Interrupting Gateway",
null,null,c+"conditional interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=conditional;",50,50,"","Conditional Non-Interrupting Gateway",null,null,c+"conditional non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=conditional;",50,50,"","Conditional Catching Gateway",null,null,c+"conditional catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=conditional;",50,50,"","Conditional Boundary Interrupting Gateway",null,
null,c+"conditional boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=conditional;",50,50,"","Conditional Boundary Non-Interrupting Gateway",null,null,c+"conditional boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=link;",50,50,"","Link Catching Gateway",null,null,c+"link catching"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=link;",50,50,"","Link Throwing Gateway",null,null,c+"link throwing"),this.createVertexTemplateEntry(b+
@@ -4179,7 +4184,7 @@ null,null,c+"multiple standard"),this.createVertexTemplateEntry(b+"outline=event
"outline=boundInt;symbol=multiple;",50,50,"","Multiple Boundary Interrupting Gateway",null,null,c+"multiple boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=multiple;",50,50,"","Multiple Boundary Non-Interrupting Gateway",null,null,c+"multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=multiple;",50,50,"","Multiple Throwing Gateway",null,null,c+"multiple throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=multiple;",
50,50,"","Multiple End Gateway",null,null,c+"multiple end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=star;",50,50,"","Multiple Start Gateway",null,null,c+"multiple end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=parallelMultiple;",50,50,"","Parallel Multiple Standard Gateway",null,null,c+"parallel multiple standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=parallelMultiple;",50,50,"","Parallel Multiple Interrupting Gateway",null,null,c+"parallel multiple interrupting"),
this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=parallelMultiple;",50,50,"","Parallel Multiple Non-Interrupting Gateway",null,null,c+"parallel multiple non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=parallelMultiple;",50,50,"","Parallel Multiple Catching Gateway",null,null,c+"parallel multiple catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=parallelMultiple;",50,50,"","Parallel Multiple Boundary Interrupting Gateway",
-null,null,c+"parallel multiple boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=parallelMultiple;",50,50,"","Parallel Multiple Boundary Non-Interrupting Gateway",null,null,c+"parallel multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=end;symbol=terminate;",50,50,"","Terminate Gateway",null,null,c+"terminate")]);b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=ellipsePerimeter;";
+null,null,c+"parallel multiple boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=parallelMultiple;",50,50,"","Parallel Multiple Boundary Non-Interrupting Gateway",null,null,c+"parallel multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=end;symbol=terminate;",50,50,"","Terminate Gateway",null,null,c+"terminate")]);b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=ellipsePerimeter;outlineConnect=0;";
c="bpmn business process model event ";this.addPaletteFunctions("bpmnEvents","BPMN Events",!1,[this.createVertexTemplateEntry(b+"outline=standard;symbol=general;",50,50,"","General Start",null,null,c+"general start"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=general;",50,50,"","General Intermediate",null,null,c+"general intermediate"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","General End",null,null,c+"general end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=message;",
50,50,"","Message Standard",null,null,c+"message standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=message;",50,50,"","Message Interrupting",null,null,c+"message interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=message;",50,50,"","Message Non-Interrupting",null,null,c+"message non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=message;",50,50,"","Message Catching",null,null,c+"message catching"),this.createVertexTemplateEntry(b+
"outline=boundInt;symbol=message;",50,50,"","Message Boundary Interrupting",null,null,c+"message boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=message;",50,50,"","Message Boundary Non-Interrupting",null,null,c+"message boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=message;",50,50,"","Message Throwing",null,null,c+"message throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=message;",50,50,"",
@@ -6759,7 +6764,7 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,d,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,d){};DrawioFile.prototype.saveFile=function(a,b,d,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return 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.move=function(a,b,d){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||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};
+DrawioFile.prototype.move=function(a,b,d){};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};
DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var d=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
@@ -6776,20 +6781,20 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable()){var e=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
[a]),e,c):e()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,b,d){var c=this.getTitle();c!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,b)}),d)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),f,d):f()})):b()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,b,d){StorageFile.call(this,a,b,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};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,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+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,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,f,t,u,q){function z(){mxEvent.addListener(p,"click",null!=q?q: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,g.checked);b()})):(a.setMode(f,g.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace="nowrap";p.setAttribute("title",e);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var h=document.createElement("div");h.style.textOverflow="ellipsis";h.style.overflow="hidden";if(null!=c){var x=document.createElement("img");
-x.setAttribute("src",c);x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width="60px";x.style.height="60px";x.style.paddingBottom="6px";p.appendChild(x)}else h.style.paddingTop="5px",h.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(h.style.paddingTop="0px",h.style.marginTop="-2px");p.appendChild(h);mxUtils.write(h,e);if(null!=u)for(c=0;c<u.length;c++)mxUtils.br(h),mxUtils.write(h,u[c]);if(null!=t&&null==a[t]){x.style.visibility=
-"hidden";mxUtils.setOpacity(h,10);var n=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});n.spin(p);var y=window.setTimeout(function(){null==a[t]&&(n.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(y),mxUtils.setOpacity(h,100),x.style.visibility="",n.stop(),z(),"drive"==t&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else z();
-l.appendChild(p);++k>=d&&(mxUtils.br(l),k=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",mxResources.get("help"));f.setAttribute("target","_blank");f.style.position=
-"absolute";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("valign","bottom");h.setAttribute("src",Editor.helpImage);h.style.marginRight="2px";f.appendChild(h);mxUtils.write(f,mxResources.get("help"));e.appendChild(f)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";
-n.style.bottom="28px";n.style.color="gray";mxUtils.write(n,mxResources.get("decideLater"));a.isOfflineApp()?n.style.right="20px":(mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)"),n.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=-Math.round(n.clientWidth/2)+"px"};e.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
-!0);Editor.useLocalStorage=b});var l=document.createElement("div");mxClient.IS_QUIRKS&&(l.style.whiteSpace="nowrap",l.style.cssFloat="left");l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";l.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var k=0,m=document.createElement("p"),f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.paddingTop=
+StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+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,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,p,t,f,q){function v(){mxEvent.addListener(x,"click",null!=q?q:function(){p!=App.MODE_GOOGLE||a.isDriveDomain()?p==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(p,g.checked);b()})):(a.setMode(p,g.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",e);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=c){var h=document.createElement("img");
+h.setAttribute("src",c);h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";x.appendChild(h)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");x.appendChild(u);mxUtils.write(u,e);if(null!=f)for(c=0;c<f.length;c++)mxUtils.br(u),mxUtils.write(u,f[c]);if(null!=t&&null==a[t]){h.style.visibility=
+"hidden";mxUtils.setOpacity(u,10);var m=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});m.spin(x);var A=window.setTimeout(function(){null==a[t]&&(m.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(A),mxUtils.setOpacity(u,100),h.style.visibility="",m.stop(),v(),"drive"==t&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else v();
+l.appendChild(x);++k>=d&&(mxUtils.br(l),k=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",mxResources.get("help"));f.setAttribute("target","_blank");f.style.position=
+"absolute";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("valign","bottom");h.setAttribute("src",Editor.helpImage);h.style.marginRight="2px";f.appendChild(h);mxUtils.write(f,mxResources.get("help"));e.appendChild(f)}var m=document.createElement("div");m.style.position="absolute";m.style.cursor="pointer";m.style.fontSize="12px";
+m.style.bottom="28px";m.style.color="gray";mxUtils.write(m,mxResources.get("decideLater"));a.isOfflineApp()?m.style.right="20px":(mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)"),m.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)m.style.marginLeft=-Math.round(m.clientWidth/2)+"px"};e.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
+!0);Editor.useLocalStorage=b});var l=document.createElement("div");mxClient.IS_QUIRKS&&(l.style.whiteSpace="nowrap",l.style.cssFloat="left");l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";l.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var k=0,n=document.createElement("p"),f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.paddingTop=
"4px";f.style.paddingBottom="16px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("saveDiagramsTo")+":");e.appendChild(f);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",
-mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(l);f=document.createElement("p");f.style.marginTop="12px";f.style.marginBottom="6px";f.appendChild(g);h=document.createElement("span");h.style.color="gray";h.style.fontSize="12px";mxUtils.write(h," "+mxResources.get("rememberThisSetting"));f.appendChild(h);mxUtils.br(f);var q=a.getRecent();if(null!=q&&
-0<q.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var p=document.createElement("option");p.setAttribute("value","");p.setAttribute("selected","selected");p.style.textAlign="center";mxUtils.write(p,mxResources.get("openRecent")+"...");u.appendChild(p);for(p=0;p<q.length;p++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,
-a.title+" ("+mxResources.get(b)+")");u.appendChild(c)})(q[p]);f.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else f.style.marginTop="20px",l.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),f.appendChild(q),l.style.paddingBottom="4px");l.appendChild(f);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
-document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(m.style.padding="8px",m.style.fontSize="9pt",m.style.marginTop="-14px",m.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",e.appendChild(m))},5E3);this.container=
+mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(l);f=document.createElement("p");f.style.marginTop="12px";f.style.marginBottom="6px";f.appendChild(g);h=document.createElement("span");h.style.color="gray";h.style.fontSize="12px";mxUtils.write(h," "+mxResources.get("rememberThisSetting"));f.appendChild(h);mxUtils.br(f);var u=a.getRecent();if(null!=u&&
+0<u.length){var p=document.createElement("select");p.style.marginTop="8px";p.style.width="140px";var q=document.createElement("option");q.setAttribute("value","");q.setAttribute("selected","selected");q.style.textAlign="center";mxUtils.write(q,mxResources.get("openRecent")+"...");p.appendChild(q);for(q=0;q<u.length;q++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,
+a.title+" ("+mxResources.get(b)+")");p.appendChild(c)})(u[q]);f.appendChild(p);mxEvent.addListener(p,"change",function(b){""!=p.value&&a.loadFile(p.value)})}else f.style.marginTop="20px",l.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(u=document.createElement("div"),u.style.cursor="pointer",u.style.padding="18px 0px 6px 0px",u.style.fontSize="12px",u.style.color="gray",mxUtils.write(u,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(u,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),f.appendChild(u),l.style.paddingBottom="4px");l.appendChild(f);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
+document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",e.appendChild(n))},5E3);this.container=
e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";d.style.left="26px";d.style.color=
"gray";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);c.style.marginRight="2px";d.appendChild(c);mxUtils.write(d,mxResources.get("help"));b.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="40px";
c.style.height="40px";c.style.marginRight="12px";c.style.paddingBottom="4px";var e="";a.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",e=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",e=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",e=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",e=mxResources.get("github")):a.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+
@@ -6800,230 +6805,230 @@ a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mx
function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});f.appendChild(c)},c=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=c?(h.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+c.displayName+")"),h.style.marginBottom="16px",f.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();
a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),f.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",[d])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
-f.appendChild(e));b.appendChild(f);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,h,n,l){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);g.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");
-f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(m.checked)});f.className="geBtn";null!=n&&(f.innerHTML=n+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(m.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",
-e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);l?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(m),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),g.appendChild(k),mxEvent.addListener(h,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=
-g},ErrorDialog=function(a,b,d,c,e,f,h,n,l,g,k){l=null!=l?l:!0;var m=document.createElement("div");m.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="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,b);m.appendChild(q)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;m.appendChild(b);d=document.createElement("div");
-d.style.marginTop="16px";d.style.textAlign="center";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=k&&k()}),g.className="geBtn",d.appendChild(g));var u=mxUtils.button(c,function(){l&&a.hideDialog();null!=e&&e()});u.className="geBtn";d.appendChild(u);null!=h&&(c=mxUtils.button(h,function(){l&&a.hideDialog();null!=n&&n()}),c.className="geBtn gePrimaryBtn",
-d.appendChild(c));this.init=function(){u.focus()};m.appendChild(d);this.container=m},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var n=document.createElement("textarea");
-n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");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");c.appendChild(n);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(n.value=b,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var l=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(l=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),
-function(){var c=5E5>b.length?n.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=c.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var k=window.open().document;k.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");k.close()}}),l.className="geBtn",h.appendChild(l));if(!f||7500<b.length){var g=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",b,"text/plain")});g.className="geBtn";h.appendChild(g)}if(f&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(b)}catch(q){a.handleError({message:q.message||
+f.appendChild(e));b.appendChild(f);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,h,m,l){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);g.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");
+f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(n.checked)});f.className="geBtn";null!=m&&(f.innerHTML=m+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",
+e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);l?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),g.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=
+g},ErrorDialog=function(a,b,d,c,e,f,h,m,l,g,k){l=null!=l?l:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var u=document.createElement("div");u.style.padding="0px";u.style.margin="0px";u.style.fontSize="18px";u.style.paddingBottom="16px";u.style.marginBottom="16px";u.style.borderBottom="1px solid #c0c0c0";u.style.color="gray";mxUtils.write(u,b);n.appendChild(u)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");
+d.style.marginTop="16px";d.style.textAlign="center";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=k&&k()}),g.className="geBtn",d.appendChild(g));var p=mxUtils.button(c,function(){l&&a.hideDialog();null!=e&&e()});p.className="geBtn";d.appendChild(p);null!=h&&(c=mxUtils.button(h,function(){l&&a.hideDialog();null!=m&&m()}),c.className="geBtn gePrimaryBtn",
+d.appendChild(c));this.init=function(){p.focus()};n.appendChild(d);this.container=n},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var m=document.createElement("textarea");
+m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");c.appendChild(m);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(m.value=b,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var l=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(l=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),
+function(){var c=5E5>b.length?m.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=c.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var k=window.open().document;k.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
+'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");k.close()}}),l.className="geBtn",h.appendChild(l));if(!f||7500<b.length){var g=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",b,"text/plain")});g.className="geBtn";h.appendChild(g)}if(f&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(b)}catch(u){a.handleError({message:u.message||
mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");k.appendChild(g);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+
-encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign=
-"bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(g);k=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?
+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign=
+"bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(g);k=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?
g.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(l),g.className="geBtn",l.className="geBtn gePrimaryBtn");c.appendChild(h);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,b){function d(){var a=null!=w.getTitle()?w.getTitle():this.defaultFilename;if(G.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<D.length&&(b+="&s="+D);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(p.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(z.checked?"1":"0");b+="&resize="+
-(t.checked?"1":"0");b+="&x0="+Number(k.value);b+="&y0="+l;e.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else w.constructor==DriveFile||w.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=w.getHash().substring(1),b=w.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
-encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(k.value),b+="&height="+a),g.value=b):g.value=""}var c=document.createElement("div"),e=a.editor.graph,f=e.getGraphBounds(),h=e.view.scale,n=Math.floor(f.x/h-e.view.translate.x),l=Math.floor(f.y/h-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);
-mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=n;c.appendChild(k);mxUtils.write(c,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
-"text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(f.height/h);c.appendChild(m);mxUtils.br(c);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";c.appendChild(f);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=b||"";
-c.appendChild(q);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";c.appendChild(u);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);c.appendChild(x);mxUtils.write(c,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";c.appendChild(t);mxUtils.write(c,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,mxResources.get("fit")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft=
-"8px";c.appendChild(G);mxUtils.write(c,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),w=a.getCurrentFile();mxEvent.addListener(p,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(q,"change",d);d();
+var GoogleSitesDialog=function(a,b){function d(){var a=null!=z.getTitle()?z.getTitle():this.defaultFilename;if(G.checked&&""!=u.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<F.length&&(b+="&s="+F);""!=p.value&&"0"!=p.value&&(b+="&border="+p.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(x.checked?"1":"0");b+="&resize="+
+(t.checked?"1":"0");b+="&x0="+Number(k.value);b+="&y0="+l;e.mathEnabled&&(b+="&math=1");A.checked?b+="&edit=_blank":v.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else z.constructor==DriveFile||z.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?b+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(b+=z.getHash().substring(1),b=z.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(k.value),b+="&height="+a),g.value=b):g.value=""}var c=document.createElement("div"),e=a.editor.graph,f=e.getGraphBounds(),h=e.view.scale,m=Math.floor(f.x/h-e.view.translate.x),l=Math.floor(f.y/h-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);
+mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=m;c.appendChild(k);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
+"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(f.height/h);c.appendChild(n);mxUtils.br(c);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";c.appendChild(f);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=b||"";
+c.appendChild(u);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","3");p.style.marginBottom="8px";p.style.marginLeft="4px";p.value="0";c.appendChild(p);mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";c.appendChild(q);mxUtils.write(c,mxResources.get("pan")+" ");var w=document.createElement("input");
+w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("zoom")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";v.setAttribute("title",window.location.href);c.appendChild(v);mxUtils.write(c,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";c.appendChild(t);mxUtils.write(c,mxResources.get("resize")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("fit")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft=
+"8px";c.appendChild(G);mxUtils.write(c,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),z=a.getCurrentFile();mxEvent.addListener(q,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);d();
mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn gePrimaryBtn";f.appendChild(h);c.appendChild(f);this.container=c},CreateGraphDialog=function(a,b,d){var c=document.createElement("div");c.style.textAlign=
"right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);c.appendChild(b);var f=new Graph(b);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 h="curved=1;";f.cellRenderer.installCellOverlayListeners=
function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"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,h);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=f.getDefaultParent(),l=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),g;m(function(){g=f.insertVertex(n,null,"Entry",d.x,d.y,80,30,"rounded=1;");l(g);f.view.refresh(g);
-f.insertEdge(n,null,"",a,g,h)},function(){f.scrollCellToVisible(g)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var g=mxUtils.convertPoint(f.container,mxEvent.getClientX(c),mxEvent.getClientY(c));f.connectionHandler.start(d,g.x,g.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var g;try{g=f.insertVertex(n,null,"Start",
+!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,h);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=f.getDefaultParent(),l=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),g;n(function(){g=f.insertVertex(m,null,"Entry",d.x,d.y,80,30,"rounded=1;");l(g);f.view.refresh(g);
+f.insertEdge(m,null,"",a,g,h)},function(){f.scrollCellToVisible(g)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var g=mxUtils.convertPoint(f.container,mxEvent.getClientX(c),mxEvent.getClientY(c));f.connectionHandler.start(d,g.x,g.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var g;try{g=f.insertVertex(m,null,"Start",
0,0,80,30,"ellipse"),l(g)}finally{f.getModel().endUpdate()}var k;"horizontalTree"==d?(k=new mxCompactTreeLayout(f),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(k=new mxCompactTreeLayout(f,!1),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(k=new mxRadialTreeLayout(f,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==d?k=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?k=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==d?(k=new mxFastOrganicLayout(f,!1),k.forceConstant=80):"circle"==d&&(k=new mxCircleLayout(f));if(null!=k){var m=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),k.execute(f.getDefaultParent(),g)}catch(t){throw t;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,d,g){q.apply(this,arguments);m()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&c.appendChild(u);var p=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,g=d.getBounds(c);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(u)};this.container=c};
+d?k=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==d?(k=new mxFastOrganicLayout(f,!1),k.forceConstant=80):"circle"==d&&(k=new mxCircleLayout(f));if(null!=k){var n=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),k.execute(f.getDefaultParent(),g)}catch(t){throw t;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,d,g){u.apply(this,arguments);n()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var p=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&c.appendChild(p);var q=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
+var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,g=d.getBounds(c);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(p)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,b){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=a.editor.graph.backgroundImage,e=document.createElement("input");e.setAttribute("type","text");e.style.marginTop="4px";e.style.marginBottom="4px";e.style.width="350px";e.value=
-null!=c?c.src:"";var f=!1,h=function(){f||""==e.value||a.isOffline()?(n.value="",l.value=""):a.loadImage(mxUtils.trim(e.value),function(a){n.value=a.width;l.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";n.value="";l.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
+null!=c?c.src:"";var f=!1,h=function(){f||""==e.value||a.isOffline()?(m.value="",l.value=""):a.loadImage(mxUtils.trim(e.value),function(a){m.value=a.width;l.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";m.value="";l.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.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.maxBackgroundSize,function(a,b,c,d,g,k){e.value=a;h()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(e.value=decodeURIComponent(d),h())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(e);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var n=document.createElement("input");
-n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=c?c.width:"";d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=c?c.height:"";d.appendChild(l);c=mxUtils.button(mxResources.get("reset"),function(){e.value="";n.value="";l.value="";f=!1});mxEvent.addListener(c,"mousedown",
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(e.value=decodeURIComponent(d),h())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(e);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var m=document.createElement("input");
+m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.width:"";d.appendChild(m);mxUtils.write(d,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=c?c.height:"";d.appendChild(l);c=mxUtils.button(mxResources.get("reset"),function(){e.value="";m.value="";l.value="";f=!1});mxEvent.addListener(c,"mousedown",
function(){f=!0});mxEvent.addListener(c,"touchstart",function(){f=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(e,"change",h);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&&(e.value=a.url,h()));e.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var k=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
k.className="geBtn";c.appendChild(k);null!=a.drive&&"1"==urlParams.photos&&(k=mxUtils.button(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.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),k.className="geBtn",c.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),n.value,l.value):null)});k.className="geBtn gePrimaryBtn";c.appendChild(k);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
-c||"plantUmlTxt"==c){var d="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(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?"_":"?"},m=function(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)},t=new XMLHttpRequest;t.open("GET",d+function(a){r="";for(q=0;q<a.length;q+=3)r=q+2==a.length?r+m(a.charCodeAt(q),a.charCodeAt(q+1),0):q+1==a.length?r+m(a.charCodeAt(q),0,0):r+m(a.charCodeAt(q),a.charCodeAt(q+1),a.charCodeAt(q+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(t.responseType="blob");t.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c){a.spinner.stop();g.getModel().beginUpdate();try{cell=g.insertVertex(null,
-null,"<pre>"+this.response+"</pre>",e.x,e.y,1,1,"text;html=1;overflow=fill;"),g.updateCellSize(cell,!0)}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var k=d.width,t=d.height;if(0==k&&0==t){var m=c.target.result,f=m.indexOf(","),m=decodeURIComponent(escape(atob(m.substring(f+1)))),m=mxUtils.parseXml(m).getElementsByTagName("svg");
-0<m.length&&(k=parseFloat(m[0].getAttribute("width")),t=parseFloat(m[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,e.x,e.y,k,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},d.onerror=function(b){a.handleError(b)};else a.spinner.stop(),a.handleError(d)};t.onerror=
-function(b){a.handleError(b)};t.send()}}else if("table"==c){for(var f=null,u=[],h=0,q=0;q<d.length;q++)if(t=mxUtils.trim(d[q]),"create table"==t.substring(0,12).toLowerCase())t=mxUtils.trim(t.substring(12)),"("==t.charAt(t.length-1)&&(t=t.substring(0,t.lastIndexOf(" "))),f=new mxCell(t,new mxGeometry(h,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
-f.vertex=!0,u.push(f),t=a.editor.graph.getPreferredSizeForCell(l),null!=t&&(f.geometry.width=t.width+10);else if(null!=f&&")"==t.charAt(0))h+=f.geometry.width+40,f=null;else if("("!=t&&null!=f&&(t=t.substring(0,","==t.charAt(t.length-1)?t.length-1:t.length),"primary key"!=t.substring(0,11).toLowerCase())){var n=t.toLowerCase().indexOf("primary key"),t=t.replace(/primary key/i,""),l=new mxCell(t,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-l.vertex=!0;t=sb.cloneCell(l,0<n?"PK":"");t.connectable=!1;t.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";t.geometry.width=30;t.geometry.height=26;l.insert(t);t=a.editor.graph.getPreferredSizeForCell(l);null!=t&&f.geometry.width<t.width+10&&(f.geometry.width=Math.min(220,t.width+10));f.insert(l);f.geometry.height+=26}0<u.length&&(g=a.editor.graph,
-d=g.view,t=g.getGraphBounds(),g.setSelectionCells(g.importCells(u,Math.ceil(Math.max(0,t.x/d.scale-d.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(t.y+t.height)/d.scale-d.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==c){if(0<d.length){g=a.editor.graph;f=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-f.vertex=!0;t=g.getPreferredSizeForCell(f);null!=t&&f.geometry.width<t.width+10&&(f.geometry.width=t.width+10);l=[f];if(1<d.length)for(q=1;q<d.length;q++)"--"==d[q]?(t=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;"),t.vertex=!0,f.geometry.height+=t.geometry.height,f.insert(t),l.push(t)):0<d[q].length&&";"!=d[q].charAt(0)&&(h=new mxCell(d[q],
-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;"),h.vertex=!0,t=g.getPreferredSizeForCell(h),null!=t&&h.geometry.width<t.width&&(h.geometry.width=t.width),f.geometry.width=Math.max(f.geometry.width,h.geometry.width),f.geometry.height+=h.geometry.height,f.insert(h),l.push(h));g.getModel().beginUpdate();try{f=g.importCells([f],e.x,e.y)[0],g.fireEvent(new mxEventObject("cellsInserted",
-"cells",[f].concat(f.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(f);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var l=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,u.push(b));return b},F={},u=[],q=0;q<d.length;q++)if(";"!=d[q].charAt(0)){var H=d[q].split("->");2<=H.length&&(h=l(H[0]),n=l(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,h.insertEdge(H,!0),n.insertEdge(H,!1),
-u.push(H))}if(0<u.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);g=new Graph(d);g.getModel().beginUpdate();try{u=g.importCells(u);for(q=0;q<u.length;q++)g.getModel().isVertex(u[q])&&(t=g.getPreferredSizeForCell(u[q]),u[q].geometry.width=Math.max(u[q].geometry.width,t.width),u[q].geometry.height=Math.max(u[q].geometry.height,t.height));f=new mxFastOrganicLayout(g);f.disableEdgeStyle=!1;f.forceConstant=120;f.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();
-l=[];a.editor.graph.getModel().beginUpdate();try{l=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();d.parentNode.removeChild(d)}}}function c(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
-"table"==n.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==n.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"==n.value||"plantUmlTxt"==n.value?
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),k.className="geBtn",c.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),m.value,l.value):null)});k.className="geBtn gePrimaryBtn";c.appendChild(k);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
+c||"plantUmlTxt"==c){var d="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(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?"_":"?"},n=function(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)},t=new XMLHttpRequest;t.open("GET",d+function(a){r="";for(h=0;h<a.length;h+=3)r=h+2==a.length?r+n(a.charCodeAt(h),a.charCodeAt(h+1),0):h+1==a.length?r+n(a.charCodeAt(h),0,0):r+n(a.charCodeAt(h),a.charCodeAt(h+1),a.charCodeAt(h+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(t.responseType="blob");t.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c){a.spinner.stop();g.getModel().beginUpdate();try{cell=g.insertVertex(null,
+null,"<pre>"+this.response+"</pre>",e.x,e.y,1,1,"text;html=1;overflow=fill;"),g.updateCellSize(cell,!0)}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var k=d.width,t=d.height;if(0==k&&0==t){var n=c.target.result,p=n.indexOf(","),n=decodeURIComponent(escape(atob(n.substring(p+1)))),n=mxUtils.parseXml(n).getElementsByTagName("svg");
+0<n.length&&(k=parseFloat(n[0].getAttribute("width")),t=parseFloat(n[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,e.x,e.y,k,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},d.onerror=function(b){a.handleError(b)};else a.spinner.stop(),a.handleError(d)};t.onerror=
+function(b){a.handleError(b)};t.send()}}else if("table"==c){for(var p=null,f=[],u=0,h=0;h<d.length;h++)if(t=mxUtils.trim(d[h]),"create table"==t.substring(0,12).toLowerCase())t=mxUtils.trim(t.substring(12)),"("==t.charAt(t.length-1)&&(t=t.substring(0,t.lastIndexOf(" "))),p=new mxCell(t,new mxGeometry(u,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
+p.vertex=!0,f.push(p),t=a.editor.graph.getPreferredSizeForCell(l),null!=t&&(p.geometry.width=t.width+10);else if(null!=p&&")"==t.charAt(0))u+=p.geometry.width+40,p=null;else if("("!=t&&null!=p&&(t=t.substring(0,","==t.charAt(t.length-1)?t.length-1:t.length),"primary key"!=t.substring(0,11).toLowerCase())){var m=t.toLowerCase().indexOf("primary key"),t=t.replace(/primary key/i,""),l=new mxCell(t,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+l.vertex=!0;t=sb.cloneCell(l,0<m?"PK":"");t.connectable=!1;t.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";t.geometry.width=30;t.geometry.height=26;l.insert(t);t=a.editor.graph.getPreferredSizeForCell(l);null!=t&&p.geometry.width<t.width+10&&(p.geometry.width=Math.min(220,t.width+10));p.insert(l);p.geometry.height+=26}0<f.length&&(g=a.editor.graph,
+d=g.view,t=g.getGraphBounds(),g.setSelectionCells(g.importCells(f,Math.ceil(Math.max(0,t.x/d.scale-d.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(t.y+t.height)/d.scale-d.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==c){if(0<d.length){g=a.editor.graph;p=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+p.vertex=!0;t=g.getPreferredSizeForCell(p);null!=t&&p.geometry.width<t.width+10&&(p.geometry.width=t.width+10);l=[p];if(1<d.length)for(h=1;h<d.length;h++)"--"==d[h]?(t=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;"),t.vertex=!0,p.geometry.height+=t.geometry.height,p.insert(t),l.push(t)):0<d[h].length&&";"!=d[h].charAt(0)&&(u=new mxCell(d[h],
+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;"),u.vertex=!0,t=g.getPreferredSizeForCell(u),null!=t&&u.geometry.width<t.width&&(u.geometry.width=t.width),p.geometry.width=Math.max(p.geometry.width,u.geometry.width),p.geometry.height+=u.geometry.height,p.insert(u),l.push(u));g.getModel().beginUpdate();try{p=g.importCells([p],e.x,e.y)[0],g.fireEvent(new mxEventObject("cellsInserted",
+"cells",[p].concat(p.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(p);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var l=function(a){var b=B[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,B[a]=b,f.push(b));return b},B={},f=[],h=0;h<d.length;h++)if(";"!=d[h].charAt(0)){var H=d[h].split("->");2<=H.length&&(u=l(H[0]),m=l(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,u.insertEdge(H,!0),m.insertEdge(H,!1),
+f.push(H))}if(0<f.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);g=new Graph(d);g.getModel().beginUpdate();try{f=g.importCells(f);for(h=0;h<f.length;h++)g.getModel().isVertex(f[h])&&(t=g.getPreferredSizeForCell(f[h]),f[h].geometry.width=Math.max(f[h].geometry.width,t.width),f[h].geometry.height=Math.max(f[h].geometry.height,t.height));p=new mxFastOrganicLayout(g);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();
+l=[];a.editor.graph.getModel().beginUpdate();try{l=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();d.parentNode.removeChild(d)}}}function c(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
+"table"==m.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==m.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"==m.value||"plantUmlTxt"==m.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 e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height="354px";h.style.marginBottom="16px";
-var n=document.createElement("select"),l=document.createElement("option");l.setAttribute("value","list");l.setAttribute("selected","selected");mxUtils.write(l,mxResources.get("list"));n.appendChild(l);l=document.createElement("option");l.setAttribute("value","table");mxUtils.write(l,mxResources.get("table"));n.appendChild(l);l=document.createElement("option");l.setAttribute("value","diagram");mxUtils.write(l,mxResources.get("diagram"));n.appendChild(l);l=document.createElement("option");l.setAttribute("value",
-"plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(n.appendChild(l),n.appendChild(g),
-n.appendChild(k));var m=c();h.value=m;f.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.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){h.value=a.target.result};b.readAsText(a)}},!1));f.appendChild(n);mxEvent.addListener(n,"change",function(){var a=c();if(0==h.value.length||
-h.value==m)m=a,h.value=m});l=mxUtils.button(mxResources.get("close"),function(){h.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});l.className="geBtn";a.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(h.value,n.value)});f.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(l);this.container=f},NewDialog=function(a,b,d,c,e,f,h,n,l,g,k,m,q,u,p){function v(){for(var a=
-!0;C<M.length&&(a||0!=mxUtils.mod(C,30));)a=M[C++],t(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function x(){if(O)d||a.hideDialog(),u(O,N,B.value);else if(c)d||a.hideDialog(),c(T,B.value);else{var b=B.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
-null,c)})}}function y(a,b,c,d,g){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");F.removeAttribute("disabled");T=b;V=c;R=a;O=d;N=g;R.style.backgroundColor=n;R.style.border=l}function t(a,b,c,d,g,k,e,t){var m=document.createElement("div");m.className="geTemplate";m.style.height=S+"px";m.style.width=Y+"px";null!=d&&0<d.length&&m.setAttribute("title",d);if(null!=k)m.style.backgroundImage="url("+k+")",m.style.backgroundSize="contain",m.style.backgroundPosition=
-"center center",m.style.backgroundRepeat="no-repeat",mxEvent.addListener(m,"click",function(b){y(m,null,null,a,e)}),mxEvent.addListener(m,"dblclick",function(a){x()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);m.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var f=!1;mxEvent.addListener(m,"click",function(c){F.setAttribute("disabled","disabled");m.style.backgroundColor="transparent";
-m.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(m,a.getText(),b),f&&x())}))});mxEvent.addListener(m,"dblclick",function(a){f=!0})}else m.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",g&&y(m),null!=t?mxEvent.addListener(m,"click",t):(mxEvent.addListener(m,"click",function(a){y(m)}),mxEvent.addListener(m,"dblclick",function(a){x()}));
-K.appendChild(m)}function z(){mxEvent.addListener(K,"scroll",function(a){K.scrollTop+K.clientHeight>=K.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in I){var c=document.createElement("div"),d=mxResources.get(b),k=I[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+
-k.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);P.appendChild(c);null==a&&(a=c,a.style.backgroundColor=h);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=h,K.scrollTop=0,K.innerHTML="",C=0,M=I[b],A=null,v())})})(b,c)}v()}d=null!=d?d:!0;e=null!=e?e:!1;h=null!=h?h:"#ebf2f9";n=null!=n?n:"#e6eff8";l=null!=l?l:"1px solid #ccd9ea";k=null!=k?k:TEMPLATE_PATH+"/index.xml";var G=document.createElement("div");
-G.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&G.appendChild(D);var w=document.createElement("img");w.setAttribute("border","0");w.setAttribute("align","absmiddle");w.style.width="40px";w.style.height="40px";w.style.marginRight="10px";w.style.paddingBottom="4px";w.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_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&D.appendChild(w);d&&mxUtils.write(D,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");w=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?w=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?w=a.dropbox.extension:
-a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?w=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?w=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(w=a.trello.extension);var B=document.createElement("input");B.setAttribute("value",a.defaultFilename+w);B.style.marginRight="20px";B.style.marginLeft="10px";B.style.width=b?"220px":"430px";this.init=function(){d&&(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",
-!1,null))};d&&D.appendChild(B);var D=!1,C=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");x();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(m||q){var H=[],A=null,L=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<H.length;b++)H[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},D=!0,w=document.createElement("div");w.style.whiteSpace="nowrap";w.style.height="30px";G.appendChild(w);var E=mxUtils.button(mxResources.get("Templates",
-null,"Templates"),function(){P.style.display="";K.style.left="160px";L(0);K.scrollTop=0;K.innerHTML="";C=0;A!=M&&(M=A,v(),A=null)});H.push(E);w.appendChild(E);var J=function(a){P.style.display="none";K.style.left="30px";L(a?-1:1);null==A&&(A=M);K.scrollTop=0;K.innerHTML="";var b=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});b.spin(K);C=0;var c=function(a,c){b.stop();M=a;c?K.innerHTML=c:0==a.length?K.innerHTML=
-mxResources.get("noDiagrams",null,"No Diagrams Found"):(K.innerHTML="",v())};a?q(Q.value,c):m(c)};m&&(E=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){J()}),w.appendChild(E),H.push(E));if(q){E=document.createElement("span");E.style.marginLeft="10px";E.innerHTML=mxResources.get("search")+":";w.appendChild(E);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(a){13==a.keyCode&&
-J(!0)});w.appendChild(Q);E=mxUtils.button(mxResources.get("search"),function(){J(!0)});E.className="geBtn";w.appendChild(E)}L(0)}var V=null,T=null,R=null,O=null,N=null,K=document.createElement("div");K.style.border="1px solid #d3d3d3";K.style.position="absolute";K.style.left="160px";K.style.right="34px";D=(d?72:40)+(D?30:0);K.style.top=D+"px";K.style.bottom="68px";K.style.margin="6px 0 0 -1px";K.style.padding="6px";K.style.overflow="auto";var P=document.createElement("div");P.style.cssText="position:absolute;left:30px;width:128px;top:"+
-D+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,I={},aa=1;I.basic=[{title:"blankDiagram",select:!0}];var M=I.basic;if(!b){G.appendChild(P);G.appendChild(K);var X=!1;mxUtils.get(k,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=I[b];null==c&&(aa++,c=[],I[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),
-title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}z()}})}mxEvent.addListener(B,"keypress",function(a){13==a.keyCode&&x()});k=document.createElement("div");k.style.marginTop=b?"4px":"16px";k.style.textAlign="right";k.style.position="absolute";k.style.left="40px";k.style.bottom="24px";k.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});D.className="geBtn";!a.editor.cancelFirst||e&&null==f||k.appendChild(D);b||a.isOffline()||
-!d||null!=c||e||(w=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),w.className="geBtn",k.appendChild(w));b||"1"==urlParams.embed||e||(b=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(B.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()}),b.className="geBtn",k.appendChild(b));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),p.className="geBtn",k.appendChild(p));k.appendChild(F);a.editor.cancelFirst||null!=
-c||e&&null==f||k.appendChild(D);G.appendChild(k);this.container=G},CreateDialog=function(a,b,d,c,e,f,h,n,l,g,k,m,q,u,p){function v(c,d,g,k){function e(){mxEvent.addListener(t,"click",function(){var c=g;if(h){var d=z.value,k=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>k){var c=null!=c?c:w.value,m="";c==App.MODE_GOOGLE?m=a.drive.extension:c==App.MODE_GITHUB?m=a.gitHub.extension:c==App.MODE_TRELLO?m=a.trello.extension:c==App.MODE_DROPBOX?m=a.dropbox.extension:c==App.MODE_ONEDRIVE?m=a.oneDrive.extension:
-c==App.MODE_DEVICE&&(m=".xml");0<=k&&(d=d.substring(0,k));z.value=d+m}}x(g)})}var t=document.createElement("a");t.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";t.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";t.className="geBaseButton";t.style.position="relative";t.style.margin="4px";t.style.padding="8px 8px 10px 8px";t.style.whiteSpace=
-"nowrap";t.appendChild(f);mxClient.IS_QUIRKS&&(t.style.cssFloat="left",t.style.zoom="1");t.style.color="gray";t.style.fontSize="11px";var u=document.createElement("div");t.appendChild(u);mxUtils.write(u,d);if(null!=k&&null==a[k]){f.style.visibility="hidden";mxUtils.setOpacity(u,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(t);var p=window.setTimeout(function(){null==a[k]&&(q.stop(),t.style.display=
-"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(p),mxUtils.setOpacity(u,100),f.style.visibility="",q.stop(),e())}))}else e();G.appendChild(t);++D==m&&(mxUtils.br(G),D=0)}function x(b){var c=z.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}h=null!=h?h:!0;n=null!=n?n:!0;m=null!=m?m:4;var y=document.createElement("div");null==c&&a.addLanguageMenu(y);var t=document.createElement("h2");mxUtils.write(t,e||mxResources.get("create"));t.style.marginTop=
-"0px";t.style.marginBottom="24px";y.appendChild(t);mxUtils.write(y,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",b);z.style.width="280px";z.style.marginLeft="10px";z.style.marginBottom="20px";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",!1,null)};y.appendChild(z);null!=q&&null!=u&&"image/"==u.substring(0,6)&&(z.style.width="160px",e=null,"image/svg+xml"==
-u&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(q),q=e.getElementsByTagName("svg")[0],u=parseInt(q.getAttribute("width")),p=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+u+" "+p),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+u+(p?";base64,":";utf8,")+q)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",
-mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),y.appendChild(e),l&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){x("_blank")})));mxUtils.br(y);var G=document.createElement("div");G.style.textAlign="center";var D=0;G.style.marginTop="6px";y.appendChild(G);var w=document.createElement("select");w.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),
-mxUtils.write(e,mxResources.get("googleDrive")),w.appendChild(e),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),w.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
-"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),w.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),w.appendChild(e),v(IMAGE_PATH+"/github-logo.svg",
-mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),w.appendChild(e),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),
-w.appendChild(e),a.mode!=App.MODE_DEVICE&&n||e.setAttribute("selected","selected"),k&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),w.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");
-n.style.marginTop="26px";n.style.textAlign="center";null!=g&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),e.className="geBtn",n.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&n.appendChild(e);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),q.className="geBtn",n.appendChild(q));l&&(l=
-mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),l.className="geBtn",n.appendChild(l));mxClient.IS_IOS||(f=mxUtils.button(f||mxResources.get("create"),function(){x(k?"download":App.MODE_DEVICE)}),f.className="geBtn gePrimaryBtn",n.appendChild(f));a.editor.cancelFirst||n.appendChild(e);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(n);this.container=y},PopupDialog=
-function(a,b,d,c,e){e=null!=e?e:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var h=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=c&&c()});h.className="geBtn";h.style.marginBottom="8px";h.style.width="280px";f.appendChild(h);mxUtils.br(f);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});n.className=
-"geBtn gePrimaryBtn";n.style.width=h.style.width;f.appendChild(n);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,b,d,c,e,f){f=null!=f?f:!0;var h=a.editor.graph,n=document.createElement("div");mxUtils.write(n,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||
+var m=document.createElement("select"),l=document.createElement("option");l.setAttribute("value","list");l.setAttribute("selected","selected");mxUtils.write(l,mxResources.get("list"));m.appendChild(l);l=document.createElement("option");l.setAttribute("value","table");mxUtils.write(l,mxResources.get("table"));m.appendChild(l);l=document.createElement("option");l.setAttribute("value","diagram");mxUtils.write(l,mxResources.get("diagram"));m.appendChild(l);l=document.createElement("option");l.setAttribute("value",
+"plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(m.appendChild(l),m.appendChild(g),
+m.appendChild(k));var n=c();h.value=n;f.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.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){h.value=a.target.result};b.readAsText(a)}},!1));f.appendChild(m);mxEvent.addListener(m,"change",function(){var a=c();if(0==h.value.length||
+h.value==n)n=a,h.value=n});l=mxUtils.button(mxResources.get("close"),function(){h.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});l.className="geBtn";a.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(h.value,m.value)});f.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(l);this.container=f},NewDialog=function(a,b,d,c,e,f,h,m,l,g,k,n,u,p,q){function w(){for(var a=
+!0;y<M.length&&(a||0!=mxUtils.mod(y,30));)a=M[y++],t(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function v(){if(O)d||a.hideDialog(),p(O,N,D.value);else if(c)d||a.hideDialog(),c(T,D.value);else{var b=D.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
+null,c)})}}function A(a,b,c,d,g){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");B.removeAttribute("disabled");T=b;V=c;R=a;O=d;N=g;R.style.backgroundColor=m;R.style.border=l}function t(a,b,c,d,g,k,t,e){var n=document.createElement("div");n.className="geTemplate";n.style.height=S+"px";n.style.width=Y+"px";null!=d&&0<d.length&&n.setAttribute("title",d);if(null!=k)n.style.backgroundImage="url("+k+")",n.style.backgroundSize="contain",n.style.backgroundPosition=
+"center center",n.style.backgroundRepeat="no-repeat",mxEvent.addListener(n,"click",function(b){A(n,null,null,a,t)}),mxEvent.addListener(n,"dblclick",function(a){v()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);n.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";var p=!1;mxEvent.addListener(n,"click",function(c){B.setAttribute("disabled","disabled");n.style.backgroundColor="transparent";
+n.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(A(n,a.getText(),b),p&&v())}))});mxEvent.addListener(n,"dblclick",function(a){p=!0})}else n.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",g&&A(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){A(n)}),mxEvent.addListener(n,"dblclick",function(a){v()}));
+L.appendChild(n)}function x(){mxEvent.addListener(L,"scroll",function(a){L.scrollTop+L.clientHeight>=L.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,b;for(b in I){var c=document.createElement("div"),d=mxResources.get(b),k=I[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+
+k.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);P.appendChild(c);null==a&&(a=c,a.style.backgroundColor=h);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=h,L.scrollTop=0,L.innerHTML="",y=0,M=I[b],C=null,w())})})(b,c)}w()}d=null!=d?d:!0;e=null!=e?e:!1;h=null!=h?h:"#ebf2f9";m=null!=m?m:"#e6eff8";l=null!=l?l:"1px solid #ccd9ea";k=null!=k?k:TEMPLATE_PATH+"/index.xml";var G=document.createElement("div");
+G.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";d&&G.appendChild(F);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width="40px";z.style.height="40px";z.style.marginRight="10px";z.style.paddingBottom="4px";z.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_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&F.appendChild(z);d&&mxUtils.write(F,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");z=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?z=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?z=a.dropbox.extension:
+a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?z=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?z=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(z=a.trello.extension);var D=document.createElement("input");D.setAttribute("value",a.defaultFilename+z);D.style.marginRight="20px";D.style.marginLeft="10px";D.style.width=b?"220px":"430px";this.init=function(){d&&(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?D.select():document.execCommand("selectAll",
+!1,null))};d&&F.appendChild(D);var F=!1,y=0,B=mxUtils.button(mxResources.get("create"),function(){B.setAttribute("disabled","disabled");v();B.removeAttribute("disabled")});B.className="geBtn gePrimaryBtn";if(n||u){var H=[],C=null,J=function(a){B.setAttribute("disabled","disabled");for(var b=0;b<H.length;b++)H[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},F=!0,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);var E=mxUtils.button(mxResources.get("Templates",
+null,"Templates"),function(){P.style.display="";L.style.left="160px";J(0);L.scrollTop=0;L.innerHTML="";y=0;C!=M&&(M=C,w(),C=null)});H.push(E);z.appendChild(E);var K=function(a){P.style.display="none";L.style.left="30px";J(a?-1:1);null==C&&(C=M);L.scrollTop=0;L.innerHTML="";var b=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});b.spin(L);y=0;var c=function(a,c){b.stop();M=a;c?L.innerHTML=c:0==a.length?L.innerHTML=
+mxResources.get("noDiagrams",null,"No Diagrams Found"):(L.innerHTML="",w())};a?u(Q.value,c):n(c)};n&&(E=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){K()}),z.appendChild(E),H.push(E));if(u){E=document.createElement("span");E.style.marginLeft="10px";E.innerHTML=mxResources.get("search")+":";z.appendChild(E);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(a){13==a.keyCode&&
+K(!0)});z.appendChild(Q);E=mxUtils.button(mxResources.get("search"),function(){K(!0)});E.className="geBtn";z.appendChild(E)}J(0)}var V=null,T=null,R=null,O=null,N=null,L=document.createElement("div");L.style.border="1px solid #d3d3d3";L.style.position="absolute";L.style.left="160px";L.style.right="34px";F=(d?72:40)+(F?30:0);L.style.top=F+"px";L.style.bottom="68px";L.style.margin="6px 0 0 -1px";L.style.padding="6px";L.style.overflow="auto";var P=document.createElement("div");P.style.cssText="position:absolute;left:30px;width:128px;top:"+
+F+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,I={},aa=1;I.basic=[{title:"blankDiagram",select:!0}];var M=I.basic;if(!b){G.appendChild(P);G.appendChild(L);var X=!1;mxUtils.get(k,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=I[b];null==c&&(aa++,c=[],I[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),
+title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}x()}})}mxEvent.addListener(D,"keypress",function(a){13==a.keyCode&&v()});k=document.createElement("div");k.style.marginTop=b?"4px":"16px";k.style.textAlign="right";k.style.position="absolute";k.style.left="40px";k.style.bottom="24px";k.style.right="40px";F=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});F.className="geBtn";!a.editor.cancelFirst||e&&null==f||k.appendChild(F);b||a.isOffline()||
+!d||null!=c||e||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",k.appendChild(z));b||"1"==urlParams.embed||e||(b=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(D.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()}),b.className="geBtn",k.appendChild(b));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),q.className="geBtn",k.appendChild(q));k.appendChild(B);a.editor.cancelFirst||null!=
+c||e&&null==f||k.appendChild(F);G.appendChild(k);this.container=G},CreateDialog=function(a,b,d,c,e,f,h,m,l,g,k,n,u,p,q){function w(c,d,g,k){function t(){mxEvent.addListener(e,"click",function(){var c=g;if(h){var d=x.value,k=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>k){var c=null!=c?c:z.value,t="";c==App.MODE_GOOGLE?t=a.drive.extension:c==App.MODE_GITHUB?t=a.gitHub.extension:c==App.MODE_TRELLO?t=a.trello.extension:c==App.MODE_DROPBOX?t=a.dropbox.extension:c==App.MODE_ONEDRIVE?t=a.oneDrive.extension:
+c==App.MODE_DEVICE&&(t=".xml");0<=k&&(d=d.substring(0,k));x.value=d+t}}v(g)})}var e=document.createElement("a");e.style.overflow="hidden";var p=document.createElement("img");p.src=c;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace=
+"nowrap";e.appendChild(p);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var f=document.createElement("div");e.appendChild(f);mxUtils.write(f,d);if(null!=k&&null==a[k]){p.style.visibility="hidden";mxUtils.setOpacity(f,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(e);var u=window.setTimeout(function(){null==a[k]&&(q.stop(),e.style.display=
+"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(u),mxUtils.setOpacity(f,100),p.style.visibility="",q.stop(),t())}))}else t();G.appendChild(e);++F==n&&(mxUtils.br(G),F=0)}function v(b){var c=x.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}h=null!=h?h:!0;m=null!=m?m:!0;n=null!=n?n:4;var A=document.createElement("div");null==c&&a.addLanguageMenu(A);var t=document.createElement("h2");mxUtils.write(t,e||mxResources.get("create"));t.style.marginTop=
+"0px";t.style.marginBottom="24px";A.appendChild(t);mxUtils.write(A,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",b);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};A.appendChild(x);null!=u&&null!=p&&"image/"==p.substring(0,6)&&(x.style.width="160px",e=null,"image/svg+xml"==
+p&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(u),u=e.getElementsByTagName("svg")[0],p=parseInt(u.getAttribute("width")),q=parseInt(u.getAttribute("height")),u.setAttribute("viewBox","0 0 "+p+" "+q),u.setAttribute("width","120px"),u.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+p+(q?";base64,":";utf8,")+u)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",
+mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),A.appendChild(e),l&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){v("_blank")})));mxUtils.br(A);var G=document.createElement("div");G.style.textAlign="center";var F=0;G.style.marginTop="6px";A.appendChild(G);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),
+mxUtils.write(e,mxResources.get("googleDrive")),z.appendChild(e),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),z.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
+"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),z.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),z.appendChild(e),w(IMAGE_PATH+"/github-logo.svg",
+mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),z.appendChild(e),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),
+z.appendChild(e),a.mode!=App.MODE_DEVICE&&m||e.setAttribute("selected","selected"),k&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),z.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");
+m.style.marginTop="26px";m.style.textAlign="center";null!=g&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),e.className="geBtn",m.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&m.appendChild(e);null==c&&(u=mxUtils.button(mxResources.get("decideLater"),function(){v(null)}),u.className="geBtn",m.appendChild(u));l&&(l=
+mxUtils.button(mxResources.get("openInNewWindow"),function(){v("_blank")}),l.className="geBtn",m.appendChild(l));mxClient.IS_IOS||(f=mxUtils.button(f||mxResources.get("create"),function(){v(k?"download":App.MODE_DEVICE)}),f.className="geBtn gePrimaryBtn",m.appendChild(f));a.editor.cancelFirst||m.appendChild(e);mxEvent.addListener(x,"keypress",function(b){13==b.keyCode?v(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});A.appendChild(m);this.container=A},PopupDialog=
+function(a,b,d,c,e){e=null!=e?e:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var h=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=c&&c()});h.className="geBtn";h.style.marginBottom="8px";h.style.width="280px";f.appendChild(h);mxUtils.br(f);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});m.className=
+"geBtn gePrimaryBtn";m.style.width=h.style.width;f.appendChild(m);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,b,d,c,e,f){f=null!=f?f:!0;var h=a.editor.graph,m=document.createElement("div");mxUtils.write(m,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||
(b.style.paddingRight="20px");var l=document.createElement("input");l.setAttribute("value",d);l.setAttribute("type","text");l.setAttribute("spellcheck","false");l.setAttribute("autocorrect","off");l.setAttribute("autocomplete","off");l.setAttribute("autocapitalize","off");l.style.marginTop="6px";l.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition=
-"100% 50%";l.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){l.value="";l.focus()});b.appendChild(l);b.appendChild(d);n.appendChild(b);
-var g=function(b,d,g,k){var m="data:"==b.substring(0,5);!a.isOffline()||m&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(m){a.spinner.stop();a.hideDialog();var t=!1===k?1:null!=d&&null!=g?Math.max(d/m.width,g/m.height):Math.min(1,Math.min(520/m.width,520/m.height));f&&(b=a.convertDataUri(b));c(b,Math.round(Number(m.width)*t),Math.round(Number(m.height)*t))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,g=null==g?100:g,a.hideDialog(),c(b,d,g))},k=function(b,d){if(null!=b){var k=e?null:h.getModel().getGeometry(h.getSelectionCell());null!=k?g(b,k.width,k.height,d):g(b,null,null,d)}else a.hideDialog(),c(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=n.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.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,c,d,g,m,e,f){k(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));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&k(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),
-function(){a.spinner.stop();a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);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&&(l.value=a.url));l.focus()};if(Graph.fileSupport){var m=document.createElement("input");m.setAttribute("multiple","multiple");m.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(m,"change",function(b){a.importFiles(m.files,
-0,0,a.maxImageSize,function(a,b,c,d,g,m){k(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){m.click()});q.className="geBtn";d.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==l.value.substring(0,11)&&"data:image/svg"!=l.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,l.value,function(a){l.value=
-a});a.showDialog(b.container,200,180,!0,!0);b.init()}),q.className="geBtn",d.appendChild(q));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
-q.className="geBtn",d.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&(q=mxUtils.button(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.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),q.className="geBtn",d.appendChild(q)));mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&k(l.value)});q=mxUtils.button(mxResources.get("apply"),function(){k(l.value)});q.className="geBtn gePrimaryBtn";d.appendChild(q);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
-"center 65%",n.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),n.appendChild(b));n.appendChild(d);this.container=n},LinkDialog=function(a,b,d,c,e){function f(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);x.appendChild(c)}var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var l=document.createElement("input");
+"100% 50%";l.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){l.value="";l.focus()});b.appendChild(l);b.appendChild(d);m.appendChild(b);
+var g=function(b,d,g,k){var e="data:"==b.substring(0,5);!a.isOffline()||e&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(t){a.spinner.stop();a.hideDialog();var e=!1===k?1:null!=d&&null!=g?Math.max(d/t.width,g/t.height):Math.min(1,Math.min(520/t.width,520/t.height));f&&(b=a.convertDataUri(b));c(b,Math.round(Number(t.width)*e),Math.round(Number(t.height)*e))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,g=null==g?100:g,a.hideDialog(),c(b,d,g))},k=function(b,d){if(null!=b){var k=e?null:h.getModel().getGeometry(h.getSelectionCell());null!=k?g(b,k.width,k.height,d):g(b,null,null,d)}else a.hideDialog(),c(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=m.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.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,c,d,g,e,n,p){k(a,
+p)},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));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&k(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),
+function(){a.spinner.stop();a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);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&&(l.value=a.url));l.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,
+0,0,a.maxImageSize,function(a,b,c,d,g,e){k(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var u=mxUtils.button(mxResources.get("open"),function(){n.click()});u.className="geBtn";d.appendChild(u)}}document.createElement("canvas").getContext&&"data:image/"==l.value.substring(0,11)&&"data:image/svg"!=l.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,l.value,function(a){l.value=
+a});a.showDialog(b.container,200,180,!0,!0);b.init()}),u.className="geBtn",d.appendChild(u));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(u=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
+u.className="geBtn",d.appendChild(u),null!=a.drive&&"1"==urlParams.photos&&(u=mxUtils.button(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.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),u.className="geBtn",d.appendChild(u)));mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&k(l.value)});u=mxUtils.button(mxResources.get("apply"),function(){k(l.value)});u.className="geBtn gePrimaryBtn";d.appendChild(u);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition=
+"center 65%",m.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),m.appendChild(b));m.appendChild(d);this.container=m},LinkDialog=function(a,b,d,c,e){function f(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);v.appendChild(c)}var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.style.paddingRight="20px");var l=document.createElement("input");
l.setAttribute("placeholder",mxResources.get("dragUrlsHere"));l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="400px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";var g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";
-g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){l.value="";l.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","current-linkdialog");var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";
-m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(l.setAttribute("value",b),k.setAttribute("checked","checked"),k.defaultChecked=!0);l.style.width="380px";n.appendChild(k);n.appendChild(l);n.appendChild(g);mxUtils.br(n);n.appendChild(m);e=!1;for(g=0;g<a.pages.length;g++){var u=
-document.createElement("option");mxUtils.write(u,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));u.setAttribute("value","data:page/id,"+a.pages[g].getId());b==u.getAttribute("value")&&(u.setAttribute("selected","selected"),e=!0);q.appendChild(u)}if(!e&&m.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");q.appendChild(p);mxEvent.addListener(q,
-"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}n.appendChild(q)}else l.setAttribute("value",b),n.appendChild(l),n.appendChild(g);h.appendChild(n);var v=mxUtils.button(d,function(){a.hideDialog();c(m.checked?"pageNotFound"!==q.value?q.value:b:l.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){m.checked?q.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){k.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(l,"focus",function(){m.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var b=h.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
-x.style.marginTop="20px";x.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&x.appendChild(d);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||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
+g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){l.value="";l.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";
+n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(l.setAttribute("value",b),k.setAttribute("checked","checked"),k.defaultChecked=!0);l.style.width="380px";m.appendChild(k);m.appendChild(l);m.appendChild(g);mxUtils.br(m);m.appendChild(n);e=!1;for(g=0;g<a.pages.length;g++){var 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());b==p.getAttribute("value")&&(p.setAttribute("selected","selected"),e=!0);u.appendChild(p)}if(!e&&n.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");u.appendChild(q);mxEvent.addListener(u,
+"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}m.appendChild(u)}else l.setAttribute("value",b),m.appendChild(l),m.appendChild(g);h.appendChild(m);var w=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==u.value?u.value:b:l.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?u.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){k.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(l,"focus",function(){n.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var b=h.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var v=document.createElement("div");
+v.style.marginTop="20px";v.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&v.appendChild(d);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||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
"https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);l.value=b;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&f(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=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(d).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){l.value=a[0].link;l.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){l.value=b.value[0].webUrl;
-l.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");l.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;l.focus()}})});mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(m.checked?q.value:l.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(d);h.appendChild(x);this.container=
+l.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");l.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;l.focus()}})});mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(n.checked?u.value:l.value,LinkDialog.selectedDocs))});v.appendChild(w);a.editor.cancelFirst||v.appendChild(d);h.appendChild(v);this.container=
h},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+
"/logo-flat.png"));b.appendChild(d);mxUtils.br(b);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),
function(){var b=(h.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.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(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+l.value+b),
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";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change",
function(){0<c.value.length&&0<f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(c,"keyup",function(){0<c.value.length&&f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(c);this.init=function(){c.focus()};var h=document.createElement("input");h.setAttribute("type","checkbox");h.setAttribute("checked","checked");h.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(h);
-var n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(n);mxEvent.addListener(n,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));b.appendChild(d);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));
-b.appendChild(l);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(d.appendChild(n),d.appendChild(e)):(d.appendChild(e),d.appendChild(n));b.appendChild(d);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
+var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(m);mxEvent.addListener(m,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));b.appendChild(d);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));
+b.appendChild(l);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(e)):(d.appendChild(e),d.appendChild(m));b.appendChild(d);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));c.appendChild(e);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";c.appendChild(f);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.left="199px";h.style.width="470px";h.style.height=
-"376px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);c.appendChild(h);var n=new Graph(h);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var l=0,g=null,k=0,m=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==a?k+1:m.apply(this,arguments)};n.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),p=null,v=null,x=null,y=null,t=mxUtils.button("",function(){null!=x&&n.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));
-t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var z=mxUtils.button("",function(){null!=x&&n.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var G=mxUtils.button("",function(){null!=x&&(n.maxFitScale=8,n.fit(8),n.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 D=mxUtils.button("",function(){null!=x&&(n.zoomActual(),n.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var w=
-document.createElement("div");w.style.position="absolute";w.style.textAlign="right";w.style.color="gray";w.style.marginTop="10px";w.style.backgroundColor="transparent";w.style.top="440px";w.style.right="32px";w.style.maxWidth="380px";w.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(x.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
-(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var H=null;mxEvent.addListener(F,"change",function(a){null!=
-H&&(H(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),window.openWindow(a.getUrl()))});A.className="geBtn";A.setAttribute("disabled","disabled");null!=d&&(A.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
-"disabled");null!=d&&(L.style.display="none",C.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var E=document.createElement("div");E.className="geToolbarContainer";E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var J=null;if(null!=b&&0<b.length){h.style.cursor="move";var Q=document.createElement("table");Q.style.border=
-"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(l=mxUtils.indexOf(a.pages,a.currentPage));for(var R=b.length-1;0<=R;R--){var O=function(c){var d=new Date(c.modifiedDate),m=null;if(0<=d.getTime()){var e=function(b){q.stop();var c=mxUtils.parseXml(b),e=a.editor.extractGraphModel(c.documentElement,!0);if(null!=e){var f=function(b){null!=b&&(b=
-p(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},p=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};F.style.display="none";F.innerHTML="";x=c;y=b;g=parseSelectFunction=null;k=0;if("mxfile"==e.nodeName){c=e.getElementsByTagName("diagram");g=[];for(b=0;b<c.length;b++)g.push(c[b]);
-k=Math.min(l,g.length-1);0<g.length&&f(g[k]);if(1<g.length)for(F.removeAttribute("disabled"),F.style.display="",b=0;b<g.length;b++)c=document.createElement("option"),mxUtils.write(c,g[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==k&&c.setAttribute("selected","selected"),F.appendChild(c);H=function(){k=l=parseInt(F.value);f(g[l])}}else p(e);w.innerHTML="";mxUtils.write(w,d.toLocaleDateString()+" "+d.toLocaleTimeString());w.setAttribute("title",m.getAttribute("title"));
-t.removeAttribute("disabled");z.removeAttribute("disabled");G.removeAttribute("disabled");D.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),B.removeAttribute("disabled"),L.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(D,60)}else F.style.display="none",F.innerHTML="",w.innerHTML="",mxUtils.write(w,mxResources.get("errorLoadingFile"))},
-m=document.createElement("tr");m.style.borderBottom="1px solid lightGray";m.style.fontSize="12px";m.style.cursor="pointer";var f=document.createElement("td");f.style.padding="6px";f.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(f,mxResources.get("current")):d.toDateString()===T?mxUtils.write(f,d.toLocaleTimeString()):mxUtils.write(f,d.toLocaleDateString()+" "+d.toLocaleTimeString());m.appendChild(f);m.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
-(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){v!=c&&(q.stop(),null!=p&&(p.style.backgroundColor=""),v=c,p=m,p.style.backgroundColor="#ebf2f9",y=x=null,w.removeAttribute("title"),w.innerHTML=mxResources.get("loading")+"...",h.style.backgroundColor="#ffffff",n.getModel().clear(),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),D.setAttribute("disabled",
-"disabled"),G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(D,20),q.spin(h),c.getXml(function(a){v==c&&e(a)},function(a){q.stop();F.style.display="none";F.innerHTML="";w.innerHTML="";mxUtils.write(w,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){L.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(m)}return m}(b[R]);null!=O&&R==b.length-1&&(J=O)}Q.appendChild(V);f.appendChild(Q)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(h.style.display="none",E.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(h.style.display="none",E.style.display="none",mxUtils.write(f,
-mxResources.get("noRevisions")));this.init=function(){null!=J&&J.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";E.appendChild(F);E.appendChild(t);E.appendChild(z);E.appendChild(D);E.appendChild(G);a.editor.cancelFirst?(e.appendChild(f),e.appendChild(B),e.appendChild(A),e.appendChild(C),e.appendChild(L)):(e.appendChild(B),e.appendChild(A),e.appendChild(C),e.appendChild(L),e.appendChild(f));c.appendChild(e);c.appendChild(E);c.appendChild(w);this.container=
-c},DraftDialog=function(a,b,d,c,e,f,h,n){var l=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,b);l.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.marginTop="10px";k.style.width="640px";k.style.top="46px";k.style.bottom="74px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);l.appendChild(k);var m=new Graph(k);
-m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;b=mxUtils.parseXml(d);var q=a.editor.extractGraphModel(b.documentElement,!0),u=0,p=null,v=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=p&&null!=p[u]?p[u].getAttribute("name"):"pagenumber"==a?u+1:v.apply(this,arguments)};m.getLinkForCell=function(){return null};b=mxUtils.button("",function(){m.zoomIn()});b.className=
-"geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){m.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){m.maxFitScale=8;m.fit(8);m.center()});g.className="geSprite geSprite-fit";g.setAttribute("title",
-mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var x=mxUtils.button("",function(){m.zoomActual();m.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);e=mxUtils.button(h||mxResources.get("discard"),e);e.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position=
-"relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";c=mxUtils.button(f||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.width="640px";f.style.textAlign="right";h=document.createElement("div");h.className="geToolbarContainer";h.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(y,"change",function(a){u=parseInt(y.value);c(p[u]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram");
-p=[];for(var g=0;g<d.length;g++)p.push(d[g]);0<p.length&&c(p[u]);if(1<p.length)for(y.style.display="",g=0;g<p.length;g++)d=document.createElement("option"),mxUtils.write(d,p[g].getAttribute("name")||mxResources.get("pageWithNumber",[g+1])),d.setAttribute("value",g),g==u&&d.setAttribute("selected","selected"),y.appendChild(d)}else b(q)};h.appendChild(y);h.appendChild(b);h.appendChild(d);h.appendChild(x);h.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
-"geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(f.appendChild(b),null!=n&&f.appendChild(n),f.appendChild(e),f.appendChild(c)):(f.appendChild(c),f.appendChild(e),null!=n&&f.appendChild(n),f.appendChild(b));l.appendChild(f);l.appendChild(h);this.container=l},FindWindow=function(a,b,d,c,e){function f(a,b,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 g=
-mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,c.length)===c||null!=a&&a.test(g))return!0}}return!1}function h(){var a=l.model.getDescendants(l.model.getRoot()),b=q.value.toLowerCase(),c=u.checked?new RegExp(b):null,d=null;g!=b&&(g=b,k=null);var m=null==k;if(0<b.length)for(var e=0;e<a.length;e++){var h=l.view.getState(a[e]);if(null!=h&&null!=h.cell.value&&(m||null==d)&&(l.model.isVertex(h.cell)||l.model.isEdge(h.cell))&&(l.isHtmlLabel(h.cell)?
-(p.innerHTML=l.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([p])):label=l.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||f(c,h.cell,b))||null!=c&&(c.test(label)||f(c,h.cell,b))))if(m){d=h;break}else null==d&&(d=h);m=m||h==k}null!=d?(k=d,l.scrollCellToVisible(k.cell),l.isEnabled()?l.setSelectionCell(k.cell):l.highlightCell(k.cell)):l.isEnabled()&&l.clearSelection();return 0==b.length||null!=d}
-var n=a.actions.get("find"),l=a.editor.graph,g=null,k=null,m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";m.appendChild(q);mxUtils.br(m);var u=document.createElement("input");
-u.setAttribute("type","checkbox");u.style.marginRight="4px";m.appendChild(u);mxUtils.write(m,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(m);var v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";g=k=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";m.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=
-h()?"":"#ffcfcf"}catch(x){a.handleError(x)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";m.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(g!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=h()?"":"#ffcfcf"}catch(y){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(m,"keydown",function(b){70==b.keyCode&&
-a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(n.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),m,b,d,c,e,!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.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},
-TagsWindow=function(a,b,d,c,e){function f(a){a=null!=a?a:n.model.getDescendants(n.model.getRoot());for(var b=k.value.split(" "),c=[],d=0;d<a.length;d++)if(n.model.isVertex(a[d])||n.model.isEdge(a[d])){var g=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(l)||""):"",m=!0;if(0<g.length)for(var g=g.toLowerCase().split(" "),e=0;e<b.length&&m;e++)var f=mxUtils.trim(b[e]).toLowerCase(),m=m&&(0==f.length||0<=mxUtils.indexOf(g,f));else m=0==mxUtils.trim(k.value).length;
-m&&c.push(a[d])}return c}function h(a,b){n.model.beginUpdate();try{for(var c=0;c<a.length;c++)n.model.setVisible(a[c],b)}finally{n.model.endUpdate()}}var n=a.editor.graph,l="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.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";g.appendChild(k);if(!a.isOffline()||mxClient.IS_CHROMEAPP){k.style.width="240px";var m=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");m.firstChild.style.marginBottom="6px";m.style.marginLeft="6px";g.appendChild(m)}mxEvent.addListener(k,"dblclick",function(){var b=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,
-300,80,!0,!0);b.init()});k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);m=mxUtils.button(mxResources.get("hide"),function(){h(f(),!1)});m.setAttribute("title",mxResources.get("hide"));m.style.marginTop="8px";m.style.marginRight="4px";m.className="geBtn";g.appendChild(m);m=mxUtils.button(mxResources.get("show"),function(){var a=f();h(a,!0);n.isEnabled()&&n.setSelectionCells(a)});m.setAttribute("title",mxResources.get("show"));m.style.marginTop="8px";m.style.marginRight=
-"4px";m.className="geBtn";g.appendChild(m);var q=a.actions.get("tags"),m=mxUtils.button(mxResources.get("close"),function(){q.funct()});m.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");m.style.marginTop="8px";m.className="geBtn gePrimaryBtn";g.appendChild(m);mxEvent.addListener(k,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),g,b,d,c,e,!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.isVisible()?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},AuthDialog=function(a,b,d,c){var e=document.createElement("div");e.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 h="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";b==a.drive?(h=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(h=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(h=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):b==a.gitHub?(h=mxResources.get("github"),n.src=IMAGE_PATH+
-"/github-logo-white.svg"):b==a.trello&&(h=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[h]));var l=document.createElement("input");l.setAttribute("type","checkbox");h=mxUtils.button(mxResources.get("authorize"),function(){c(l.checked)});h.insertBefore(n,h.firstChild);h.style.marginTop="6px";h.className="geBigButton";e.appendChild(f);e.appendChild(a);e.appendChild(h);d&&(d=document.createElement("p"),
+"376px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);c.appendChild(h);var m=new Graph(h);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var l=0,g=null,k=0,n=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==a?k+1:n.apply(this,arguments)};m.getLinkForCell=function(){return null};Editor.MathJaxRender&&
+m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var u=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),p=a.getCurrentFile(),q=null,w=null,v=null,A=null,t=mxUtils.button("",function(){null!=v&&m.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));
+t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var x=mxUtils.button("",function(){null!=v&&m.zoomOut()});x.className="geSprite geSprite-zoomout";x.setAttribute("title",mxResources.get("zoomOut"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var G=mxUtils.button("",function(){null!=v&&(m.maxFitScale=8,m.fit(8),m.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 F=mxUtils.button("",function(){null!=v&&(m.zoomActual(),m.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var z=
+document.createElement("div");z.style.position="absolute";z.style.textAlign="right";z.style.color="gray";z.style.marginTop="10px";z.style.backgroundColor="transparent";z.style.top="440px";z.style.right="32px";z.style.maxWidth="380px";z.style.cursor="default";var D=mxUtils.button(mxResources.get("download"),function(){if(null!=v){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(v.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
+(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});D.className="geBtn";D.setAttribute("disabled","disabled");var y=mxUtils.button(mxResources.get("restore"),function(){null!=v&&null!=A&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(A):a.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(A);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});y.className="geBtn";y.setAttribute("disabled","disabled");var B=document.createElement("select");B.setAttribute("disabled","disabled");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";var H=null;mxEvent.addListener(B,"change",function(a){null!=
+H&&(H(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=v&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(v.documentElement)),window.openWindow(a.getUrl()))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=d&&(C.style.display="none");var J=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});J.className="geBtn gePrimaryBtn";J.setAttribute("disabled",
+"disabled");null!=d&&(J.style.display="none",y.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var E=document.createElement("div");E.className="geToolbarContainer";E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var K=null;if(null!=b&&0<b.length){h.style.cursor="move";var Q=document.createElement("table");Q.style.border=
+"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(l=mxUtils.indexOf(a.pages,a.currentPage));for(var R=b.length-1;0<=R;R--){var O=function(c){var d=new Date(c.modifiedDate),e=null;if(0<=d.getTime()){var n=function(b){u.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){var f=function(b){null!=b&&(b=
+q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},q=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};B.style.display="none";B.innerHTML="";v=c;A=b;g=parseSelectFunction=null;k=0;if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");g=[];for(b=0;b<c.length;b++)g.push(c[b]);
+k=Math.min(l,g.length-1);0<g.length&&f(g[k]);if(1<g.length)for(B.removeAttribute("disabled"),B.style.display="",b=0;b<g.length;b++)c=document.createElement("option"),mxUtils.write(c,g[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==k&&c.setAttribute("selected","selected"),B.appendChild(c);H=function(){k=l=parseInt(B.value);f(g[l])}}else q(n);z.innerHTML="";mxUtils.write(z,d.toLocaleDateString()+" "+d.toLocaleTimeString());z.setAttribute("title",e.getAttribute("title"));
+t.removeAttribute("disabled");x.removeAttribute("disabled");G.removeAttribute("disabled");F.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&y.removeAttribute("disabled"),D.removeAttribute("disabled"),J.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(F,60)}else B.style.display="none",B.innerHTML="",z.innerHTML="",mxUtils.write(z,mxResources.get("errorLoadingFile"))},
+e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var f=document.createElement("td");f.style.padding="6px";f.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(f,mxResources.get("current")):d.toDateString()===T?mxUtils.write(f,d.toLocaleTimeString()):mxUtils.write(f,d.toLocaleDateString()+" "+d.toLocaleTimeString());e.appendChild(f);e.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){w!=c&&(u.stop(),null!=q&&(q.style.backgroundColor=""),w=c,q=e,q.style.backgroundColor="#ebf2f9",A=v=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",h.style.backgroundColor="#ffffff",m.getModel().clear(),y.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),F.setAttribute("disabled",
+"disabled"),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(F,20),u.spin(h),c.getXml(function(a){w==c&&n(a)},function(a){u.stop();B.style.display="none";B.innerHTML="";z.innerHTML="";mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){J.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(e)}return e}(b[R]);null!=O&&R==b.length-1&&(K=O)}Q.appendChild(V);f.appendChild(Q)}else null==p||null==a.drive&&p.constructor==window.DriveFile||null==a.dropbox&&p.constructor==window.DropboxFile?(h.style.display="none",E.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(h.style.display="none",E.style.display="none",mxUtils.write(f,
+mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";E.appendChild(B);E.appendChild(t);E.appendChild(x);E.appendChild(F);E.appendChild(G);a.editor.cancelFirst?(e.appendChild(f),e.appendChild(D),e.appendChild(C),e.appendChild(y),e.appendChild(J)):(e.appendChild(D),e.appendChild(C),e.appendChild(y),e.appendChild(J),e.appendChild(f));c.appendChild(e);c.appendChild(E);c.appendChild(z);this.container=
+c},DraftDialog=function(a,b,d,c,e,f,h,m){var l=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,b);l.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.marginTop="10px";k.style.width="640px";k.style.top="46px";k.style.bottom="74px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);l.appendChild(k);var n=new Graph(k);
+n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(d);var u=a.editor.extractGraphModel(b.documentElement,!0),p=0,q=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[p]?q[p].getAttribute("name"):"pagenumber"==a?p+1:w.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className=
+"geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});g.className="geSprite geSprite-fit";g.setAttribute("title",
+mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var v=mxUtils.button("",function(){n.zoomActual();n.center()});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);e=mxUtils.button(h||mxResources.get("discard"),e);e.className="geBtn";var A=document.createElement("select");A.style.maxWidth="80px";A.style.position=
+"relative";A.style.top="-2px";A.style.verticalAlign="bottom";A.style.marginRight="6px";A.style.display="none";c=mxUtils.button(f||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.width="640px";f.style.textAlign="right";h=document.createElement("div");h.className="geToolbarContainer";h.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(A,"change",function(a){p=parseInt(A.value);c(q[p]);mxEvent.consume(a)});if("mxfile"==u.nodeName){var d=u.getElementsByTagName("diagram");
+q=[];for(var g=0;g<d.length;g++)q.push(d[g]);0<q.length&&c(q[p]);if(1<q.length)for(A.style.display="",g=0;g<q.length;g++)d=document.createElement("option"),mxUtils.write(d,q[g].getAttribute("name")||mxResources.get("pageWithNumber",[g+1])),d.setAttribute("value",g),g==p&&d.setAttribute("selected","selected"),A.appendChild(d)}else b(u)};h.appendChild(A);h.appendChild(b);h.appendChild(d);h.appendChild(v);h.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
+"geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(f.appendChild(b),null!=m&&f.appendChild(m),f.appendChild(e),f.appendChild(c)):(f.appendChild(c),f.appendChild(e),null!=m&&f.appendChild(m),f.appendChild(b));l.appendChild(f);l.appendChild(h);this.container=l},FindWindow=function(a,b,d,c,e){function f(a,b,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 g=
+mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,c.length)===c||null!=a&&a.test(g))return!0}}return!1}function h(){var a=l.model.getDescendants(l.model.getRoot()),b=u.value.toLowerCase(),c=p.checked?new RegExp(b):null,d=null;g!=b&&(g=b,k=null);var e=null==k;if(0<b.length)for(var n=0;n<a.length;n++){var h=l.view.getState(a[n]);if(null!=h&&null!=h.cell.value&&(e||null==d)&&(l.model.isVertex(h.cell)||l.model.isEdge(h.cell))&&(l.isHtmlLabel(h.cell)?
+(q.innerHTML=l.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([q])):label=l.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||f(c,h.cell,b))||null!=c&&(c.test(label)||f(c,h.cell,b))))if(e){d=h;break}else null==d&&(d=h);e=e||h==k}null!=d?(k=d,l.scrollCellToVisible(k.cell),l.isEnabled()?l.setSelectionCell(k.cell):l.highlightCell(k.cell)):l.isEnabled()&&l.clearSelection();return 0==b.length||null!=d}
+var m=a.actions.get("find"),l=a.editor.graph,g=null,k=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";n.appendChild(u);mxUtils.br(n);var p=document.createElement("input");
+p.setAttribute("type","checkbox");p.style.marginRight="4px";n.appendChild(p);mxUtils.write(n,mxResources.get("regularExpression"));var q=document.createElement("div");mxUtils.br(n);var w=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";g=k=null;u.focus()});w.setAttribute("title",mxResources.get("reset"));w.style.marginTop="6px";w.style.marginRight="4px";w.className="geBtn";n.appendChild(w);w=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
+h()?"":"#ffcfcf"}catch(v){a.handleError(v)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.className="geBtn gePrimaryBtn";n.appendChild(w);mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(g!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=h()?"":"#ffcfcf"}catch(A){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&
+a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,b,d,c,e,!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.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},
+TagsWindow=function(a,b,d,c,e){function f(a){a=null!=a?a:m.model.getDescendants(m.model.getRoot());for(var b=k.value.split(" "),c=[],d=0;d<a.length;d++)if(m.model.isVertex(a[d])||m.model.isEdge(a[d])){var g=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(l)||""):"",e=!0;if(0<g.length)for(var g=g.toLowerCase().split(" "),n=0;n<b.length&&e;n++)var f=mxUtils.trim(b[n]).toLowerCase(),e=e&&(0==f.length||0<=mxUtils.indexOf(g,f));else e=0==mxUtils.trim(k.value).length;
+e&&c.push(a[d])}return c}function h(a,b){m.model.beginUpdate();try{for(var c=0;c<a.length;c++)m.model.setVisible(a[c],b)}finally{m.model.endUpdate()}}var m=a.editor.graph,l="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.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";g.appendChild(k);if(!a.isOffline()||mxClient.IS_CHROMEAPP){k.style.width="240px";var n=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");n.firstChild.style.marginBottom="6px";n.style.marginLeft="6px";g.appendChild(n)}mxEvent.addListener(k,"dblclick",function(){var b=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,
+300,80,!0,!0);b.init()});k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);n=mxUtils.button(mxResources.get("hide"),function(){h(f(),!1)});n.setAttribute("title",mxResources.get("hide"));n.style.marginTop="8px";n.style.marginRight="4px";n.className="geBtn";g.appendChild(n);n=mxUtils.button(mxResources.get("show"),function(){var a=f();h(a,!0);m.isEnabled()&&m.setSelectionCells(a)});n.setAttribute("title",mxResources.get("show"));n.style.marginTop="8px";n.style.marginRight=
+"4px";n.className="geBtn";g.appendChild(n);var u=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){u.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.className="geBtn gePrimaryBtn";g.appendChild(n);mxEvent.addListener(k,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||u.funct()});this.window=new mxWindow(mxResources.get("tags"),g,b,d,c,e,!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.isVisible()?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},AuthDialog=function(a,b,d,c){var e=document.createElement("div");e.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 h="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";b==a.drive?(h=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(h=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(h=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):b==a.gitHub?(h=mxResources.get("github"),m.src=IMAGE_PATH+
+"/github-logo-white.svg"):b==a.trello&&(h=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[h]));var l=document.createElement("input");l.setAttribute("type","checkbox");h=mxUtils.button(mxResources.get("authorize"),function(){c(l.checked)});h.insertBefore(m,h.firstChild);h.style.marginTop="6px";h.className="geBigButton";e.appendChild(f);e.appendChild(a);e.appendChild(h);d&&(d=document.createElement("p"),
d.style.marginTop="20px",d.appendChild(l),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),d.appendChild(f),e.appendChild(d),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,d){d=null!=d?d:a.sidebar.entries;var c=document.createElement("div");if(b){b=document.createElement("div");b.className="geDialogTitle";mxUtils.write(b,mxResources.get("shapes"));
b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.lineHeight="40px";b.style.height="40px";b.style.right="0px";mxClient.IS_QUIRKS&&(b.style.width="718px");var e=document.createElement("div"),f=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.style.marginTop="1px");f.style.position="absolute";f.style.left="202px";f.style.right=
-"0px";f.style.top="40px";f.style.bottom="60px";f.style.overflow="auto";f.style.borderLeft="1px solid rgb(211, 211, 211)";f.style.textAlign="center";mxClient.IS_QUIRKS&&(f.style.width=parseInt(b.style.width)-202+"px",f.style.height=e.style.height,f.style.marginTop=e.style.marginTop);var h=null,n=[],l=document.createElement("div");l.style.position="relative";l.style.left="0px";l.style.right="0px";for(var g=0;g<d.length;g++)(function(b){var c=l.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);e.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=l.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";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);e.appendChild(c);var m=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
-b.imageCallback?b.imageCallback(f):null!=b.image?f.innerHTML='<img border="0" src="'+b.image+'"/>':(f.innerHTML="<br>",mxUtils.write(f,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",m);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});n.push(function(){return k.checked?b.id:null});0==g&&0==d&&m()})(b.entries[d])})(d[g]);
+"0px";f.style.top="40px";f.style.bottom="60px";f.style.overflow="auto";f.style.borderLeft="1px solid rgb(211, 211, 211)";f.style.textAlign="center";mxClient.IS_QUIRKS&&(f.style.width=parseInt(b.style.width)-202+"px",f.style.height=e.style.height,f.style.marginTop=e.style.marginTop);var h=null,m=[],l=document.createElement("div");l.style.position="relative";l.style.left="0px";l.style.right="0px";for(var g=0;g<d.length;g++)(function(b){var c=l.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);e.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=l.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";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);e.appendChild(c);var n=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
+b.imageCallback?b.imageCallback(f):null!=b.image?f.innerHTML='<img border="0" src="'+b.image+'"/>':(f.innerHTML="<br>",mxUtils.write(f,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});m.push(function(){return k.checked?b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);
c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=
-document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),
-function(){a.hideDialog();for(var b=[],c=0;c<n.length;c++){var d=n[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),k.checked,!0)});m.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),u=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var p=document.createElement("tr");q.style.width="100%";b=document.createElement("td");var m=document.createElement("td"),v=document.createElement("td"),x=mxUtils.bind(this,function(b,
-c,d){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.checked=a.sidebar.isEntryVisible(d);var k=document.createElement("span");mxUtils.write(k,c);c=document.createElement("div");c.style.display="block";c.appendChild(g);c.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return g.checked?d:null}});p.appendChild(b);p.appendChild(m);p.appendChild(v);u.appendChild(p);q.appendChild(u);for(var n=
-[],y=0,g=0;g<d.length;g++)for(u=0;u<d[g].entries.length;u++)y++;for(var t=[b,m,v],z=0,g=0;g<d.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];n.push(x(t[Math.floor(z/(y/3))],c.title,c.id));z++}})(d[g]);c.appendChild(q);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";k=document.createElement("input");isLocalStorage&&(k.setAttribute("type","checkbox"),k.checked=!0,k.defaultChecked=!0,d.appendChild(k),b=document.createElement("span"),
-mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<n.length;c++){var d=n[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",k.checked);a.hideDialog()});m.className=
-"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(m)):(d.appendChild(m),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var f=document.createElement("span");f.className="geSprite geSprite-delete";
+document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),
+function(){a.hideDialog();for(var b=[],c=0;c<m.length;c++){var d=m[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),k.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var u=document.createElement("table"),p=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var q=document.createElement("tr");u.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),w=document.createElement("td"),v=mxUtils.bind(this,function(b,
+c,d){var g=document.createElement("input");g.type="checkbox";u.appendChild(g);g.checked=a.sidebar.isEntryVisible(d);var k=document.createElement("span");mxUtils.write(k,c);c=document.createElement("div");c.style.display="block";c.appendChild(g);c.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return g.checked?d:null}});q.appendChild(b);q.appendChild(n);q.appendChild(w);p.appendChild(q);u.appendChild(p);for(var m=
+[],A=0,g=0;g<d.length;g++)for(p=0;p<d[g].entries.length;p++)A++;for(var t=[b,n,w],x=0,g=0;g<d.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];m.push(v(t[Math.floor(x/(A/3))],c.title,c.id));x++}})(d[g]);c.appendChild(u);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";k=document.createElement("input");isLocalStorage&&(k.setAttribute("type","checkbox"),k.checked=!0,k.defaultChecked=!0,d.appendChild(k),b=document.createElement("span"),
+mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<m.length;c++){var d=m[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",k.checked);a.hideDialog()});n.className=
+"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var f=document.createElement("span");f.className="geSprite geSprite-delete";
f.style.position="relative";f.style.cursor="pointer";f.style.top="5px";f.style.marginRight="4px";f.style.display="inline-block";g.appendChild(f);mxUtils.write(g,e[d]);c.appendChild(g);mxUtils.br(c);mxEvent.addListener(f,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(d))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var e=mxSettings.getPlugins().slice();
d.appendChild(c);b();var f=mxUtils.button(mxResources.get("add"),function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var g=d.split(";"),d=0;d<g.length;d++){var f=App.pluginRegistry[g[d]];null!=f&&(c+=f+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){g=a.split(";");for(a=0;a<g.length;a++){var c=g[a],d=App.pluginRegistry[c];null!=d&&(c=d);0<c.length&&0>mxUtils.indexOf(e,c)&&e.push(c)}b()}},mxResources.get("enterValue")+
-" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var l=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
-l.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(h),g.appendChild(l),g.appendChild(f),g.appendChild(n)):(g.appendChild(l),g.appendChild(f),g.appendChild(n),g.appendChild(h));d.appendChild(g);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),
-h=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");h.appendChild(n);f.appendChild(h);var h=document.createElement("tr"),l=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();
-k.select()};g.appendChild(k);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value="0";g.appendChild(m);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("right")+
-":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";g.appendChild(q);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";g.appendChild(u);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");
-l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("circle")+":");h.appendChild(l);var p=document.createElement("input");p.setAttribute("type","checkbox");g.appendChild(p);h.appendChild(g);f.appendChild(h);e.appendChild(f);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=v.width,
-e=v.height,f=parseInt(k.value),h=parseInt(m.value),g=Math.max(1,g-f-parseInt(q.value)),e=Math.max(1,e-h-parseInt(u.value));b.width=g;b.height=e;p.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(v,f,h,g,e,0,0,g,e);d(b.toDataURL())});x.setAttribute("disabled","disabled");v.onload=function(){x.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+
-": "+v.height)};v.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&x.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(x)):(b.appendChild(x),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),h=document.createElement("tbody"),
-n=document.createElement("tr"),l=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};g.appendChild(k);n.appendChild(l);n.appendChild(g);h.appendChild(n);n=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("top")+
-":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=c?c.y:"";g.appendChild(m);n.appendChild(l);n.appendChild(g);h.appendChild(n);n=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";g.appendChild(q);n.appendChild(l);n.appendChild(g);h.appendChild(n);
-n=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.height:"";g.appendChild(u);n.appendChild(l);n.appendChild(g);h.appendChild(n);n=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var p=document.createElement("input");
-p.setAttribute("type","text");p.style.width="100px";p.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(p);n.appendChild(l);n.appendChild(g);h.appendChild(n);f.appendChild(h);e.appendChild(f);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var g=d.getCellGeometry(b[c]);null!=g&&(g=g.clone(),d.isCellMovable(b[c])&&
-(0<mxUtils.trim(k.value).length&&(g.x=Number(k.value)),0<mxUtils.trim(m.value).length&&(g.y=Number(m.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(q.value).length&&(g.width=Number(q.value)),0<mxUtils.trim(u.value).length&&(g.height=Number(u.value))),d.getModel().setGeometry(b[c],g));0<mxUtils.trim(p.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(p.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&v.click()});f=document.createElement("div");
-f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(c),f.appendChild(v)):(f.appendChild(v),f.appendChild(c));e.appendChild(f);this.container=e},LibraryDialog=function(a,b,d,c,e,f){function h(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 c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function n(b,c,d,g,m,e,f,q,l){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&
-null!=f||null==v[b]){var y=function(){C.innerHTML="";C.style.cursor="pointer";C.style.whiteSpace="nowrap";C.style.textOverflow="ellipsis";mxUtils.write(C,null!=F.title&&0<F.title.length?F.title:mxResources.get("untitled"));C.style.color=null==F.title||0==F.title.length?"#d0d0d0":""};u.style.backgroundImage="";p.style.display="none";var A=m,D=e;if(m>a.maxImageSize||e>a.maxImageSize){var w=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,e));m*=w;e*=w}A>D?(D=Math.round(100*
-D/A),A=100):(A=Math.round(100*A/D),D=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var B=document.createElement("img");B.setAttribute("src",z.convert(b));B.style.width=A+"px";B.style.height=D+"px";B.style.margin="10px";B.style.paddingBottom=Math.floor((100-D)/2)+"px";B.style.paddingLeft=
-Math.floor((100-A)/2)+"px";E.appendChild(B)}else if(null!=f){var L=a.stringToCells(a.editor.graph.decompress(f.xml));0<L.length&&(a.sidebar.createThumb(L,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.marginLeft=
-"-22px";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=f&&(J.style.position="relative");(function(a,b,c){mxEvent.addListener(J,"click",function(d){v[b]=null;for(var g=0;g<k.length;g++)if(null!=k[g].data&&k[g].data==b||null!=k[g].xml&&null!=c&&k[g].xml==c.xml){k.splice(g,1);break}E.parentNode.removeChild(a);0==k.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(d)});mxEvent.addListener(J,
-"dblclick",function(a){mxEvent.consume(a)})})(E,b,f);E.appendChild(J);E.style.marginBottom="30px";var C=document.createElement("div");C.style.position="absolute";C.style.boxSizing="border-box";C.style.bottom="-18px";C.style.left="10px";C.style.right="10px";C.style.backgroundColor="#ffffff";C.style.overflow="hidden";C.style.textAlign="center";var F=null;null!=b?(F={data:b,w:m,h:e,title:l},null!=q&&(F.aspect=q),v[b]=B,k.push(F)):null!=f&&(f.aspect="fixed",k.push(f),F=f);mxEvent.addListener(C,"keydown",
-function(a){13==a.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(a))});y();E.appendChild(C);mxEvent.addListener(C,"mousedown",function(a){"true"!=C.getAttribute("contentEditable")&&mxEvent.consume(a)});L=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,F.title||"",mxResources.get("ok"),function(a){null!=a&&(F.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();
-mxEvent.consume(b)}else if("true"!=C.getAttribute("contentEditable")){null!=t&&(t(),t=null);if(null==F.title||0==F.title.length)C.innerHTML="";C.style.textOverflow="";C.style.whiteSpace="";C.style.cursor="text";C.style.color="";C.setAttribute("contentEditable","true");C.focus();document.execCommand("selectAll",!1,null);t=function(){C.removeAttribute("contentEditable");C.style.cursor="pointer";F.title=C.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(C,"click",L);mxEvent.addListener(E,"dblclick",
-L);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=f&&(J.style.visibility="hidden",C.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);x=h(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);J.style.visibility="";C.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility=
-"",C.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else G||(G=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(a.spinner.stop(),A=mxUtils.parseXml(b),"mxlibrary"==A.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=D&&0<D.length)for(var H=0;H<D.length;H++)null!=D[H].xml?n(null,null,0,0,0,0,D[H]):n(D[H].data,null,0,0,D[H].w,D[H].h,null,"fixed",D[H].title);m=!0}else if("mxfile"==
-A.documentElement.nodeName){for(var Q=A.documentElement.getElementsByTagName("diagram"),H=0;H<Q.length;H++){var D=mxUtils.getTextContent(Q[H]),L=a.stringToCells(a.editor.graph.decompress(D)),X=a.editor.graph.getBoundingBoxFromGeometry(L);n(null,null,0,0,0,0,{xml:D,w:X.width,h:X.height})}m=!0}}catch(Z){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function l(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
-function g(b){b.stopPropagation();b.preventDefault();G=!1;y=h(b);if(null!=x)null!=y&&y<u.children.length?(k.splice(y>x?y-1:y,0,k.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(k.push(k.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,D(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){n(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var k=[];d=document.createElement("div");d.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";d.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",
-b);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==e||e.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};m.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==k.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));d.appendChild(p);var v={},x=null,y=null,t=null;
-b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=t&&(t(),t=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",b);mxEvent.addListener(u,"pointerdown",b);mxEvent.addListener(u,"touchstart",b);var z=new mxUrlConverter,G=!1;if(null!=c)for(b=0;b<c.length;b++)m=c[b],n(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(u,"dragleave",function(a){p.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==p){a.stopPropagation();a.preventDefault();
-break}b=b.parentNode}});var D=function(b){return function(c,d,g,k,m,e,t,f,h){null!=h&&(/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name))?a.importVisio(h,mxUtils.bind(this,function(c){a.spinner.stop();n(c,d,g,k,m,e,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=h&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,h.name)?a.parseFile(h,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=
-c.status&&(n(c.responseText,d,g,k,m,e,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(n(c,d,g,k,m,e,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",g);mxEvent.addListener(p,"dragover",l);mxEvent.addListener(p,"drop",g);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";
-c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,
-"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";c.appendChild(m);var w=document.createElement("input");w.setAttribute("multiple","multiple");w.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(w,"change",function(b){G=!1;a.importFiles(w.files,0,0,a.maxImageSize,function(a,c,d,g,k,m,e,t,f){D(b)(a,c,d,g,k,m,e,t,f);w.value=""});u.scrollTop=u.scrollHeight}),m=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);w.click()}),m.setAttribute("id",
-"btnAddImage"),m.className="geBtn",c.appendChild(m));m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){G=!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))}n(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";c.appendChild(m);this.saveBtnClickHandler=function(b,c,d,g){a.saveLibrary(b,
-c,d,g)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(q.value,k,e,f)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";c.appendChild(m);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var f,h,n=document.createElement("table"),l=document.createElement("tbody");n.style.cellPadding="4px";f=document.createElement("tr");h=
+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var l=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
+l.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(h),g.appendChild(l),g.appendChild(f),g.appendChild(m)):(g.appendChild(l),g.appendChild(f),g.appendChild(m),g.appendChild(h));d.appendChild(g);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),
+h=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+"...");h.appendChild(m);f.appendChild(h);var h=document.createElement("tr"),l=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();
+k.select()};g.appendChild(k);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";g.appendChild(n);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("right")+
+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";g.appendChild(u);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("bottom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";g.appendChild(p);h.appendChild(l);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");
+l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("circle")+":");h.appendChild(l);var q=document.createElement("input");q.setAttribute("type","checkbox");g.appendChild(q);h.appendChild(g);f.appendChild(h);e.appendChild(f);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=w.width,
+e=w.height,f=parseInt(k.value),h=parseInt(n.value),g=Math.max(1,g-f-parseInt(u.value)),e=Math.max(1,e-h-parseInt(p.value));b.width=g;b.height=e;q.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,f,h,g,e,0,0,g,e);d(b.toDataURL())});v.setAttribute("disabled","disabled");w.onload=function(){v.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+
+": "+w.height)};w.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&v.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(v)):(b.appendChild(v),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),h=document.createElement("tbody"),
+m=document.createElement("tr"),l=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};g.appendChild(k);m.appendChild(l);m.appendChild(g);h.appendChild(m);m=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("top")+
+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);m.appendChild(l);m.appendChild(g);h.appendChild(m);m=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.width:"";g.appendChild(u);m.appendChild(l);m.appendChild(g);h.appendChild(m);
+m=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.height:"";g.appendChild(p);m.appendChild(l);m.appendChild(g);h.appendChild(m);m=document.createElement("tr");l=document.createElement("td");g=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var q=document.createElement("input");
+q.setAttribute("type","text");q.style.width="100px";q.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(q);m.appendChild(l);m.appendChild(g);h.appendChild(m);f.appendChild(h);e.appendChild(f);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var g=d.getCellGeometry(b[c]);null!=g&&(g=g.clone(),d.isCellMovable(b[c])&&
+(0<mxUtils.trim(k.value).length&&(g.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(g.y=Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(u.value).length&&(g.width=Number(u.value)),0<mxUtils.trim(p.value).length&&(g.height=Number(p.value))),d.getModel().setGeometry(b[c],g));0<mxUtils.trim(q.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(q.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&w.click()});f=document.createElement("div");
+f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(c),f.appendChild(w)):(f.appendChild(w),f.appendChild(c));e.appendChild(f);this.container=e},LibraryDialog=function(a,b,d,c,e,f){function h(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=p;)a=a.parentNode;var b=null;if(null!=a)for(var c=p.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,g,e,n,f,u,l){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&
+null!=f||null==w[b]){var A=function(){y.innerHTML="";y.style.cursor="pointer";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";mxUtils.write(y,null!=B.title&&0<B.title.length?B.title:mxResources.get("untitled"));y.style.color=null==B.title||0==B.title.length?"#d0d0d0":""};p.style.backgroundImage="";q.style.display="none";var F=e,C=n;if(e>a.maxImageSize||n>a.maxImageSize){var z=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=z;n*=z}F>C?(C=Math.round(100*
+C/F),F=100):(F=Math.round(100*F/C),C=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var J=document.createElement("img");J.setAttribute("src",x.convert(b));J.style.width=F+"px";J.style.height=C+"px";J.style.margin="10px";J.style.paddingBottom=Math.floor((100-C)/2)+"px";J.style.paddingLeft=
+Math.floor((100-F)/2)+"px";E.appendChild(J)}else if(null!=f){var D=a.stringToCells(a.editor.graph.decompress(f.xml));0<D.length&&(a.sidebar.createThumb(D,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var K=document.createElement("img");K.setAttribute("src",Editor.closeImage);K.setAttribute("border","0");K.setAttribute("title",mxResources.get("delete"));K.setAttribute("align","top");K.style.paddingTop="4px";K.style.position=
+"absolute";K.style.marginLeft="-12px";K.style.zIndex="1";K.style.cursor="pointer";mxEvent.addListener(K,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(K,"click",function(d){w[b]=null;for(var g=0;g<k.length;g++)if(null!=k[g].data&&k[g].data==b||null!=k[g].xml&&null!=c&&k[g].xml==c.xml){k.splice(g,1);break}E.parentNode.removeChild(a);0==k.length&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(K,
+"dblclick",function(a){mxEvent.consume(a)})})(E,b,f);E.appendChild(K);E.style.marginBottom="30px";var y=document.createElement("div");y.style.position="absolute";y.style.boxSizing="border-box";y.style.bottom="-18px";y.style.left="10px";y.style.right="10px";y.style.backgroundColor="#ffffff";y.style.overflow="hidden";y.style.textAlign="center";var B=null;null!=b?(B={data:b,w:e,h:n,title:l},null!=u&&(B.aspect=u),w[b]=J,k.push(B)):null!=f&&(f.aspect="fixed",k.push(f),B=f);mxEvent.addListener(y,"keydown",
+function(a){13==a.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(a))});A();E.appendChild(y);mxEvent.addListener(y,"mousedown",function(a){"true"!=y.getAttribute("contentEditable")&&mxEvent.consume(a)});D=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,B.title||"",mxResources.get("ok"),function(a){null!=a&&(B.title=a,A())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();
+mxEvent.consume(b)}else if("true"!=y.getAttribute("contentEditable")){null!=t&&(t(),t=null);if(null==B.title||0==B.title.length)y.innerHTML="";y.style.textOverflow="";y.style.whiteSpace="";y.style.cursor="text";y.style.color="";y.setAttribute("contentEditable","true");y.focus();document.execCommand("selectAll",!1,null);t=function(){y.removeAttribute("contentEditable");y.style.cursor="pointer";B.title=y.innerHTML;A()};mxEvent.consume(b)}};mxEvent.addListener(y,"click",D);mxEvent.addListener(E,"dblclick",
+D);p.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=f&&(K.style.visibility="hidden",y.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);v=h(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);K.style.visibility="";y.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==K.style.visibility&&(K.style.visibility=
+"",y.style.visibility="");v=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else G||(G=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),F=mxUtils.parseXml(b),"mxlibrary"==F.documentElement.nodeName){C=JSON.parse(mxUtils.getTextContent(F.documentElement));if(null!=C&&0<C.length)for(var H=0;H<C.length;H++)null!=C[H].xml?m(null,null,0,0,0,0,C[H]):m(C[H].data,null,0,0,C[H].w,C[H].h,null,"fixed",C[H].title);e=!0}else if("mxfile"==
+F.documentElement.nodeName){for(var Q=F.documentElement.getElementsByTagName("diagram"),H=0;H<Q.length;H++){var C=mxUtils.getTextContent(Q[H]),D=a.stringToCells(a.editor.graph.decompress(C)),X=a.editor.graph.getBoundingBoxFromGeometry(D);m(null,null,0,0,0,0,{xml:C,w:X.width,h:X.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function l(a){a.dataTransfer.dropEffect=null!=v?"move":"copy";a.stopPropagation();a.preventDefault()}
+function g(b){b.stopPropagation();b.preventDefault();G=!1;A=h(b);if(null!=v)null!=A&&A<p.children.length?(k.splice(A>v?A-1:A,0,k.splice(v,1)[0]),p.insertBefore(p.children[v],p.children[A])):(k.push(k.splice(v,1)[0]),p.appendChild(p.children[v]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,F(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){m(c,null,0,0,a.width,a.height);p.scrollTop=p.scrollHeight})}b.stopPropagation();b.preventDefault()}var k=[];d=document.createElement("div");d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",
+b);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==e||e.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);var p=document.createElement("div");p.style.borderWidth="1px 0px 1px 0px";p.style.borderColor="#d3d3d3";p.style.borderStyle="solid";p.style.marginTop="6px";
+p.style.overflow="auto";p.style.height="340px";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));d.appendChild(q);var w={},v=null,A=null,t=null;
+b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=t&&(t(),t=null,mxEvent.consume(a))};mxEvent.addListener(p,"mousedown",b);mxEvent.addListener(p,"pointerdown",b);mxEvent.addListener(p,"touchstart",b);var x=new mxUrlConverter,G=!1;if(null!=c)for(b=0;b<c.length;b++)n=c[b],m(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(p,"dragleave",function(a){q.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==p||b==q){a.stopPropagation();a.preventDefault();
+break}b=b.parentNode}});var F=function(b){return function(c,d,g,k,e,n,t,f,h){null!=h&&(/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name))?a.importVisio(h,mxUtils.bind(this,function(c){a.spinner.stop();m(c,d,g,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=h&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,h.name)?a.parseFile(h,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=
+c.status&&(m(c.responseText,d,g,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight))})):(m(c,d,g,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight)}};mxEvent.addListener(p,"dragover",l);mxEvent.addListener(p,"drop",g);mxEvent.addListener(q,"dragover",l);mxEvent.addListener(q,"drop",g);d.appendChild(p);c=document.createElement("div");c.style.textAlign="right";
+c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),c=u.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,
+"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,"change",function(b){G=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,c,d,g,k,e,n,t,f){F(b)(a,c,d,g,k,e,n,t,f);z.value=""});p.scrollTop=p.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);z.click()}),n.setAttribute("id",
+"btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){G=!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))}m(a,null,0,0,b,c);p.scrollTop=p.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,g){a.saveLibrary(b,
+c,d,g)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(u.value,k,e,f)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var f,h,m=document.createElement("table"),l=document.createElement("tbody");m.style.cellPadding="4px";f=document.createElement("tr");h=
document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";mxUtils.write(h,d);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=c-200+"px";g.style.height=e+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};h.appendChild(g);f.appendChild(h);h=document.createElement("td");d=document.createElement("div");d.style.position=
-"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);h.appendChild(d);var k=new Graph(d);k.setEnabled(!1);var m=a.editor.graph.cloneCells([b])[0];k.addCells([m]);d=k.view.getState(m);var q="";null!=d.shape&&null!=d.shape.stencil&&(q=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(g,q||"");d=k.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);k.view.scaleAndTranslate(e,
+"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);h.appendChild(d);var k=new Graph(d);k.setEnabled(!1);var n=a.editor.graph.cloneCells([b])[0];k.addCells([n]);d=k.view.getState(n);var u="";null!=d.shape&&null!=d.shape.stencil&&(u=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(g,u||"");d=k.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);k.view.scaleAndTranslate(e,
20/e-d.x,20/e-d.y);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.setAttribute("colspan","2");h.style.paddingTop="2px";h.style.whiteSpace="nowrap";h.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&h.appendChild(e);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-d.className="geBtn",h.appendChild(d));var u=function(b,c,d){var k=g.value,m=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),m=!b.model.contains(c),!d||m||k!=q){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(m){var e=a.editor.graph.getInsertPoint();c.geometry.x=e.x;
-c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[c])}catch(G){throw G;}finally{b.getModel().endUpdate()}m&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){u(k,m,!1)});d.className="geBtn";h.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";h.appendChild(d);a.editor.cancelFirst||h.appendChild(e);f.appendChild(h);l.appendChild(f);n.appendChild(l);this.container=
-n},CustomDialog=function(a,b,d,c,e,f,h,n){var l=document.createElement("div");l.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=h&&b.appendChild(h);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});h.className="geBtn";n&&(h.style.display="none");a.editor.cancelFirst&&b.appendChild(h);a.isOffline()||null==f||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),n.className="geBtn",b.appendChild(n));
+d.className="geBtn",h.appendChild(d));var p=function(b,c,d){var k=g.value,e=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||k!=u){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x;
+c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[c])}catch(G){throw G;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){p(k,n,!1)});d.className="geBtn";h.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){p(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";h.appendChild(d);a.editor.cancelFirst||h.appendChild(e);f.appendChild(h);l.appendChild(f);m.appendChild(l);this.container=
+m},CustomDialog=function(a,b,d,c,e,f,h,m){var l=document.createElement("div");l.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=h&&b.appendChild(h);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});h.className="geBtn";m&&(h.style.display="none");a.editor.cancelFirst&&b.appendChild(h);a.isOffline()||null==f||(m=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),m.className="geBtn",b.appendChild(m));
e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});b.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(h);l.appendChild(b);this.cancelBtn=h;this.okButton=e;this.container=l};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -7039,7 +7044,7 @@ null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.len
this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var g=new mxCodec(d.ownerDocument);g.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);
mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}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);
null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};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 c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(z){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var g=0;g<c.length;g++)if("mxgraph"==c[g].getAttribute("class")){d.push(c[g]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),
+null!=b&&0<b.length)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var g=0;g<c.length;g++)if("mxgraph"==c[g].getAttribute("class")){d.push(c[g]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),
a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=this.graph.decompress(c),0<c.length&&(d=mxUtils.parseXml(c),a=d.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),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)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};
null==a||b||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(c=this.graph.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};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?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,b){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
@@ -7047,26 +7052,26 @@ Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Ty
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 c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
b){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var g=document.createElement("script");g.type="text/javascript";g.src=a;d[0].parentNode.appendChild(g)}};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 b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,d,g){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==g&&b.push(g);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var h=Format.prototype.init;Format.prototype.init=function(){h.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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()};var l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=l.apply(this,arguments);if(mxClient.IS_SVG){var b=this.editorUi,c=b.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var d=new ChangePageSetup(b);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;c.model.execute(d)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",
-this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var g=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=g.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),
-function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},
-{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var k=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));k.apply(this,arguments)};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var 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);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);mxUtils.br(a);return m.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var g=d.getModel().getStyle(c[b]),m=0;m<k.length;m++)g=mxUtils.removeStylename(g,k[m]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,
-a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],g)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=
-a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||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%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");g.appendChild(b)}g.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,
-4)&&mxUtils.br(g),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);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(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(m);c(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var h=Format.prototype.init;Format.prototype.init=function(){h.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+m.apply(this,arguments):this.clear()};var l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=l.apply(this,arguments);var b=this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&("1"==urlParams.embed||null!=b&&b.isEditable())){var c=this.editorUi,d=c.editor.graph,b=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var b=new ChangePageSetup(c);b.ignoreColor=!0;b.ignoreImage=!0;b.shadowVisible=a;d.model.execute(b)},{install:function(a){this.listener=
+function(){a(d.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(b.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(b,60));a.appendChild(b)}return a};var g=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=g.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&
+(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
+stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
+{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"}]];var k=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));k.apply(this,arguments)};var n=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(a){var 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);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);mxUtils.br(a);return n.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var g=d.getModel().getStyle(c[b]),e=0;e<k.length;e++)g=mxUtils.removeStylename(g,
+k[e]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],g)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height=
+"30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||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%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");g.appendChild(b)}g.innerHTML=
+"";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(g),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);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(" ");
+null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(e),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(e);c(n);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,g=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.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==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(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==c?b.style.width="202px":
(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var q=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}q.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var u=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}u.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
-b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
+b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
b,c){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c: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,b,d,!1);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)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;
var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");
k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):
@@ -7079,236 +7084,236 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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 p=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,g,k,m,e,f,h){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);
-null!=t&&mxStencilRegistry.getStencil(t)}return p.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){p.value=Math.max(1,Math.min(e,Math.max(parseInt(p.value),parseInt(n.value))));n.value=Math.max(1,Math.min(e,Math.min(parseInt(p.value),parseInt(n.value))))}function d(b){function c(b,c,g){var k=b.getGraphBounds(),m=0,e=0,f=Z.get(),t=1/b.pageScale,h=y.checked;if(h)var t=parseInt(M.value),q=parseInt(X.value),t=Math.min(f.height*q/(k.height/b.view.scale),f.width*t/(k.width/
-b.view.scale));else t=parseInt(x.value)/(100*b.pageScale),isNaN(t)&&(d=1/b.pageScale,x.value="100 %");f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*d);f.height=Math.ceil(f.height*d);t*=d;!h&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*f.width,e-=k.y*f.height):h=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,f,0,m,e,h);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var u=c.writeHead;c.writeHead=function(b){u.apply(this,arguments);null!=a.editor.fontCss&&
-(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var n=c.renderPage;c.renderPage=function(a,b,c,d,g,k){var m=n.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:m.className="geDisableMathJax";return m}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=h;c.appendGraph(b,t,m,e,g,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value=
-"100 %");var d=.75*d,k=n.value,m=p.value,e=!q.checked,t=null;e&&(e=k==f&&m==f);if(!e&&null!=a.pages&&a.pages.length){var h=0,e=a.pages.length-1;q.checked||(h=parseInt(k)-1,e=parseInt(m)-1);for(var u=h;u<=e;u++){var l=a.pages[u],k=l==a.currentPage?g:null;if(null==k){var k=a.createTemporaryGraph(g.getStylesheet()),m=!0,h=!1,z=null,v=null;null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(m=l.viewState.pageVisible,h=l.viewState.mathEnabled,z=l.viewState.background,
-v=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(h="0"!=l.mapping.diagramMap.get("mathEnabled"),z=l.mapping.diagramMap.get("background"),v=l.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);k.background=z;k.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;k.pageVisible=m;k.mathEnabled=h;var A=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?u+1:A.apply(this,arguments)};document.body.appendChild(k.container);
-a.updatePageRoot(l);k.model.setRoot(l.root)}t=c(k,t,u!=e);k!=g&&k.container.parentNode.removeChild(k.container)}}else t=c(g);t.mathEnabled&&(e=t.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
-var g=a.editor.graph,k=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,b||mxResources.get("print"));k.appendChild(m);var e=1,f=1,h=document.createElement("div");h.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");h.appendChild(q);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));h.appendChild(m);mxUtils.br(h);var u=q.cloneNode(!0);q.setAttribute("checked","checked");u.setAttribute("value","range");h.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");h.appendChild(m);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type",
-"number");n.setAttribute("min","1");n.style.width="50px";h.appendChild(n);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));h.appendChild(m);var p=n.cloneNode(!0);h.appendChild(p);mxEvent.addListener(n,"focus",function(){u.checked=!0});mxEvent.addListener(p,"focus",function(){u.checked=!0});mxEvent.addListener(n,"change",c);mxEvent.addListener(p,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){f=m+
-1;n.value=f;p.value=f;break}n.setAttribute("max",e);p.setAttribute("max",e);1<e&&k.appendChild(h);var l=document.createElement("div");l.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");l.appendChild(v);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));l.appendChild(m);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";
-x.setAttribute("value","100 %");x.style.width="50px";l.appendChild(x);mxEvent.addListener(x,"focus",function(){v.checked=!0});k.appendChild(l);var h=h.cloneNode(!1),y=v.cloneNode(!0);y.setAttribute("value","fit");v.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(y);h.appendChild(m);l=document.createElement("table");l.style.display="inline-block";var R=document.createElement("tbody"),
-O=document.createElement("tr"),N=O.cloneNode(!0),K=document.createElement("td"),P=K.cloneNode(!0),S=K.cloneNode(!0),Y=K.cloneNode(!0),I=K.cloneNode(!0),aa=K.cloneNode(!0);K.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(K,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);m=document.createElement("span");mxUtils.write(m,
-mxResources.get("fitToSheetsAcross"));S.appendChild(m);mxUtils.write(Y,mxResources.get("fitToBy"));var X=M.cloneNode(!0);I.appendChild(X);mxEvent.addListener(M,"focus",function(){y.checked=!0});mxEvent.addListener(X,"focus",function(){y.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));aa.appendChild(m);O.appendChild(K);O.appendChild(P);O.appendChild(S);N.appendChild(Y);N.appendChild(I);N.appendChild(aa);R.appendChild(O);R.appendChild(N);l.appendChild(R);
-h.appendChild(l);k.appendChild(h);h=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));h.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);h.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));h.appendChild(m);
-var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";h.appendChild(U);k.appendChild(h);m=document.createElement("div");m.style.cssText="text-align:right;margin:62px 0 0 0;";h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-l.className="geBtn",m.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),l.className="geBtn",m.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});l.className="geBtn gePrimaryBtn";m.appendChild(l);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);this.container=k};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(v.apply(this,arguments),null!=this.mathEnabled&&
+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 q=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,g,k,e,n,f,p){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);
+null!=t&&mxStencilRegistry.getStencil(t)}return q.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(n,Math.max(parseInt(m.value),parseInt(q.value))));q.value=Math.max(1,Math.min(n,Math.min(parseInt(m.value),parseInt(q.value))))}function d(b){function c(b,c,g){var k=b.getGraphBounds(),e=0,n=0,t=Z.get(),f=1/b.pageScale,p=A.checked;if(p)var f=parseInt(M.value),h=parseInt(X.value),f=Math.min(t.height*h/(k.height/b.view.scale),t.width*f/(k.width/
+b.view.scale));else f=parseInt(w.value)/(100*b.pageScale),isNaN(f)&&(d=1/b.pageScale,w.value="100 %");t=mxRectangle.fromRectangle(t);t.width=Math.ceil(t.width*d);t.height=Math.ceil(t.height*d);f*=d;!p&&b.pageVisible?(k=b.getPageLayout(),e-=k.x*t.width,n-=k.y*t.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,f,t,0,e,n,p);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var u=c.writeHead;c.writeHead=function(b){u.apply(this,arguments);null!=a.editor.fontCss&&
+(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var q=c.renderPage;c.renderPage=function(a,b,c,d,g,k){var e=q.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,g,!0)}else{t=b.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";c.backgroundColor=t;c.autoOrigin=p;c.appendGraph(b,f,e,n,g,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value=
+"100 %");var d=.75*d,k=q.value,e=m.value,n=!h.checked,t=null;n&&(n=k==f&&e==f);if(!n&&null!=a.pages&&a.pages.length){var p=0,n=a.pages.length-1;h.checked||(p=parseInt(k)-1,n=parseInt(e)-1);for(var u=p;u<=n;u++){var l=a.pages[u],k=l==a.currentPage?g:null;if(null==k){var k=a.createTemporaryGraph(g.getStylesheet()),e=!0,p=!1,x=null,v=null;null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(e=l.viewState.pageVisible,p=l.viewState.mathEnabled,x=l.viewState.background,
+v=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(p="0"!=l.mapping.diagramMap.get("mathEnabled"),x=l.mapping.diagramMap.get("background"),v=l.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);k.background=x;k.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;k.pageVisible=e;k.mathEnabled=p;var C=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?u+1:C.apply(this,arguments)};document.body.appendChild(k.container);
+a.updatePageRoot(l);k.model.setRoot(l.root)}t=c(k,t,u!=n);k!=g&&k.container.parentNode.removeChild(k.container)}}else t=c(g);t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
+var g=a.editor.graph,k=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));k.appendChild(e);var n=1,f=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","all");h.setAttribute("type","radio");
+h.setAttribute("name","pages-printdialog");p.appendChild(h);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));p.appendChild(e);mxUtils.br(p);var u=h.cloneNode(!0);h.setAttribute("checked","checked");u.setAttribute("value","range");p.appendChild(u);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");p.appendChild(e);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";p.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));p.appendChild(e);var m=q.cloneNode(!0);p.appendChild(m);mxEvent.addListener(q,"focus",function(){u.checked=!0});mxEvent.addListener(m,"focus",function(){u.checked=!0});mxEvent.addListener(q,"change",c);mxEvent.addListener(m,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){f=e+
+1;q.value=f;m.value=f;break}q.setAttribute("max",n);m.setAttribute("max",n);1<n&&k.appendChild(p);var l=document.createElement("div");l.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");l.appendChild(v);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));l.appendChild(e);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";
+w.setAttribute("value","100 %");w.style.width="50px";l.appendChild(w);mxEvent.addListener(w,"focus",function(){v.checked=!0});k.appendChild(l);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(A);p.appendChild(e);l=document.createElement("table");l.style.display="inline-block";var R=document.createElement("tbody"),
+O=document.createElement("tr"),N=O.cloneNode(!0),L=document.createElement("td"),P=L.cloneNode(!0),S=L.cloneNode(!0),Y=L.cloneNode(!0),I=L.cloneNode(!0),aa=L.cloneNode(!0);L.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);e=document.createElement("span");mxUtils.write(e,
+mxResources.get("fitToSheetsAcross"));S.appendChild(e);mxUtils.write(Y,mxResources.get("fitToBy"));var X=M.cloneNode(!0);I.appendChild(X);mxEvent.addListener(M,"focus",function(){A.checked=!0});mxEvent.addListener(X,"focus",function(){A.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));aa.appendChild(e);O.appendChild(L);O.appendChild(P);O.appendChild(S);N.appendChild(Y);N.appendChild(I);N.appendChild(aa);R.appendChild(O);R.appendChild(N);l.appendChild(R);
+p.appendChild(l);k.appendChild(p);p=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));p.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));p.appendChild(e);
+var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";p.appendChild(U);k.appendChild(p);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&e.appendChild(p);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+l.className="geBtn",e.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);a.editor.cancelFirst||e.appendChild(p);k.appendChild(e);this.container=k};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(w.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))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.5.15";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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.sidebarFooterHeight=36;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.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"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
-!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&
-6<a.length}catch(p){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(u){}})();
-EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,
-length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=d.spin;d.spin=function(c,k){var m=!1;this.active||(g.call(this,c),this.active=!0,null!=k&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",m.style.fontSize="9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight=
-"10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),m.innerHTML=k+"...",c.appendChild(m),d.status=m,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(m.style.left=Math.round(Math.max(0,a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,
-b+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),m=!0);return m};var k=d.stop;d.stop=function(){k.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=g(a);var m=d(a,4);if(null!=b&&b(k-8,m,c))break;value=d(a,c);d(a,4);if("IEND"==m)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};
-var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>d&&(c=b.substring(d,g+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),f=this.editor.extractGraphModel(e.documentElement,null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(v){}return c};EditorUi.prototype.validateFileData=
-function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=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 g=d.length-1;0<=g;g--){var e=this.updatePageRoot(new DiagramPage(d[g]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[g+1]));b.model.execute(new ChangePage(this,e,0==g?e: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])),b.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!=c)for(g=0;g<c.length;g++)b.model.execute(new ChangePage(this,c[g],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,f,h,n,l,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;l=null!=l?l:!0;var g,k=null;null==c||
-c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":k=g=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),m=b.compress(q);if(b.decompress(m)!=q)return q;q=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,m);m=a.ownerDocument.createElement("mxfile");m.appendChild(q)}t?(m=m.cloneNode(!0),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.setAttribute("userAgent",
-navigator.userAgent),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a));a=mxUtils.getXml(m);if(!f&&!e&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,g,k);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,n,l,k);return a};EditorUi.prototype.getXmlFileData=
-function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var g=0;g<this.pages.length;g++){var k=this.pages[g].mapping;this.currentPage!=this.pages[g]&&null!=k&&k.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(k.graphModel),
-k.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[g].node,d),k.needsUpdate=!1);c.appendChild(this.pages[g].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,h,n,l){e=null!=e?e:!0;h=null!=h?h:this.getXmlFileData(e,null!=f?f:!1);l=null!=l?l:this.getCurrentFile();f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());
-var g=f.getGlobalVariable,k=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(k.root)}a=this.createFileData(h,f,l,window.location.href,a,b,c,d,e,n);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,k="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():
-b.getBoundingBox(b.getSelectionCells()),m=b.view.scale;f=Math.floor(g.x/m-b.view.translate.x);m=Math.floor(g.y/m-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(k="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",f);a.setAttribute("y0",m)}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!=
-e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?
-'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=g&&g!=mxConstants.NONE?' style="background-color:'+g+';">':">")+'\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==e?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\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==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-e+'" target="_blank"><img border="0" src="https://www.draw.io/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;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=
-b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();
-var g=this.getBaseFilename(),k=g+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(k,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(k,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=g+".png":"jpeg"==a&&(k=g+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,
-function(b,c){try{var g=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=g;return k}catch(H){this.handleError(H)}}));else{var t=null,h=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(t)}))});if("svg"==a){var q=this.editor.graph.background;
-q==mxConstants.NONE&&(q=null);var n=this.editor.graph.getSvg(q,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();h('<?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=g+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();h(a)}),d)}}catch(w){this.handleError(w)}};
-EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var k="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(var m=0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){k="&from="+m;break}return new mxXmlRequest(EXPORT_URL,"format="+b+k+"&base64="+d+"&embedXml="+
-g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=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();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.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
-this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
-this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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){null!=
-window.console&&console.log("error in fileLoaded:",a,u);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(p){}this.handleError(u,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+
-(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,h){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".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(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);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 c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=
-function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&
-(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var d=
-0;d<b.length;d++){var e=b[d],k=e.data;if(null!=k){var k=this.convertDataUri(k),m="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(m+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(m+"image="+k,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(k=this.stringToCells(this.editor.graph.decompress(e.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
-b)for(var k=0;k<b.length;k++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));
-return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var f=m.parentNode.previousSibling;c=f.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&f.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top=
-"5px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");f.style.position="relative";var h=document.createElement("img");h.setAttribute("src",Dialog.prototype.closeImage);h.setAttribute("title",mxResources.get("close"));h.setAttribute("align","top");h.setAttribute("border","0");h.className="geButton";h.style.marginRight="1px";h.style.marginTop="-1px";t.appendChild(h);var n=null;mxEvent.addListener(h,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var l=this.editor.graph,w=null,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(c)}),C=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=w&&null!=w.parentNode&&w.parentNode.removeChild(w),w=h.cloneNode(!1),
-w.setAttribute("src",Editor.spinImage),w.setAttribute("title",mxResources.get("saving")),w.style.cursor="default",w.style.marginRight="2px",w.style.marginTop="-2px",t.insertBefore(w,t.firstChild),f.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=w&&null!=w.parentNode&&(w.parentNode.removeChild(w),f.style.paddingRight=18*t.childNodes.length+"px")})):null==n&&(n=h.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",
-mxResources.get("save")),t.insertBefore(n,t.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(f.style.paddingRight=18*t.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(c)})),f.style.paddingRight=18*t.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,e){a=l.cloneCells(mxUtils.sortCells(l.model.getTopmostCells(a)));for(var k=
-0;k<a.length;k++){var f=l.getCellGeometry(a[k]);null!=f&&f.translate(-c.x,-c.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);C(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),H=mxUtils.bind(this,function(a){if(l.isSelectionEmpty())l.getRubberband().isActive()?(l.getRubberband().execute(a),
-l.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=l.getSelectionCells(),c=l.view.getBounds(b),d=l.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=l.view.translate.x;c.y-=l.view.translate.y;F(b,c)}mxEvent.consume(a)});m.style.border="3px solid transparent";mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility=
-"hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":m.style.border="3px dotted rgb(254, 137, 12)",m.style.cursor="copy",l.panningManager.stop(),l.autoScroll=!1,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!1),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler&&(m.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),
-m.style.cursor="default",this.sidebar.showTooltips=!0,l.panningManager.stop(),l.graphHandler.reset(),l.isMouseDown=!1,l.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="visible",m.style.border="3px solid transparent",m.style.cursor="",l.autoScroll=!0,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!0),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility=
-"visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":m.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.border="3px solid transparent";m.style.cursor="";null!=g&&(g.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,f,t,h,l,n,q){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,t,h),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,t,h),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
-0<b.length&&(g.parentNode.removeChild(g),g=null);else{var p=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var f=JSON.parse(mxUtils.getTextContent(k.documentElement));e(f,m);b=b.concat(f);C(a);this.spinner.stop();p=!0}catch(U){}else if("mxfile"==k.documentElement.nodeName)try{for(var t=k.documentElement.getElementsByTagName("diagram"),k=0;k<t.length;k++){var f=mxUtils.getTextContent(t[k]),h=this.stringToCells(this.editor.graph.decompress(f)),
-l=this.editor.graph.getBoundingBoxFromGeometry(h);F(h,new mxRectangle(0,0,l.width,l.height),a)}p=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=q&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l)||/(\.vsd)($|\?)/i.test(l))?this.importVisio(q,function(a){u(a,"text/xml")},null,l):!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=q?this.parseFile(q,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(m.style.border=
-"3px solid transparent",m.style.cursor="");a.stopPropagation();a.preventDefault()}));h=h.cloneNode(!1);h.setAttribute("src",IMAGE_PATH+"/edit.gif");h.setAttribute("title",mxResources.get("edit"));t.insertBefore(h,t.firstChild);mxEvent.addListener(h,"click",B);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==m&&B(a)});c=h.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.firstChild);mxEvent.addListener(c,"click",
-H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(c,t.firstChild))}f.appendChild(t);f.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline||
-EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));
-a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",
-Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor=
-"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!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(p){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=
+b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
+function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=d.spin;d.spin=function(c,k){var e=!1;this.active||(g.call(this,c),this.active=!0,null!=k&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize=
+"9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=k+"...",c.appendChild(e),d.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=
+Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),e=!0);return e};var k=d.stop;d.stop=function(){k.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
+b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=g(a);var e=d(a,4);if(null!=b&&b(k-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,
+!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>d&&(c=b.substring(d,g+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),f=this.editor.extractGraphModel(e.documentElement,
+null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(w){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
+b.model.beginUpdate();try{var c=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 g=d.length-1;0<=g;g--){var e=this.updatePageRoot(new DiagramPage(d[g]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[g+1]));b.model.execute(new ChangePage(this,e,0==g?e: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])),b.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!=c)for(g=0;g<c.length;g++)b.model.execute(new ChangePage(this,c[g],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(a,b,c,d,e,f,h,m,l,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;l=null!=l?l:!0;var g,k=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":k=g=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(p);if(b.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,n);n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}t?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),
+n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!f&&!e&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,g,k);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,m,l,k);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var g=0;g<this.pages.length;g++){var e=
+this.pages[g].mapping;this.currentPage!=this.pages[g]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[g].node,d),e.needsUpdate=!1);c.appendChild(this.pages[g].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,h,m,l){e=null!=e?e:!0;h=null!=h?h:this.getXmlFileData(e,null!=f?f:!1);l=null!=l?l:this.getCurrentFile();
+f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var g=f.getGlobalVariable,k=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(k.root)}a=this.createFileData(h,f,l,window.location.href,a,b,c,d,e,m);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);
+return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,k="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;f=Math.floor(g.x/n-b.view.translate.x);n=Math.floor(g.y/n-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(k="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",f);a.setAttribute("y0",n)}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!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=g&&g!=mxConstants.NONE?' style="background-color:'+g+';">':">")+'\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==e?'<script type="text/javascript" src="'+k+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\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==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/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;var b=null!=a&&0<a.length?
+mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
+0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),k=g+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(k,a,n,"text/xml")}else if("html"==
+a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(k,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=g+".png":"jpeg"==a&&(k=g+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,c){try{var g=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var e=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=g;return e}catch(H){this.handleError(H)}}));else{var t=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(t)}))});if("svg"==a){var h=this.editor.graph.background;h==mxConstants.NONE&&(h=null);var m=this.editor.graph.getSvg(h,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,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=g+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),d)}}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var e="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){e="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+e+"&base64="+d+"&embedXml="+g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=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);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.updateUi();this.showSplash()});
+if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(p){}}catch(p){null!=window.console&&console.log("error in fileLoaded:",a,p);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=p&&null!=p.message?":err:"+encodeURIComponent(p.message):
+"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(q){}this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,h){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?
+this.getLocalData(".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(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);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 c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=
+null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
+function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign=
+"center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var d=0;d<b.length;d++){var e=b[d],k=e.data;if(null!=k){var k=this.convertDataUri(k),n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(n+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(n+"image="+k,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(k=this.stringToCells(this.editor.graph.decompress(e.xml)),
+0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var k=0;k<b.length;k++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",
+a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);c=null!=c&&0<c.length?c:a.getTitle();var n=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var f=n.parentNode.previousSibling;c=f.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=
+a.title&&f.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");f.style.position="relative";var h=document.createElement("img");h.setAttribute("src",Dialog.prototype.closeImage);h.setAttribute("title",mxResources.get("close"));h.setAttribute("valign","absmiddle");h.setAttribute("border","0");
+h.style.margin="0 3px";var m=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var l=this.editor.graph,z=null,D=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
+n,b,a,a.getMode());mxEvent.consume(c)}),y=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=h.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",t.insertBefore(z,t.firstChild),f.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=
+z.parentNode&&(z.parentNode.removeChild(z),f.style.paddingRight=18*t.childNodes.length+"px")})):null==m&&(m=h.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),t.insertBefore(m,t.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||(f.style.paddingRight=18*t.childNodes.length+"px",m.parentNode.removeChild(m),
+m=null)});mxEvent.consume(c)})),f.style.paddingRight=18*t.childNodes.length+"px")}),B=mxUtils.bind(this,function(a,c,d,e){a=l.cloneCells(mxUtils.sortCells(l.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var f=l.getCellGeometry(a[k]);null!=f&&f.translate(-c.x,-c.y)}n.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);
+y(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),H=mxUtils.bind(this,function(a){if(l.isSelectionEmpty())l.getRubberband().isActive()?(l.getRubberband().execute(a),l.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=l.getSelectionCells(),c=l.view.getBounds(b),d=l.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=l.view.translate.x;c.y-=l.view.translate.y;B(b,c)}mxEvent.consume(a)});
+n.style.border="3px solid transparent";mxEvent.addGestureListeners(n,function(){},mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)",n.style.cursor="copy",l.panningManager.stop(),l.autoScroll=!1,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!1),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler&&(n.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),n.style.cursor="default",this.sidebar.showTooltips=!0,l.panningManager.stop(),l.graphHandler.reset(),l.isMouseDown=!1,l.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility=
+"visible",n.style.border="3px solid transparent",n.style.cursor="",l.autoScroll=!0,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!0),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";n.style.cursor=
+"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"drop",mxUtils.bind(this,function(a){n.style.border="3px solid transparent";n.style.cursor="";null!=g&&(g.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,f,t,h,p,l,m){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),
+c=[new mxCell("",new mxGeometry(0,0,t,h),c)],c[0].vertex=!0,B(c,new mxRectangle(0,0,t,h),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var q=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var f=JSON.parse(mxUtils.getTextContent(k.documentElement));e(f,n);b=b.concat(f);y(a);this.spinner.stop();
+q=!0}catch(U){}else if("mxfile"==k.documentElement.nodeName)try{for(var t=k.documentElement.getElementsByTagName("diagram"),k=0;k<t.length;k++){var f=mxUtils.getTextContent(t[k]),h=this.stringToCells(this.editor.graph.decompress(f)),p=this.editor.graph.getBoundingBoxFromGeometry(h);B(h,new mxRectangle(0,0,p.width,p.height),a)}q=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&
+null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=m&&null!=p&&(/(\.vsdx)($|\?)/i.test(p)||/(\.vssx)($|\?)/i.test(p)||/(\.vsd)($|\?)/i.test(p))?this.importVisio(m,function(a){u(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,p)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",n.style.cursor="");a.stopPropagation();a.preventDefault()}));h=h.cloneNode(!1);h.setAttribute("src",IMAGE_PATH+"/edit.gif");h.setAttribute("title",mxResources.get("edit"));t.insertBefore(h,t.firstChild);mxEvent.addListener(h,
+"click",D);mxEvent.addListener(n,"dblclick",function(a){mxEvent.getSource(a)==n&&D(a)});c=h.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.firstChild);mxEvent.addListener(c,"click",H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,
+"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(c,t.firstChild))}f.appendChild(t);f.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=
+function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
+EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
+Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
+"0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){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 b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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){var d=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=g||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=g)if(null!=g.retry&&(e=mxResources.get("cancel"),k=function(){d();g.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
-else if(404==g.code||404==g.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var m=window.location.hash;null!=m&&"#G"==m.substring(0,2)&&(m=m.substring(2),a+=' <a href="https://drive.google.com/open?id='+m+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else g.code==App.ERROR_TIMEOUT?a=
-mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=g.message?a=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error&&(a=mxUtils.htmlEntities(g.response.error));this.showError(b,a,e,c,k)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,h,l,n,t,z){a=new ErrorDialog(this,a,b,c,d,e,f,h,null,l,n);this.showDialog(a.container,t||340,z||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
+this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(g=mxResources.get("cancel"),k=function(){d();e.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
+else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var n=window.location.hash;null!=n&&"#G"==n.substring(0,2)&&(n=n.substring(2),a+=' <a href="https://drive.google.com/open?id='+n+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else e.code==App.ERROR_TIMEOUT?a=
+mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,g,c,k)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,h,l,m,t,x){a=new ErrorDialog(this,a,b,c,d,e,f,h,null,l,m);this.showDialog(a.container,t||340,x||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){g();null!=b&&b()},function(){g();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
-return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,g=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(g,d,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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
+return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,e=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(e,d,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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){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)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
-"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),k=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(mxClient.IS_GC)var m=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),k=65==(m?parseInt(m[2],10):!1)?!1:k;if(k||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));k?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},
-0),g.click(),g.parentNode.removeChild(g)}catch(y){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,g=Math.ceil(d/1024),e=Array(g),
-k=0;k<g;++k){for(var f=1024*k,h=Math.min(f+1024,d),t=Array(h-f),l=0;f<h;++l,++f)t[l]=c[f].charCodeAt(0);e[k]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f,h){f=null!=f?f:!1;h=null!=h?h:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,g){try{if("_blank"==g)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");
-null==e?mxUtils.popup(a,!0):(e.document.write(mxUtils.htmlEntities(a,!1)),e.document.close())}else this.openInNewWindow(a,c,d);else g==App.MODE_DEVICE||"download"==g?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(g,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,g,e)}catch(G){this.handleError(G)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,h,null,1<e,4<e?3:4,a,c,d);this.showDialog(b.container,
+"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),k=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(mxClient.IS_GC)var n=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),k=65==(n?parseInt(n[2],10):!1)?!1:k;if(k||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));k?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},
+0),g.click(),g.parentNode.removeChild(g)}catch(A){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),g=Array(e),
+k=0;k<e;++k){for(var f=1024*k,h=Math.min(f+1024,d),t=Array(h-f),l=0;f<h;++l,++f)t[l]=c[f].charCodeAt(0);g[k]=new Uint8Array(t)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f,h){f=null!=f?f:!1;h=null!=h?h:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");
+null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,d,e,g)}catch(G){this.handleError(G)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,h,null,1<e,4<e?3:4,a,c,d);this.showDialog(b.container,
420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:
";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){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 g=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});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();
+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.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.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)}));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,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
-g){return this.createEchoRequest(c,a,d,e,b,g)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,g){if("_blank"==g||null!=a&&0<a.length){var e=c("_blank"==g?null:a,g==App.MODE_DEVICE||"download"==g||null==g||"_blank"==g?"0":"1");null!=e&&(g==App.MODE_DEVICE||"download"==g||"_blank"==g?e.simulate(document,"_blank"):this.pickFolder(g,mxUtils.bind(this,
-function(c){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,f,!0,g,c)}catch(D){this.handleError(D)}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,f,!0,g,c)}catch(D){this.handleError(D)}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,h,null,1<g,4<g?3:4,d,f,e);this.showDialog(a.container,380,g==(mxClient.IS_IOS?0:1)?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,h,l,n){if(this.spinner.spin(document.body,
-mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var k=this.editor.graph.getSvg(g,a,h,l,null,c);d&&this.editor.graph.addSvgShadow(k);var m=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?
-b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!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()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,k,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,q,this.thumbImageCache)):q(k)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement("input");g.style.marginRight="8px";g.style.marginTop="16px";g.setAttribute("type","checkbox");c&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d&&g.setAttribute("disabled",
-"disabled");f&&(a.appendChild(g),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),e||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=g.getAttribute("disabled")&&(g.checked=!g.checked,mxEvent.consume(a))})));return g};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(),g="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&
-(g=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==
-e.value){var a=new FilenameDialog(this,g,mxResources.get("ok"),function(a){null!=a?g=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.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)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":g:null},getEditInput:function(){return c},
-getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"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 g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));d.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));d.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));d.appendChild(g);b&&(g=document.createElement("option"),g.setAttribute("value",
-"frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(g));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=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 e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,h,l){var g=this.getCurrentFile(),k=[];d&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&k.push("edit="+encodeURIComponent(e)),f&&
+g){return this.createEchoRequest(c,a,d,e,b,g)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var g=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=g&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?g.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,
+function(c){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,f,!0,e,c)}catch(F){this.handleError(F)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,f,!0,e,c)}catch(F){this.handleError(F)}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,h,null,1<g,4<g?3:4,d,f,e);this.showDialog(a.container,380,g==(mxClient.IS_IOS?0:1)?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,h,l,m){if(this.spinner.spin(document.body,
+mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var k=this.editor.graph.getSvg(g,a,h,l,null,c);d&&this.editor.graph.addSvgShadow(k);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?
+b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!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()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,k,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,p,this.thumbImageCache)):p(k)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement("input");g.style.marginRight="8px";g.style.marginTop="16px";g.setAttribute("type","checkbox");c&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d&&g.setAttribute("disabled",
+"disabled");f&&(a.appendChild(g),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),e||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=g.getAttribute("disabled")&&(g.checked=!g.checked,mxEvent.consume(a))})));return g};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 g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));g.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");g.appendChild(d);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==
+g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.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)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return c},
+getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(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 g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=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 g},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,h,l){var g=this.getCurrentFile(),k=[];d&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&k.push("edit="+encodeURIComponent(e)),f&&
k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&k.push("page="+a);break}a=!0;null!=h?c="#U"+encodeURIComponent(h):(g=this.getCurrentFile(),l||null==g||g.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+g.getHash(),a=!1));
-a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&k.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<k.length?"?"+k.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,h,l,n,t,z){this.getBasenames();var g={};""!=e&&e!=mxConstants.NONE&&(g.highlight=e);"auto"!==d&&(g.target=d);n||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;
-c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];h&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),g.toolbar=c.join(" "));null!=t&&0<t.length&&(g.edit=t);null!=a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!h);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(g))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var g=document.createElement("div");g.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";g.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");e=f.cloneNode(!0);e.setAttribute("value",
-"copy");k.appendChild(e);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(m);mxUtils.br(k);k.appendChild(f);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));k.appendChild(m);var h=this.getCurrentFile();null==c&&null!=h&&h.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),
-k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(h.getId())})));e.setAttribute("checked","checked");null==c&&f.setAttribute("disabled","disabled");g.appendChild(k);var l=this.addLinkSection(g),n=this.addCheckbox(g,mxResources.get("zoom"),!0,null,!0);mxUtils.write(g,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
-"12px";q.value="100%";g.appendChild(q);var w=this.addCheckbox(g,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(g,mxResources.get("allPages"),k,!k),C=this.addCheckbox(g,mxResources.get("layers"),!0),F=this.addCheckbox(g,mxResources.get("lightbox"),!0),H=this.addEditButton(g,F),A=H.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");A.checked&&F.checked?
-H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,g,mxUtils.bind(this,function(){d(f.checked?c:null,n.checked,q.value,l.getTarget(),l.getColor(),w.checked,B.checked,C.checked,F.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
-mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var m=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=m&&m.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384",h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));h.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));l.style.marginTop="12px";l.className="geBtn";h.appendChild(l);g.appendChild(h);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));
-h.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(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 n=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),n=document.createElement("input"),
-n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",g.appendChild(n),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var p=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==m||m.constructor!=window.DriveFile||b)u=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var C=this.addCheckbox(g,mxResources.get("lightbox"),!0),F=this.addEditButton(g,C),H=F.getEditInput(),A=this.addCheckbox(g,mxResources.get("layers"),!0);A.style.marginLeft=H.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(C,"change",function(){C.checked?(A.removeAttribute("disabled"),H.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),H.setAttribute("disabled",
-"disabled"));H.checked&&C.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(p.getTarget(),p.getColor(),null==u?!0:u.checked,C.checked,F.getLink(),A.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():
-document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var g=document.createElement("div");g.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:4px";g.appendChild(e);var k=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),f=d?null:this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),
-!0);null!=f&&(f.style.marginBottom="16px");a=new CustomDialog(this,g,mxUtils.bind(this,function(){c(!k.checked,null!=f?f.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,h,l){h=null!=h?h:!0;var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,m="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-g.appendChild(n);mxUtils.write(g,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";g.appendChild(q);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||
-"0";g.appendChild(p);mxUtils.br(g);var u=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background,null,null,"jpeg"!=l),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");f&&(g.appendChild(x),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),
-m+=26,mxEvent.addListener(v,"change",function(){v.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));k.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var H=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||A.setAttribute("disabled","disabled");b&&(g.appendChild(A),mxUtils.write(g,
-mxResources.get("embedImages")),mxUtils.br(g),m+=26);var L=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=l),E=null!=this.pages&&1<this.pages.length,J=this.addCheckbox(g,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=l);J.style.marginLeft="24px";J.style.marginBottom="16px";E||(J.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&E?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});h&&E||J.setAttribute("disabled",
-"disabled");a=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=q.value;e(q.value,u.checked,!v.checked,H.checked,L.checked,A.checked,p.value,x.checked,!J.checked)}),null,c,d);this.showDialog(a.container,340,m,!0,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var g=document.createElement("div");
-g.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var f=document.createElement("h3");mxUtils.write(f,b);f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";g.appendChild(f)}var m=this.addCheckbox(g,mxResources.get("fit"),!0),h=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible&&d,!d),l=this.addCheckbox(g,c),n=this.addCheckbox(g,mxResources.get("lightbox"),!0),q=this.addEditButton(g,n),u=q.getEditInput(),B=1<k.model.getChildCount(k.model.getRoot()),
-C=this.addCheckbox(g,mxResources.get("layers"),B,!B);C.style.marginLeft=u.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(B&&C.removeAttribute("disabled"),u.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,
-function(){a(m.checked,h.checked,l.checked,n.checked,q.getLink(),C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,h,l){function g(b){var g=" ",m="";d&&(g=" 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('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');h('<img src="'+b+'"'+t+(""!=m?' style="'+m+'"':"")+g+"/>")}var k=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
-null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?g("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,h){var g=this.editor.graph.getSvg(),k=g.getElementsByTagName("a");if(null!=k)for(var m=0;m<k.length;m++){var l=k[m].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==k[m].getAttribute("target")&&k[m].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var n=" ",q="";d&&(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('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(g.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('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=q&&g.setAttribute("style",q),h(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=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+
+a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&k.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<k.length?"?"+k.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,h,l,m,t,x){this.getBasenames();var g={};""!=e&&e!=mxConstants.NONE&&(g.highlight=e);"auto"!==d&&(g.target=d);m||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;
+c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];h&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);l&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),g.toolbar=c.join(" "));null!=t&&0<t.length&&(g.edit=t);null!=a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!h);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(g))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");
+mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");g=f.cloneNode(!0);g.setAttribute("value",
+"copy");k.appendChild(g);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(n);mxUtils.br(k);k.appendChild(f);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));k.appendChild(n);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href","javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),
+k.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));g.setAttribute("checked","checked");null==c&&f.setAttribute("disabled","disabled");e.appendChild(k);var h=this.addLinkSection(e),l=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight=
+"12px";m.value="100%";e.appendChild(m);var u=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(e,mxResources.get("allPages"),k,!k),y=this.addCheckbox(e,mxResources.get("layers"),!0),B=this.addCheckbox(e,mxResources.get("lightbox"),!0),H=this.addEditButton(e,B),C=H.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&B.checked?
+H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(f.checked?c:null,l.checked,m.value,h.getTarget(),h.getColor(),u.checked,D.checked,y.checked,B.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
+mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var n=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384",t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var h=document.createElement("div");h.style.whiteSpace="normal";mxUtils.write(h,mxResources.get("linkAccountRequired"));t.appendChild(h);h=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));h.style.marginTop="12px";h.className="geBtn";t.appendChild(h);g.appendChild(t);h=document.createElement("a");h.style.paddingLeft="12px";h.style.color="gray";h.style.fontSize="11px";h.setAttribute("href","javascript:void(0);");mxUtils.write(h,mxResources.get("check"));
+t.appendChild(h);mxEvent.addListener(h,"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 l=null,m=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),l=document.createElement("input"),
+l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",g.appendChild(l),mxUtils.write(g,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",g.appendChild(m),mxUtils.br(g);var p=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var q=null;
+if(null==n||n.constructor!=window.DriveFile||b)q=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var u=this.addCheckbox(g,mxResources.get("lightbox"),!0),B=this.addEditButton(g,u),H=B.getEditInput(),C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=H.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(C.removeAttribute("disabled"),H.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),H.setAttribute("disabled",
+"disabled"));H.checked&&u.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(p.getTarget(),p.getColor(),null==q?!0:q.checked,u.checked,B.getLink(),C.checked,null!=l?l.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
+document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g);var k=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),f=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=f&&(f.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!k.checked,null!=f?f.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,h,l){h=null!=h?h:!0;var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,n="jpeg"==l?196:300,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+g.appendChild(m);mxUtils.write(g,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%";g.appendChild(p);mxUtils.write(g,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
+"0";g.appendChild(u);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background,null,null,"jpeg"!=l),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),w=document.createElement("input");w.style.marginTop="16px";w.style.marginRight="8px";w.style.marginLeft="24px";w.setAttribute("disabled","disabled");w.setAttribute("type","checkbox");f&&(g.appendChild(w),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),
+n+=26,mxEvent.addListener(v,"change",function(){v.checked?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}));k.isSelectionEmpty()||(w.setAttribute("checked","checked"),w.defaultChecked=!0);var H=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(g.appendChild(C),mxUtils.write(g,
+mxResources.get("embedImages")),mxUtils.br(g),n+=26);var J=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=l),E=null!=this.pages&&1<this.pages.length,K=this.addCheckbox(g,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=l);K.style.marginLeft="24px";K.style.marginBottom="16px";E||(K.style.visibility="hidden");mxEvent.addListener(J,"change",function(){J.checked&&E?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});h&&E||K.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=p.value;e(p.value,q.checked,!v.checked,H.checked,J.checked,C.checked,u.value,w.checked,!K.checked)}),null,c,d);this.showDialog(a.container,340,n,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var g=document.createElement("div");
+g.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var f=document.createElement("h3");mxUtils.write(f,b);f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";g.appendChild(f)}var n=this.addCheckbox(g,mxResources.get("fit"),!0),t=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible&&d,!d),h=this.addCheckbox(g,c),l=this.addCheckbox(g,mxResources.get("lightbox"),!0),m=this.addEditButton(g,l),p=m.getEditInput(),u=1<k.model.getChildCount(k.model.getRoot()),
+y=this.addCheckbox(g,mxResources.get("layers"),u,!u);y.style.marginLeft=p.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(u&&y.removeAttribute("disabled"),p.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"));p.checked&&l.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,
+function(){a(n.checked,t.checked,h.checked,l.checked,m.getLink(),y.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,h,l){function g(b){var g=" ",n="";d&&(g=" 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('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');h('<img src="'+b+'"'+t+(""!=n?' style="'+n+'"':"")+g+"/>")}var k=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
+null,!0,c?2:1,null,b);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 m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?g("data:image/png;base64,"+m.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,h){var g=this.editor.graph.getSvg(),k=g.getElementsByTagName("a");if(null!=k)for(var n=0;n<k.length;n++){var l=k[n].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==k[n].getAttribute("target")&&k[n].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var m=" ",p="";d&&(m="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('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",d&&(g.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('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=p&&g.setAttribute("style",p),h(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=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.convertMath=function(a,b,c,d){d()};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],g=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:g.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(p){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
-g=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),g=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,f=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(f.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==g&&(g=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(g)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
+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&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
+e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),g=d.getGlobalVariable,k=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var g=c.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(g.substring(g.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
function(a,b,c,d,e,f,h){h=b.background;h==mxConstants.NONE&&(h=null);b=b.getSvg(h,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((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(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f,h,l,n){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,n)}catch(G){"Invalid image"==G.message?this.downloadFile(n):this.handleError(G)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,f,h)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,g={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],f=1;f<c.length;f++){var k=
-c[f].indexOf(")");e.push('url("');e.push(g[b(c[f].substring(0,k))]);e.push('"'+c[f].substring(k))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var f=1;f<c.length;f++){var h=c[f].indexOf(")"),l=null,t=c[f].indexOf("format(",h);0<t&&(l=b(c[f].substring(t+7,c[f].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==g[a]){g[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b=
-"application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){g[a]=b;d--;e()}),mxUtils.bind(this,
-function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[f].substring(0,h)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,h,l,n,t,z,G,D,w){f=null!=f?f:!0;G=null!=G?G:this.editor.graph;D=null!=D?D:0;var g=n?null:G.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==n&&(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(G.getSvg(g,null,null,w,null,null!=h?h:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,
-function(){try{var k=document.createElement("canvas"),m=parseInt(c.getAttribute("width")),h=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*h),b/m)):b/m);m=Math.ceil(l*m)+2*D;h=Math.ceil(l*h)+2*D;k.setAttribute("width",m);k.setAttribute("height",h);var t=k.getContext("2d");null!=g&&(t.beginPath(),t.rect(0,0,m,h),t.fillStyle=g,t.fill());t.scale(l,l);t.drawImage(d,D/l,D/l);a(k)}catch(Q){null!=e&&e(Q)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);
-var k=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(G,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(A){null!=e&&e(A)}}),c,z)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
-c=this;a.convert=function(d){if(null!=d){var g="http://"==d.substring(0,7)||"https://"==d.substring(0,8);g&&!navigator.onLine?d=c.svgBrokenImage.src:!g||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var g=0,e=c||{};c=mxUtils.bind(this,
-function(c,f){for(var k=a.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(f));if(null!=k&&"data:"!=k.substring(0,5)){var m=e[k];null==m?(g++,this.convertImageToDataUri(k,function(d){null!=d&&(e[k]=d,c.setAttribute(f,d));g--;0==g&&b(a)})):c.setAttribute(f,m)}else null!=k&&c.setAttribute(f,k)})(k[m])});c("image","xlink:href");c("img","src");0==g&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,f){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f,h,l,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,m)}catch(G){"Invalid image"==G.message?this.downloadFile(m):this.handleError(G)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,f,h)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var g=[c[0]],k=1;k<c.length;k++){var f=
+c[k].indexOf(")");g.push('url("');g.push(e[b(c[k].substring(0,f))]);g.push('"'+c[k].substring(f))}this.editor.resolvedFontCss=g.join("");a()}});if(0<c.length)for(var f=1;f<c.length;f++){var h=c[f].indexOf(")"),l=null,t=c[f].indexOf("format(",h);0<t&&(l=b(c[f].substring(t+7,c[f].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b=
+"application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;g()}),mxUtils.bind(this,
+function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[f].substring(0,h)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,h,l,m,t,x,G,F,z){f=null!=f?f:!0;G=null!=G?G:this.editor.graph;F=null!=F?F:0;var g=m?null:G.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==m&&(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(G.getSvg(g,null,null,z,null,null!=h?h:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,
+function(){try{var k=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),h=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*h),b/n)):b/n);n=Math.ceil(l*n)+2*F;h=Math.ceil(l*h)+2*F;k.setAttribute("width",n);k.setAttribute("height",h);var t=k.getContext("2d");null!=g&&(t.beginPath(),t.rect(0,0,n,h),t.fillStyle=g,t.fill());t.scale(l,l);t.drawImage(d,F/l,F/l);a(k)}catch(Q){null!=e&&e(Q)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);
+var k=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(G,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(C){null!=e&&e(C)}}),c,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
+c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,
+function(c,k){for(var f=a.getElementsByTagName(c),h=0;h<f.length;h++)mxUtils.bind(this,function(c){var f=d.convert(c.getAttribute(k));if(null!=f&&"data:"!=f.substring(0,5)){var h=g[f];null==h?(e++,this.convertImageToDataUri(f,function(d){null!=d&&(g[f]=d,c.setAttribute(k,d));e--;0==e&&b(a)})):c.setAttribute(k,h)}else null!=f&&c.setAttribute(k,f)})(f[h])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,f){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var k=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}f=null!=f?f:"data:image/png;base64,";d=f+this.base64Encode(d)}b(d)}}else null!=
-c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})})});k()}catch(y){null!=c&&c(y)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
+c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})})});k()}catch(A){null!=c&&c(A)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),
-g=a.getContext("2d");a.height=c.height;a.width=c.width;g.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),m=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var h=m.getElementsByTagName("diagram");
-if(1==h.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(h[0]))).documentElement;else if(1<h.length){f.model.beginUpdate();try{for(a=0;a<h.length;a++){var l=this.updatePageRoot(new DiagramPage(h[a])),n=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[n+1]));f.model.execute(new ChangePage(this,l,l,n))}}finally{f.model.endUpdate()}}}null!=m&&"mxGraphModel"===m.nodeName&&(g=f.importGraphModel(m,b,c,d))}}catch(D){throw e||this.handleError(D,mxResources.get("invalidOrMissingFile")),
-D;}return g};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.append("file1",a);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{this.doImportVisio(g.response,
-b,c)}catch(x){c(x)}else c({})});g.send(e)}else try{this.doImportVisio(a,b,c)}catch(x){c(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(k){this.handleError(k)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
-this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(v){this.handleError(v)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(g,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",g):mxscript("js/extensions.min.js",
+e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(w){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),h=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var n=h.getElementsByTagName("diagram");
+if(1==n.length)h=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate();try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,l,l,m))}}finally{f.model.endUpdate()}}}null!=h&&"mxGraphModel"===h.nodeName&&(g=f.importGraphModel(h,b,c,d))}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),
+F;}return g};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.append("file1",a);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{this.doImportVisio(g.response,
+b,c)}catch(v){c(v)}else c({})});g.send(e)}else try{this.doImportVisio(a,b,c)}catch(v){c(v)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(k){this.handleError(k)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
+this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(w){this.handleError(w)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(g,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",g):mxscript("js/extensions.min.js",
g))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var g in e.Pages)a.push(e.Pages[g]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(e);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,d),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f,h){f=null!=f?f:!0;h=null!=h?h:!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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),m=this.importXml(k,b,c,f,!0);if(0<m.length)return m}if("data:image/svg+xml;"==a.substring(0,19))try{if(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)),m=this.importXml(k,b,c,f,!0),0<m.length)return m}catch(z){}this.loadImage(a,mxUtils.bind(this,
+this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),t=this.importXml(k,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(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)),t=this.importXml(k,b,c,f,!0),0<t.length)return t}catch(x){}this.loadImage(a,mxUtils.bind(this,
function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),h,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,
null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,f);else{g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(e.value)&&
g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,h,l,n,t,z){t=null!=t?t:!0;var g=!1,k=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,h)):b=this.importXml(a,c,d,t);null!=l&&l(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,t),n=
-!0)),n||(k=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&k.isGridEnabled()&&(c=k.snap(c),d=k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,t);null!=l&&l(a)})):null!=
-n&&null!=h&&(/(\.vsdx)($|\?)/i.test(h)||/(\.vssx)($|\?)/i.test(h)||/(\.vsd)($|\?)/i.test(h))?(g=!0,this.importVisio(n,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(g=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=l&&l(null))}),h)):/(\.vsd)($|\?)/i.test(h)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));g||null==l||l(k);
+function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,h,l,m,t,x){t=null!=t?t:!0;var g=!1,k=null,n=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,h)):b=this.importXml(a,c,d,t);null!=l&&l(b)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,t),m=
+!0)),m||(k=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&k.isGridEnabled()&&(c=k.snap(c),d=k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,t);null!=l&&l(a)})):null!=
+m&&null!=h&&(/(\.vsdx)($|\?)/i.test(h)||/(\.vssx)($|\?)/i.test(h)||/(\.vsd)($|\?)/i.test(h))?(g=!0,this.importVisio(m,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(g=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=l&&l(null))}),h)):/(\.vsd)($|\?)/i.test(h)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));g||null==l||l(k);
return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,f;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}g=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}f=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(f&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return b};
-EditorUi.prototype.importFiles=function(a,b,c,d,e,f,h,l,n,t,z,G){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var g=null!=b&&null!=c,k=!0,m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=z||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>q){m=!0;break}var u=mxUtils.bind(this,function(){var m=this.editor.graph,n=m.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,k,m,h){return null!=a&&"<mxlibrary"==a.substring(0,
-10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,f,k,m,h,g,G)});f=null!=f?f:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,p=q,u=[],v=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--p){this.spinner.stop();if(null!=l)l(u);else{var c=[];m.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{m.getModel().endUpdate()}}f(c)}}),
-w=0;w<q;w++)mxUtils.bind(this,function(g){var f=a[g],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(f))if("image/"==f.type.substring(0,6))if("image/svg"==f.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(q+1)))),u=mxUtils.parseXml(p),p=u.getElementsByTagName("svg");if(0<p.length){var p=p[0],A=G?null:p.getAttribute("content");null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));
-null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null==A||"<mxfile "!==A.substring(0,8)&&"<mxGraphModel "!==A.substring(0,14)?v(g,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var h=a[0],t=parseFloat(h.getAttribute("width")),p=parseFloat(h.getAttribute("height")),z=h.getAttribute("viewBox");if(null==z||0==z.length)h.setAttribute("viewBox","0 0 "+t+" "+p);else if(isNaN(t)||isNaN(p)){var A=z.split(" ");3<A.length&&(t=parseFloat(A[2]),
-p=parseFloat(A[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var E=Math.min(1,Math.min(d/Math.max(1,t)),d/Math.max(1,p)),v=e(l,f.type,b+g*n,c+g*n,Math.max(1,Math.round(t*E)),Math.max(1,Math.round(p*E)),f.name,k);if(isNaN(t)||isNaN(p)){var G=new Image;G.onload=mxUtils.bind(this,function(){t=Math.max(1,G.width);p=Math.max(1,G.height);v[0].geometry.width=t;v[0].geometry.height=p;h.setAttribute("viewBox","0 0 "+t+" "+p);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,
-a)+l.substring(l.indexOf(",",a+1)));m.setCellStyles("image",l,[v[0]])});G.src=this.createSvgDataUri(mxUtils.getXml(h))}return v}}}catch(ka){}return null})):v(g,mxUtils.bind(this,function(){return e(A,"text/xml",b+g*n,c+g*n,0,0,f.name)}))}}else{p=!1;if("image/png"==f.type){var E=G?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var w=new Image;w.src=a.target.result;v(g,mxUtils.bind(this,function(){return e(E,"text/xml",b+g*n,c+g*n,w.width,w.height,f.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?
-(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,h,l){v(g,mxUtils.bind(this,function(){if(null!=m&&m.length<t){var q=k&&this.isResampleImage(a.target.result,z)?Math.min(1,
-Math.min(d/h,d/l)):1;return e(m,f.type,b+g*n,c+g*n,Math.round(h*q),Math.round(l*q),f.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,f.type,b+g*n,c+g*n,240,160,f.name,function(a){v(g,function(){return a})})});/(\.vsdx)($|\?)/i.test(f.name)||/(\.vssx)($|\?)/i.test(f.name)||/(\.vsd)($|\?)/i.test(f.name)?e(null,f.type,b+g*n,c+g*n,240,160,
-f.name,function(a){v(g,function(){return a})},f):"image"==f.type.substring(0,5)?l.readAsDataURL(f):l.readAsText(f)})(w)});m?this.confirmImageResize(function(a){k=a;u()},n):u()};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||
+EditorUi.prototype.importFiles=function(a,b,c,d,e,f,h,l,m,t,x,G){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var g=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=x||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>p){n=!0;break}var u=mxUtils.bind(this,function(){var n=this.editor.graph,m=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,k,h,t){return null!=a&&"<mxlibrary"==a.substring(0,
+10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,f,k,h,t,g,G)});f=null!=f?f:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,u=[],v=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=l)l(u);else{var c=[];n.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{n.getModel().endUpdate()}}f(c)}}),
+w=0;w<p;w++)mxUtils.bind(this,function(g){var f=a[g],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(f))if("image/"==f.type.substring(0,6))if("image/svg"==f.type.substring(0,9)){var l=a.target.result,p=l.indexOf(","),q=decodeURIComponent(escape(atob(l.substring(p+1)))),u=mxUtils.parseXml(q),q=u.getElementsByTagName("svg");if(0<q.length){var q=q[0],C=G?null:q.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));
+null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?v(g,mxUtils.bind(this,function(){try{if(l.substring(0,p+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var h=a[0],t=parseFloat(h.getAttribute("width")),q=parseFloat(h.getAttribute("height")),x=h.getAttribute("viewBox");if(null==x||0==x.length)h.setAttribute("viewBox","0 0 "+t+" "+q);else if(isNaN(t)||isNaN(q)){var v=x.split(" ");3<v.length&&(t=parseFloat(v[2]),
+q=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var C=Math.min(1,Math.min(d/Math.max(1,t)),d/Math.max(1,q)),E=e(l,f.type,b+g*m,c+g*m,Math.max(1,Math.round(t*C)),Math.max(1,Math.round(q*C)),f.name,k);if(isNaN(t)||isNaN(q)){var J=new Image;J.onload=mxUtils.bind(this,function(){t=Math.max(1,J.width);q=Math.max(1,J.height);E[0].geometry.width=t;E[0].geometry.height=q;h.setAttribute("viewBox","0 0 "+t+" "+q);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,
+a)+l.substring(l.indexOf(",",a+1)));n.setCellStyles("image",l,[E[0]])});J.src=this.createSvgDataUri(mxUtils.getXml(h))}return E}}}catch(ka){}return null})):v(g,mxUtils.bind(this,function(){return e(C,"text/xml",b+g*m,c+g*m,0,0,f.name)}))}}else{q=!1;if("image/png"==f.type){var E=G?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var J=new Image;J.src=a.target.result;v(g,mxUtils.bind(this,function(){return e(E,"text/xml",b+g*m,c+g*m,J.width,J.height,f.name)}));q=!0}}q||(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(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,n,l){v(g,mxUtils.bind(this,function(){if(null!=h&&h.length<t){var p=k&&this.isResampleImage(a.target.result,x)?Math.min(1,
+Math.min(d/n,d/l)):1;return e(h,f.type,b+g*m,c+g*m,Math.round(n*p),Math.round(l*p),f.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,x)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,f.type,b+g*m,c+g*m,240,160,f.name,function(a){v(g,function(){return a})})});/(\.vsdx)($|\?)/i.test(f.name)||/(\.vssx)($|\?)/i.test(f.name)||/(\.vsd)($|\?)/i.test(f.name)?e(null,f.type,b+g*m,c+g*m,240,160,
+f.name,function(a){v(g,function(){return a})},f):"image"==f.type.substring(0,5)?l.readAsDataURL(f):l.readAsText(f)})(w)});n?this.confirmImageResize(function(a){k=a;u()},m):u()};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,c){c=null!=c?c:a.name;var d=new FormData;d.append("format",
-"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var m=Math.max(g/e,k/e);if(1<m){var h=Math.round(g/m),l=Math.round(k/m),n=document.createElement("canvas");
-n.width=h;n.height=l;n.getContext("2d").drawImage(a,0,0,h,l);var q=n.toDataURL();if(q.length<b.length){var p=document.createElement("canvas");p.width=h;p.height=l;var u=p.toDataURL();q!==u&&(b=q,g=h,k=l)}}}catch(C){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
-function(a,b,c,d,e){function g(a,b){var c=m;m+=b;return a.substring(c,m)}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 m=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,
-m);do{var h=f(a);if("IDAT"==g(a,4)){e=a.substring(0,m-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(m-8,a.length);break}e+=a.substring(m-8,m-4+h);g(a,h);g(a,4)}while(h);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&
-!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(u){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
+"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var h=Math.max(g/e,k/e);if(1<h){var t=Math.round(g/h),n=Math.round(k/h),l=document.createElement("canvas");
+l.width=t;l.height=n;l.getContext("2d").drawImage(a,0,0,t,n);var m=l.toDataURL();if(m.length<b.length){var p=document.createElement("canvas");p.width=t;p.height=n;var q=p.toDataURL();m!==q&&(b=m,g=t,k=n)}}}catch(y){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
+function(a,b,c,d,e){function g(a,b){var c=h;h+=b;return a.substring(c,h)}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 h=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,
+h);do{var t=f(a);if("IDAT"==g(a,4)){e=a.substring(0,h-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(h-8,a.length);break}e+=a.substring(h-8,h-4+t);g(a,t);g(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&
+!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(p){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,
c){a(c.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,
arguments)};var e=c.addClickHandler;c.addClickHandler=function(b,d,g){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};e.call(this,b,d,g)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var l=c.createLinkForHint;c.createLinkForHint=function(d,e){var g=c.isPageLink(d);if(g){var f=d.indexOf(",");0<f&&(f=b.getPageById(d.substring(f+1)),e=null!=
-f?f.getName():mxResources.get("pageNotFound"))}f=l.call(this,d,e);g&&mxEvent.addListener(f,"click",function(b){a(d);mxEvent.consume(b)});return f};var n=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var g=d.getAttribute("href");if(null==g||!c.isPageLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))n.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(g),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
-c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){z.innerHTML="&nbsp;";z.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);
+f?f.getName():mxResources.get("pageNotFound"))}f=l.call(this,d,e);g&&mxEvent.addListener(f,"click",function(b){a(d);mxEvent.consume(b)});return f};var m=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var g=d.getAttribute("href");if(null==g||!c.isPageLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))m.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(g),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
+c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");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);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var g=c.items;
-for(index in g){var f=g[index];if("file"===f.kind){if(b.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},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([f.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var z=document.createElement("div");z.style.position="absolute";z.style.whiteSpace=
-"nowrap";z.style.overflow="hidden";z.style.display="block";z.contentEditable=!0;mxUtils.setOpacity(z,0);z.style.width="1px";z.style.height="1px";z.innerHTML="&nbsp;";var G=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
-b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||G||(z.style.left=c.container.scrollLeft+10+"px",z.style.top=c.container.scrollTop+10+"px",c.container.appendChild(z),G=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){z.focus();document.execCommand("selectAll",!1,null)},0):(z.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!G||
-224!=b&&17!=b&&91!=b||(G=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),z.parentNode.removeChild(z))}),0)}));mxEvent.addListener(z,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(z),t())}));mxEvent.addListener(z,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(z,!0),t())}));mxEvent.addListener(z,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(z.innerHTML="&nbsp;",z.focus(),
-window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,z);z.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==z?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
+for(index in g){var f=g[index];if("file"===f.kind){if(b.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace=
+"nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var G=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
+b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||G||(x.style.left=c.container.scrollLeft+10+"px",x.style.top=c.container.scrollTop+10+"px",c.container.appendChild(x),G=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!G||
+224!=b&&17!=b&&91!=b||(G=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(x),t())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(x,!0),t())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),
+window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var F=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:F.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
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,g,f){b.insertImage(a,g,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(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()})))}));if("1"==urlParams.ruler&&"undefined"!==
-typeof mxRuler){y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="250px";y.style.width="2000px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);var w=document.createElement("div");w.style.position="absolute";w.style.top="125px";w.style.left="220px";w.style.width="30px";w.style.height="1000px";w.style.background="whiteSmoke";document.body.appendChild(w);var B=document.createElement("div");B.style.position="absolute";B.style.top=
-"95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,w,!0);this.hRuler=new mxRuler(this.editor.graph,y,!1)}if("1"==urlParams.test){y=document.getElementById("geFooter");null!=y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(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)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
-F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=c.view.translate,e=c.view.scale,g=b.x/e-d.x,f=b.y/e-d.y;mxEvent.isAltDown(a)&&(f=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,g,f,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var m=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(h=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(m=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(h=b[0].getAttribute("href")));var l=!0,t=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(h,g,f,!0,m,null,l))});m&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
-a;t()},mxEvent.isControlDown(a)):t()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,
+typeof mxRuler){A=document.createElement("div");A.style.position="absolute";A.style.top="95px";A.style.left="250px";A.style.width="2000px";A.style.height="30px";A.style.background="whiteSmoke";document.body.appendChild(A);var z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var D=document.createElement("div");D.style.position="absolute";D.style.top=
+"95px";D.style.left="220px";D.style.width="30px";D.style.height="30px";D.style.background="whiteSmoke";document.body.appendChild(D);this.vRuler=new mxRuler(this.editor.graph,z,!0);this.hRuler=new mxRuler(this.editor.graph,A,!1)}if("1"==urlParams.test){A=document.getElementById("geFooter");null!=A&&(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)})),A.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 y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),
+B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=c.view.translate,e=c.view.scale,g=b.x/e-d.x,f=b.y/e-d.y;mxEvent.isAltDown(a)&&(f=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,g,f,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var t=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(t=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(k=b[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,g,f,!0,t,null,l))});t&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
+a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,
g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.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(this.editor.graph.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.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||
-8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var f=e.lastIndexOf("%3E");0<=f&&f<e.length-3&&(e=e.substring(0,f+3))}catch(y){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(g=!0,e=k)}catch(y){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,
-c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,g.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(y){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var f=e.lastIndexOf("%3E");0<=f&&f<e.length-3&&(e=e.substring(0,f+3))}catch(A){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(g=!0,e=h)}catch(A){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,
+c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,g.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(A){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=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 c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=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!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?
@@ -7316,7 +7321,7 @@ function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.
EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=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=b+"px";g.style.left=c+"px";g.style.width=
Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-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 b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};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){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var g=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,
mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?g(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,
function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
@@ -7324,39 +7329,39 @@ a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&
null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};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=[],c;for(c in a)b.push(c);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),g=0;g<e;g++)this.addBasenamesForCell(d.model.getChildAt(a,g),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.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};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,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,
-page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){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(g){function h(a){if(null!=
-a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(J){}return a}if(g.source==(window.opener||window.parent)){var k=g.data;if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(E){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=
-k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var m=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&f.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);
-this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==k.action){m=null;m="data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):h(k.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(E){f.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:k}),"*")}return}if("template"==
-k.action){this.spinner.stop();var m=1==k.enableRecent,l=1==k.enableSearch,m=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?f.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,m?mxUtils.bind(this,function(a){this.recentReadyCallback=a;f.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;f.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){f.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,
+function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,
+scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){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(g){function h(a){if(null!=
+a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(K){}return a}if(g.source==(window.opener||window.parent)){var k=g.data;if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(E){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=
+k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&f.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);
+this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==k.action){l=null;l="data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):h(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(E){f.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:k}),"*")}return}if("template"==
+k.action){this.spinner.stop();var l=1==k.enableRecent,m=1==k.enableSearch,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?f.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;f.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;f.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){f.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,
k.errorMsg);else{if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var n=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==
-k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var q=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,u=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=encodeURIComponent(q);f.postMessage(JSON.stringify(b),"*")}),v=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var p=this.createTemporaryGraph(p.getStylesheet()),x=p.getGlobalVariable,A=this.pages[0];p.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(p.container);
-p.model.setRoot(A.root)}this.exportToCanvas(mxUtils.bind(this,function(a){v(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){v(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=
-k.xml&&0<k.xml.length&&this.setFileData(k.xml);n=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=k.format;else if("html"==k.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;
-m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(k.embedImages||null==k.embedImages){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),"xmlsvg"==k.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);f.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));f.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}f.postMessage(JSON.stringify(n),"*")}return}if("load"==k.action)d=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.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.xml&&"data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):k.xml;else{f.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}}k=h(k);c=!0;try{a(k,g)}catch(E){this.handleError(E)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var L=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=L();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=L();if(d!=e&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
+k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var p=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,u=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=encodeURIComponent(p);f.postMessage(JSON.stringify(b),"*")}),v=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,C=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);
+q.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){v(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){v(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=
+k.xml&&0<k.xml.length&&this.setFileData(k.xml);n=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=k.format;else if("html"==k.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
+l==mxConstants.NONE&&(l=null);n.xml=this.getFileData(!0);n.format="svg";if(k.embedImages||null==k.embedImages){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),"xmlsvg"==k.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);f.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));f.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}f.postMessage(JSON.stringify(n),"*")}return}if("load"==k.action)d=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.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.xml&&"data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):k.xml;else{f.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}}k=h(k);c=!0;try{a(k,g)}catch(E){this.handleError(E)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var J=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
+1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=J();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=J();if(d!=e&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||f.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var f=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):
urlParams.ready||"ready";f.postMessage(g,"*")};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":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";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.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,f="",h="auto",l="auto",n=null,z=null,G=40,D=40,w=0,B=this.editor.graph;
-B.getGraphBounds();for(var C=function(){B.setSelectionCells(U);B.scrollCellToVisible(B.getSelectionCell())},F=B.getFreeInsertPoint(),H=F.x,A=F.y,F=A,L=null,E="auto",J=[],Q=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var O=mxUtils.trim(a.substring(1,R)),N=mxUtils.trim(a.substring(R+1));"label"==O?L=B.sanitizeHtml(N):
-"style"==O?e=N:"identity"==O&&0<N.length&&"-"!=N?g=N:"namespace"==O&&0<N.length&&"-"!=N?f=N:"width"==O?h=N:"height"==O?l=N:"left"==O&&0<N.length?n=N:"top"==O&&0<N.length?z=N:"ignore"==O?V=N.split(","):"connect"==O?J.push(JSON.parse(N)):"link"==O?Q=N:"padding"==O?w=parseFloat(N):"edgespacing"==O?G=parseFloat(N):"nodespacing"==O?D=parseFloat(N):"layout"==O&&(E=N)}}}var K=this.editor.csvToArray(b[T]);a=null;if(null!=g)for(var P=0;P<K.length;P++)if(g==K[P]){a=P;break}null==L&&(L="%"+K[0]+"%");if(null!=
-J)for(var S=0;S<J.length;S++)null==d[J[S].to]&&(d[J[S].to]={});B.model.beginUpdate();try{for(P=T+1;P<b.length;P++){var Y=this.editor.csvToArray(b[P]);if(Y.length==K.length){var I=null,aa=null!=a?f+Y[a]:null;null!=aa&&(I=B.model.getCell(aa));null==I&&(I=new mxCell(L,new mxGeometry(H,F,0,0),e||"whiteSpace=wrap;html=1;"),I.vertex=!0,I.id=aa);for(var M=0;M<Y.length;M++)B.setAttributeForCell(I,K[M],Y[M]);B.setAttributeForCell(I,"placeholders","1");I.style=B.replacePlaceholders(I,I.style);for(S=0;S<J.length;S++)d[J[S].to][I.getAttribute(J[S].to)]=
-I;null!=Q&&"link"!=Q&&(B.setLinkForCell(I,I.getAttribute(Q)),B.setAttributeForCell(I,Q,null));B.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var X=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=n&&null!=I.getAttribute(n)&&(I.geometry.x=H+parseFloat(I.getAttribute(n))),null!=z&&null!=I.getAttribute(z)&&(I.geometry.y=A+parseFloat(I.getAttribute(z))),"@"==h.charAt(0)&&null!=I.getAttribute(h.substring(1))?I.geometry.width=parseFloat(I.getAttribute(h.substring(1))):I.geometry.width=
-"auto"==h?X.width+w:parseFloat(h),"@"==l.charAt(0)&&null!=I.getAttribute(l.substring(1))?I.geometry.height=parseFloat(I.getAttribute(l.substring(1))):I.geometry.height="auto"==l?X.height+w:parseFloat(l),F+=I.geometry.height+D);c.push(B.addCell(I))}}for(var Z=c.slice(),U=c.slice(),S=0;S<J.length;S++)for(var W=J[S],P=0;P<c.length;P++){var I=c[P],ha=I.getAttribute(W.from);if(null!=ha){B.setAttributeForCell(I,W.from,null);for(var ia=ha.split(","),M=0;M<ia.length;M++){var ba=d[W.to][ia[M]];null!=ba&&(L=
-W.label,null!=W.fromlabel&&(L=(I.getAttribute(W.fromlabel)||"")+(L||"")),null!=W.tolabel&&(L=(L||"")+(ba.getAttribute(W.tolabel)||"")),U.push(B.insertEdge(null,null,L||"",W.invert?ba:I,W.invert?I:ba,W.style||B.createCurrentEdgeStyle())),mxUtils.remove(W.invert?I:ba,Z))}}}if(null!=V)for(P=0;P<c.length;P++)for(I=c[P],M=0;M<V.length;M++)B.setAttributeForCell(I,mxUtils.trim(V[M]),null);var da=new mxParallelEdgeLayout(B);da.spacing=G;var ja=function(){da.execute(B.getDefaultParent());for(var a=0;a<c.length;a++){var b=
-B.getCellGeometry(c[a]);b.x=Math.round(B.snap(b.x));b.y=Math.round(B.snap(b.y));"auto"==h&&(b.width=Math.round(B.snap(b.width)));"auto"==l&&(b.height=Math.round(B.snap(b.height)))}};if("circle"==E){var ea=new mxCircleLayout(B);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(B.getDefaultParent());ja()},!0,C);C=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&U.length==
-2*c.length-1&&1==Z.length){B.view.validate();var fa=new mxCompactTreeLayout(B,"horizontaltree"==E);fa.levelDistance=D;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(B.getDefaultParent(),0<Z.length?Z[0]:null)},!0,C);C=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==Z.length){B.view.validate();var ga=new mxHierarchicalLayout(B,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=D;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(B.getDefaultParent(),
-U);B.moveCells(U,H,A)},!0,C);C=null}else if("organic"==E||"auto"==E&&U.length>c.length){B.view.validate();var ca=new mxFastOrganicLayout(B);ca.forceConstant=3*D;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(B);da.spacing=G;this.executeLayout(function(){ca.execute(B.getDefaultParent());ja()},!0,C);C=null}this.hideDialog()}finally{B.model.endUpdate()}null!=C&&C()}}catch(ma){this.handleError(ma)}};
+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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,f="",h="auto",l="auto",m=null,x=null,G=40,F=40,z=0,D=this.editor.graph;
+D.getGraphBounds();for(var y=function(){D.setSelectionCells(U);D.scrollCellToVisible(D.getSelectionCell())},B=D.getFreeInsertPoint(),H=B.x,C=B.y,B=C,J=null,E="auto",K=[],Q=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var O=mxUtils.trim(a.substring(1,R)),N=mxUtils.trim(a.substring(R+1));"label"==O?J=D.sanitizeHtml(N):
+"style"==O?e=N:"identity"==O&&0<N.length&&"-"!=N?g=N:"namespace"==O&&0<N.length&&"-"!=N?f=N:"width"==O?h=N:"height"==O?l=N:"left"==O&&0<N.length?m=N:"top"==O&&0<N.length?x=N:"ignore"==O?V=N.split(","):"connect"==O?K.push(JSON.parse(N)):"link"==O?Q=N:"padding"==O?z=parseFloat(N):"edgespacing"==O?G=parseFloat(N):"nodespacing"==O?F=parseFloat(N):"layout"==O&&(E=N)}}}var L=this.editor.csvToArray(b[T]);a=null;if(null!=g)for(var P=0;P<L.length;P++)if(g==L[P]){a=P;break}null==J&&(J="%"+L[0]+"%");if(null!=
+K)for(var S=0;S<K.length;S++)null==d[K[S].to]&&(d[K[S].to]={});D.model.beginUpdate();try{for(P=T+1;P<b.length;P++){var Y=this.editor.csvToArray(b[P]);if(Y.length==L.length){var I=null,aa=null!=a?f+Y[a]:null;null!=aa&&(I=D.model.getCell(aa));null==I&&(I=new mxCell(J,new mxGeometry(H,B,0,0),e||"whiteSpace=wrap;html=1;"),I.vertex=!0,I.id=aa);for(var M=0;M<Y.length;M++)D.setAttributeForCell(I,L[M],Y[M]);D.setAttributeForCell(I,"placeholders","1");I.style=D.replacePlaceholders(I,I.style);for(S=0;S<K.length;S++)d[K[S].to][I.getAttribute(K[S].to)]=
+I;null!=Q&&"link"!=Q&&(D.setLinkForCell(I,I.getAttribute(Q)),D.setAttributeForCell(I,Q,null));D.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var X=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=m&&null!=I.getAttribute(m)&&(I.geometry.x=H+parseFloat(I.getAttribute(m))),null!=x&&null!=I.getAttribute(x)&&(I.geometry.y=C+parseFloat(I.getAttribute(x))),"@"==h.charAt(0)&&null!=I.getAttribute(h.substring(1))?I.geometry.width=parseFloat(I.getAttribute(h.substring(1))):I.geometry.width=
+"auto"==h?X.width+z:parseFloat(h),"@"==l.charAt(0)&&null!=I.getAttribute(l.substring(1))?I.geometry.height=parseFloat(I.getAttribute(l.substring(1))):I.geometry.height="auto"==l?X.height+z:parseFloat(l),B+=I.geometry.height+F);c.push(D.addCell(I))}}for(var Z=c.slice(),U=c.slice(),S=0;S<K.length;S++)for(var W=K[S],P=0;P<c.length;P++){var I=c[P],ha=I.getAttribute(W.from);if(null!=ha){D.setAttributeForCell(I,W.from,null);for(var ia=ha.split(","),M=0;M<ia.length;M++){var ba=d[W.to][ia[M]];null!=ba&&(J=
+W.label,null!=W.fromlabel&&(J=(I.getAttribute(W.fromlabel)||"")+(J||"")),null!=W.tolabel&&(J=(J||"")+(ba.getAttribute(W.tolabel)||"")),U.push(D.insertEdge(null,null,J||"",W.invert?ba:I,W.invert?I:ba,W.style||D.createCurrentEdgeStyle())),mxUtils.remove(W.invert?I:ba,Z))}}}if(null!=V)for(P=0;P<c.length;P++)for(I=c[P],M=0;M<V.length;M++)D.setAttributeForCell(I,mxUtils.trim(V[M]),null);var da=new mxParallelEdgeLayout(D);da.spacing=G;var ja=function(){da.execute(D.getDefaultParent());for(var a=0;a<c.length;a++){var b=
+D.getCellGeometry(c[a]);b.x=Math.round(D.snap(b.x));b.y=Math.round(D.snap(b.y));"auto"==h&&(b.width=Math.round(D.snap(b.width)));"auto"==l&&(b.height=Math.round(D.snap(b.height)))}};if("circle"==E){var ea=new mxCircleLayout(D);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(D.getDefaultParent());ja()},!0,y);y=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&U.length==
+2*c.length-1&&1==Z.length){D.view.validate();var fa=new mxCompactTreeLayout(D,"horizontaltree"==E);fa.levelDistance=F;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(D.getDefaultParent(),0<Z.length?Z[0]:null)},!0,y);y=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==Z.length){D.view.validate();var ga=new mxHierarchicalLayout(D,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=F;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(D.getDefaultParent(),
+U);D.moveCells(U,H,C)},!0,y);y=null}else if("organic"==E||"auto"==E&&U.length>c.length){D.view.validate();var ca=new mxFastOrganicLayout(D);ca.forceConstant=3*F;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(D);da.spacing=G;this.executeLayout(function(){ca.execute(D.getDefaultParent());ja()},!0,y);y=null}this.hideDialog()}finally{D.model.endUpdate()}null!=y&&y()}}catch(ma){this.handleError(ma)}};
EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],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(" "),
d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var h=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=h.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
@@ -7370,7 +7375,7 @@ this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.is
"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b="";break;case d.IDLE:b=
'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
+EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());
a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);l.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==
@@ -7390,13 +7395,13 @@ Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as=
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,b,d,c,e){};
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,b,d,c){};mxAsyncCanvas.prototype.roundrect=function(a,b,d,c,e,f){};mxAsyncCanvas.prototype.ellipse=function(a,b,d,c){};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,b,d,c,e,f,h,n){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];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[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,b,d,c,e,f,h,n,l,g,k,m){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==l&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(e,{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;
+mxAsyncCanvas.prototype.image=function(a,b,d,c,e,f,h,m){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];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[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,b,d,c,e,f,h,m,l,g,k,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==l&&"function"===typeof html2canvas)){this.incWaitCounter();var u=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[u]=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,d,c,e){return d+d+c+c+e+e});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,b){this.state.dx+=a;this.state.dy+=b;this.ctx.translate(a,b)};
mxJsCanvas.prototype.rotate=function(a,b,d,c,e){c-=this.state.dx;e-=this.state.dy;this.ctx.translate(c,e);(b||d)&&this.ctx.scale(b?-1:1,d?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-c,-e)};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,b,d,c,e,f,h,n,l){d=this.ctx.createLinearGradient(0,c,0,c+f);c=this.state;c.fillColor=a;c.fillAlpha=null!=n?n:1;c.gradientColor=b;c.gradientAlpha=null!=l?l:1;c.gradientDirection=h;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
+mxJsCanvas.prototype.setGradient=function(a,b,d,c,e,f,h,m,l){d=this.ctx.createLinearGradient(0,c,0,c+f);c=this.state;c.fillColor=a;c.fillAlpha=null!=m?m:1;c.gradientColor=b;c.gradientAlpha=null!=l?l:1;c.gradientDirection=h;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
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 b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(b){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],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};
@@ -7406,13 +7411,13 @@ mxJsCanvas.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.st
mxJsCanvas.prototype.arcTo=function(a,b,d,c,e,f,h){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,d,c,e,f,h);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,d,c,e,f){this.ctx.bezierCurveTo(a,b,d,c,e,f);this.lastMoveX=e;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,b,d,c){this.begin();this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+c);this.lineTo(a,b+c);this.close()};
mxJsCanvas.prototype.roundrect=function(a,b,d,c,e,f){this.begin();this.moveTo(a+e,b);this.lineTo(a+d-e,b);this.quadTo(a+d,b,a+d,b+f);this.lineTo(a+d,b+c-f);this.quadTo(a+d,b+c,a+d-e,b+c);this.lineTo(a+e,b+c);this.quadTo(a,b+c,a,b+c-f);this.lineTo(a,b+f);this.quadTo(a,b,a+e,b)};mxJsCanvas.prototype.ellipse=function(a,b,d,c){this.ctx.save();this.ctx.translate(a+d/2,b+c/2);this.ctx.scale(d/2,c/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,b,d,c,e,f,h,n){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var l=this.ctx;l.save();if(f){f=e.width;var g=e.height,k=Math.min(d/f,c/g);a+=(d-f*k)/2;b+=(c-g*k)/2;d=f*k;c=g*k}h&&(l.translate(2*a+d,0),l.scale(-1,1));n&&(l.translate(0,2*b+c),l.scale(1,-1));l.drawImage(e,a,b,d,c);l.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,b,d,c,e,f,h,m){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var l=this.ctx;l.save();if(f){f=e.width;var g=e.height,k=Math.min(d/f,c/g);a+=(d-f*k)/2;b+=(c-g*k)/2;d=f*k;c=g*k}h&&(l.translate(2*a+d,0),l.scale(-1,1));m&&(l.translate(0,2*b+c),l.scale(1,-1));l.drawImage(e,a,b,d,c);l.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,b=this.ctx.shadowOffsetX,d=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=b;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,b,d,c,e,f,h,n,l,g,k,m){if(null!=e&&0!=e.length){d=this.state.scale;0!=m&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(m*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==l){e=this.subCanvas[this.canvasIndex++];l=e.height;m=e.width;switch(h){case mxConstants.ALIGN_MIDDLE:b-=l/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=l/d}switch(f){case mxConstants.ALIGN_CENTER:a-=m/2/d;break;case mxConstants.ALIGN_RIGHT:a-=m/d}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,b,d,c,e,f,h,m,l,g,k,n){if(null!=e&&0!=e.length){d=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==l){e=this.subCanvas[this.canvasIndex++];l=e.height;n=e.width;switch(h){case mxConstants.ALIGN_MIDDLE:b-=l/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=l/d}switch(f){case mxConstants.ALIGN_CENTER:a-=n/2/d;break;case mxConstants.ALIGN_RIGHT:a-=n/d}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(b)-.5,Math.round(e.width/d),Math.round(e.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/d),Math.round(e.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(e,
-Math.round(a*d),Math.round(b*d))}else{this.ctx.save();this.updateFont();m=document.createElement("div");m.innerHTML=e;m.style.position="absolute";m.style.top="-9999px";m.style.left="-9999px";m.style.fontFamily=this.state.fontFamily;m.style.fontWeight="bold";m.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(m);l=[m.offsetWidth,m.offsetHeight];document.body.removeChild(m);e=e.split("\n");m=l[1];this.ctx.textBaseline="top";l=b;switch(h){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";b-=(e.length-1)*m/2;l=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=m*(e.length-1),l=b-this.state.fontSize}h=[];m=[];for(d=0;d<e.length;d++)m[d]=a,h[d]=this.ctx.measureText(e[d]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(m[d]-=h[d],f==mxConstants.ALIGN_CENTER&&(m[d]+=h[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=m[0];f=h[0];for(d=1;d<e.length;d++)a=Math.min(a,m[d]),f=Math.max(f,h[d]);this.ctx.save();
-a=Math.round(a)-.5;l=Math.round(l)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,l,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,l,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(d=0;d<e.length;d++)this.ctx.fillText(e[d],m[d],b),b+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(a*d),Math.round(b*d))}else{this.ctx.save();this.updateFont();n=document.createElement("div");n.innerHTML=e;n.style.position="absolute";n.style.top="-9999px";n.style.left="-9999px";n.style.fontFamily=this.state.fontFamily;n.style.fontWeight="bold";n.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(n);l=[n.offsetWidth,n.offsetHeight];document.body.removeChild(n);e=e.split("\n");n=l[1];this.ctx.textBaseline="top";l=b;switch(h){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";b-=(e.length-1)*n/2;l=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=n*(e.length-1),l=b-this.state.fontSize}h=[];n=[];for(d=0;d<e.length;d++)n[d]=a,h[d]=this.ctx.measureText(e[d]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(n[d]-=h[d],f==mxConstants.ALIGN_CENTER&&(n[d]+=h[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];f=h[0];for(d=1;d<e.length;d++)a=Math.min(a,n[d]),f=Math.max(f,h[d]);this.ctx.save();
+a=Math.round(a)-.5;l=Math.round(l)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,l,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,l,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(d=0;d<e.length;d++)this.ctx.fillText(e[d],n[d],b),b+=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,b){mxEventSource.call(this);this.ui=a;this.cookieName=b;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);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(){var a=null;isLocalStorage&&(a=localStorage.getItem("."+this.cookieName));if(null==a&&"undefined"!=typeof Storage){var b=document.cookie,d=this.cookieName+"=",c=b.indexOf(d);0<=c&&(c+=d.length,a=b.indexOf(";",c),0>a?a=b.length:postCookie=b.substring(a),a=b.substring(c,a),a=0<a.length?a:null,null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie=d+"; expires="+b.toUTCString(),localStorage.setItem("."+this.cookieName,a)))}return a};
@@ -7531,8 +7536,8 @@ DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.
DriveFile.prototype.saveFile=function(a,b,d,c,e){if(!this.isEditable())null!=d&&d();else if(!this.savingFile){this.savingFile=!0;var f=this.isModified,h=this.isModified();this.setModified(!1);this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;0!=a?(b&&(this.lastAutosaveRevision=(new Date).getTime()),this.desc=a,this.contentChanged(),null!=d&&d(a)):(this.setModified(h||this.isModified()),null!=c&&c())}),mxUtils.bind(this,function(a){this.savingFile=!1;
this.isModified=f;this.setModified(h||this.isModified());null!=c&&c(a)}),e,e)}};DriveFile.prototype.saveAs=function(a,b,d){this.ui.drive.copyFile(this.getId(),a,b,d)};DriveFile.prototype.rename=function(a,b,d){this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.desc=c,this.descriptorChanged(),null!=b&&b(c)):(this.desc=c,this.save(!0,b,d))}),d)};
DriveFile.prototype.move=function(a,b,d){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=b&&b(a)}),d)};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(){var a=DrawioFile.prototype.isEditable.apply(this,arguments);return null!=this.realtime?a&&!this.realtime.rtModel.isReadOnly:a&&this.desc.editable};DriveFile.prototype.open=function(){null!=this.realtime?this.realtime.start():DrawioFile.prototype.open.apply(this,arguments)};DriveFile.prototype.close=function(a){a=null!=a?a:!1;DrawioFile.prototype.close.apply(this,arguments);null!=this.realtime&&(this.realtime.destroy(a),this.realtime=null)};DriveLibrary=function(a,b,d){DriveFile.call(this,a,b);this.desc=d};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,b,d){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=b&&b(a)}),d)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.ui.editor.chromeless&&"1"!=urlParams.rt?(this.appId="850530949725",this.clientId="850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","openid"],this.mimeType="all_types_supported"):this.ui.isDriveDomain()?(this.appId="671128082532",this.clientId="671128082532.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.realtime"):(this.appId="420247213240",this.clientId="420247213240-hnbju1pt13seqrc1hhd5htpotk4g9q7u.apps.googleusercontent.com",
-this.mimeType="application/vnd.jgraph.mxfile.rtlegacy");this.mimeTypes="application/mxe,application/vnd.jgraph.mxfile,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy"};mxUtils.extend(DriveClient,mxEventSource);
+DriveFile.prototype.isEditable=function(){var a=DrawioFile.prototype.isEditable.apply(this,arguments);return null!=this.realtime?a&&!this.realtime.rtModel.isReadOnly:a&&this.desc.editable};DriveFile.prototype.open=function(){null!=this.realtime?this.realtime.start():DrawioFile.prototype.open.apply(this,arguments)};DriveFile.prototype.close=function(a){a=null!=a?a:!1;DrawioFile.prototype.close.apply(this,arguments);null!=this.realtime&&(this.realtime.destroy(a),this.realtime=null)};DriveLibrary=function(a,b,d){DriveFile.call(this,a,b);this.desc=d};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,b,d){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=b&&b(a)}),d)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.ui.editor.isChromelessView()&&"1"!=urlParams.rt?(this.appId="850530949725",this.clientId="850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","openid"],this.mimeType="all_types_supported"):this.ui.isDriveDomain()?(this.appId="671128082532",this.clientId="671128082532.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.realtime"):(this.appId="420247213240",this.clientId=
+"420247213240-hnbju1pt13seqrc1hhd5htpotk4g9q7u.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.rtlegacy");this.mimeTypes="application/mxe,application/vnd.jgraph.mxfile,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy"};mxUtils.extend(DriveClient,mxEventSource);
DriveClient.prototype.scopes="1"==urlParams.photos?["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/photos","https://www.googleapis.com/auth/photos.upload","https://www.googleapis.com/auth/userinfo.profile"]:["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];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,
@@ -7542,8 +7547,8 @@ DriveClient.prototype.setUserId=function(a,b){if(b)if(isLocalStorage)localStorag
DriveClient.prototype.getUserId=function(){var a=null;null!=this.user&&(a=this.user.id);null==a&&isLocalStorage&&(a=localStorage.getItem(".guid"));if(null==a&&"undefined"!=typeof Storage){for(var b=document.cookie.split(";"),d=0;d<b.length;d++){var c=mxUtils.trim(b[d]);if("GUID="==c.substring(0,5)){a=c.substring(5);break}}null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie="GUID=; expires="+b.toUTCString(),localStorage.setItem(".guid",a))}return a};
DriveClient.prototype.execute=function(a){var b=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,d){this.authorize(!1,mxUtils.bind(this,function(){null!=d&&d();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.ui.drive.clearUserId();this.ui.drive.setUser(null);gapi.auth.signOut();this.ui.showError(mxResources.get("error"),
b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,b)};
-DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var h=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:h})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(n){window.clearTimeout(e);c&&(null!=n&&null==n.error?null!=b&&b(n):null!=d&&null!=n&&null!=n.error&&
-403==n.error.code&&("The requested mime type change is forbidden."==n.error.message||null!=n.error.data&&"domainPolicy"==n.error.data[0].reason)?d(n):null==n||null==n.error||401!=n.error.code&&403!=n.error.code?null!=n&&null!=n.error&&404!=n.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(h,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(n):403==n.error.code&&null!=this.user?null!=d&&d(n):this.execute(h))}))});null==gapi.auth.getToken()?
+DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var h=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:h})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(m){window.clearTimeout(e);c&&(null!=m&&null==m.error?null!=b&&b(m):null!=d&&null!=m&&null!=m.error&&
+403==m.error.code&&("The requested mime type change is forbidden."==m.error.message||null!=m.error.data&&"domainPolicy"==m.error.data[0].reason)?d(m):null==m||null==m.error||401!=m.error.code&&403!=m.error.code?null!=m&&null!=m.error&&404!=m.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(h,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(m):403==m.error.code&&null!=this.user?null!=d&&d(m):this.execute(h))}))});null==gapi.auth.getToken()?
this.execute(h):h()};DriveClient.prototype.authorize=function(a,b,d,c){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=d&&d();else{var f={scope:this.scopes,client_id:this.clientId};a&&null!=e?(f.immediate=!0,f.user_id=e):(f.immediate=!1,f.authuser=-1);gapi.auth.authorize(f,mxUtils.bind(this,function(f){null!=f&&null==f.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,d,c):null!=d&&d(f);this.resetTokenRefresh(f)}))}};
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()};
@@ -7557,20 +7562,20 @@ DriveClient.prototype.loadRealtime=function(a,b,d){if("1"==urlParams.ignoremime|
function(a){window.clearTimeout(f);e&&b(a)}))});c()}else b();else this.redirectToNewApp(d,a.id)};
DriveClient.prototype.getXmlFile=function(a,b,d,c,e,f){var h=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+h,mxUtils.bind(this,function(h){if(null==h)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||f)a.mimeType!=this.libraryMimeType||f?d(new DriveLibrary(this.ui,h,a)):c({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var l=h.lastIndexOf(",");0<l&&(l=this.ui.extractGraphModelFromPng(h.substring(l+
1)),null!=l&&0<l.length&&(h=l))}var g=new DriveFile(this.ui,h,a,b);!e&&"850530949725"!=this.appId&&g.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(g,!0,mxUtils.bind(this,function(a){g.desc=a;d(g)}),c,!0):d(g)}}),c,"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
-DriveClient.prototype.saveFile=function(a,b,d,c,e,f){if(a.isEditable()){var h=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;f=null!=f?f:!1;var n=mxUtils.bind(this,function(e,k,l){var g={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||f||(e=this.placeholderThumbnail,k=this.placeholderMimeType),null!=e&&null!=k&&(g.thumbnail={image:e,mimeType:k}));var m=function(){a.saveDelay=(new Date).getTime()-h;
+DriveClient.prototype.saveFile=function(a,b,d,c,e,f){if(a.isEditable()){var h=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;f=null!=f?f:!1;var m=mxUtils.bind(this,function(e,k,l){var g={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||f||(e=this.placeholderThumbnail,k=this.placeholderMimeType),null!=e&&null!=k&&(g.thumbnail={image:e,mimeType:k}));var m=function(){a.saveDelay=(new Date).getTime()-h;
d.apply(this,arguments)},n=mxUtils.bind(this,function(d,e){this.executeRequest(this.createUploadRequest(a.getId(),g,d,b||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,e),m,c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(a,!0)}),c,this.ui.getCurrentFile()!=a?a.getData():null):n(a.getData(),!1)}),l=mxUtils.bind(this,function(){!f&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&(null==
-a.realtime||a.realtime.connected)&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(m){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");n(b,"image/png")}))||n(null,null,a.constructor!=DriveLibrary&&(null==a.realtime||a.realtime.connected))});e||!b?l():this.verifyMimeType(a.getId(),l,!0)}else this.ui.editor.graph.reset(),null!=c&&c({message:mxResources.get("readOnly")})};
+a.realtime||a.realtime.connected)&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(n){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");m(b,"image/png")}))||m(null,null,a.constructor!=DriveLibrary&&(null==a.realtime||a.realtime.connected))});e||!b?l():this.verifyMimeType(a.getId(),l,!0)}else this.ui.editor.graph.reset(),null!=c&&c({message:mxResources.get("readOnly")})};
DriveClient.prototype.verifyMimeType=function(a,b,d,c){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(d||e-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=e,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(d){this.checkingMimeType=!1;null!=d&&"application/vnd.jgraph.mxfile.realtime"==d.mimeType?this.redirectToNewApp(c,a):null!=
b&&b()})))};
DriveClient.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash".split(" "))+"#G"+b;null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}))}};
-DriveClient.prototype.insertFile=function(a,b,d,c,e,f,h,n){f=null!=f?f:this.mimeType;n=null!=n?n:!0;a={mimeType:f,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,h),mxUtils.bind(this,function(a){f==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):n?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision=
+DriveClient.prototype.insertFile=function(a,b,d,c,e,f,h,m){f=null!=f?f:this.mimeType;m=null!=m?m:!0;a={mimeType:f,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,h),mxUtils.bind(this,function(a){f==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):m?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision=
(new Date).getTime(),c(d)):null!=e&&e({message:mxResources.get("loggedOut")})}),e):c(a)}),e)};
DriveClient.prototype.createUploadRequest=function(a,b,d,c,e){e=null!=e?e:!1;a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:{"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'},body:"\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?e?d:Base64.encode(d):"")+"\r\n---------314159265358979323846--"};c||(a.params.newRevision=!1);a.params.supportsTeamDrives=!0;return gapi.client.request(a)};
DriveClient.prototype.pickFile=function(a,b){this.filePickerCallback=null!=a?a: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)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,c=b?"genericPicker":"filePicker",e=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==
-mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),h=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),f.setMimeTypes("*/*"),h.setMimeTypes("*/*")):
-(a.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),h.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
+mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),h=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),m=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),f.setMimeTypes("*/*"),h.setMimeTypes("*/*")):
+(a.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),h.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(m).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
"click",e);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",e);this[c].setVisible(!0)}))};
DriveClient.prototype.pickFolder=function(a){this.folderPickerCallback=a;this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&mxUtils.bind(this,function(){this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",d),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=
a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),e=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=
@@ -7581,20 +7586,20 @@ DriveClient.prototype.pickLibrary=function(a){this.filePickerCallback=a;this.fil
e=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),f=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(d).addView(c).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f).setCallback(mxUtils.bind(this,
function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}))};DriveClient.prototype.showPermissions=function(a){this.checkToken(mxUtils.bind(this,function(){var b=new gapi.drive.share.ShareClient(this.appId);b.setOAuthToken(gapi.auth.getToken().access_token);b.setItemIds([a]);b.showSettingsDialog()}))};DropboxFile=function(a,b,d){DrawioFile.call(this,a,b);this.stat=d};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.stat.path_display.substring(1))};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.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};DropboxFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};DropboxFile.prototype.doSave=function(a,b,d){var c=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,arguments);this.stat.name=c;this.saveFile(a,!1,b,d)};
-DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,h=this.isModified(),n=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return h}});n();var l=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(h||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){n();b()}}c(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):l(this.getData())}else null!=
+DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,h=this.isModified(),m=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return h}});m();var l=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(h||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){m();b()}}c(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):l(this.getData())}else null!=
c&&c()}),this.getTitle()==a?b(!0):this.ui.dropbox.checkExists(a,b)):null!=d&&d()};DropboxFile.prototype.rename=function(a,b,d){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=b&&b()):(this.stat=c,this.descriptorChanged(),this.save(!0,b,d))}),d)};DropboxLibrary=function(a,b,d){DropboxFile.call(this,a,b,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".html";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
DropboxClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(null==f||401!==f.status||d?b({message:mxResources.get("accessDenied")}):(this.setUser(null),
this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)))}))};
-DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(h,n){if(c){window.onDropboxCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.client.setAccessToken(h),
-this.setUser(null),e&&this.setPersistentToken(h),a())}catch(l){b(l)}finally{null!=n&&n.close()}}else null!=n&&n.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onDropboxCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,n=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(n);h&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);h&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(h,m){if(c){window.onDropboxCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.client.setAccessToken(h),
+this.setUser(null),e&&this.setPersistentToken(h),a())}catch(l){b(l)}finally{null!=m&&m.close()}}else null!=m&&m.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onDropboxCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
+DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,m=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(m);h&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);h&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},d):e(!1)};DropboxClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)};
DropboxClient.prototype.getFile=function(a,b,d,c){c=null!=c?c:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var f=mxUtils.bind(this,function(){var c=a.split("/");this.ui.convertFile(a,0<c.length?c[c.length-1]:a,null,this.extension,b,d)});null!=this.token?f():this.authenticate(f,d)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(d,f){var h=e?d.lastIndexOf(","):
-1,g=null;0<h&&(h=this.ui.extractGraphModelFromPng(d.substring(h+1)),null!=h&&0<h.length?d=h:g=new LocalFile(this,d,a,!0));b(null!=g?g:c?new DropboxLibrary(this.ui,d,f):new DropboxFile(this.ui,d,f))}),d,e)};
-DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(h){var n=!0,l=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(a){}));g["catch"](function(a){window.clearTimeout(l);n&&null!=a&&409==a.status&&(n=!1,d({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(a);g.then(mxUtils.bind(this,
-function(a){window.clearTimeout(l);if(n){n=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(q){d(q)}}}));g["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);n&&(n=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),h?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
+DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(h){var m=!0,l=window.setTimeout(mxUtils.bind(this,function(){m=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(a){}));g["catch"](function(a){window.clearTimeout(l);m&&null!=a&&409==a.status&&(m=!1,d({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(a);g.then(mxUtils.bind(this,
+function(a){window.clearTimeout(l);if(m){m=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(u){d(u)}}}));g["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);m&&(m=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),h?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
d)})}):this.authenticate(function(){e(!0)},d)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},d,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},d):f(!1)};
DropboxClient.prototype.checkExists=function(a,b,d){var c=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(c,mxUtils.bind(this,function(c){d?b(!1,!0,c):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b(!0,!0,c)},function(){b(!1,!0,c)})}),function(a){b(!0,!1)})};
DropboxClient.prototype.renameFile=function(a,b,d,c){if(/[\\\/:\?\*"\|]/.test(b))c({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=b){var e=a.stat.path_display.substring(1),f=e.lastIndexOf("/");0<f&&(b=e.substring(0,f+1)+b)}null!=a&&null!=b&&a.stat.path_lower.substring(1)!==b.toLowerCase()?this.checkExists(b,mxUtils.bind(this,function(e,f,l){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+b,autorename:!1});this.executePromise(e,
@@ -7602,11 +7607,11 @@ d,c)}),f&&l.path_lower.substring(1)!==b.toLowerCase()?(f=this.client.filesDelete
DropboxClient.prototype.insertFile=function(a,b,d,c,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(f){f?this.saveFile(a,b,mxUtils.bind(this,function(a){e?d(new DropboxLibrary(this.ui,b,a)):d(new DropboxFile(this.ui,b,a))}),c):c()}))};
DropboxClient.prototype.saveFile=function(a,b,d,c,e){/[\\\/:\?\*"\|]/.test(a)?c({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=b.length?c({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=e?e:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([b],{type:"text/plain"})}),this.executePromise(a,d,c))};
DropboxClient.prototype.pickLibrary=function(a){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"))){var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),c=b[0].link.indexOf(this.appPath);if(0<c){var e=decodeURIComponent(b[0].link.substring(c+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(c,h){if(null!=h&&h.id==b[0].id)try{this.ui.spinner.stop(),
-a(e.substring(1),new DropboxLibrary(this.ui,c,h))}catch(n){this.ui.handleError(n)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})};
+a(e.substring(1),new DropboxLibrary(this.ui,c,h))}catch(m){this.ui.handleError(m)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})};
DropboxClient.prototype.createLibrary=function(a,b,d){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(c){this.insertFile(a.name,c,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),b(a.getHash().substring(1),a)}catch(f){d(f)}}),d,!0)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
DropboxClient.prototype.pickFile=function(a,b){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(b)this.ui.spinner.stop(),a(d[0].link);else{var c=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),e=mxUtils.bind(this,
-function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var h=d[0].link.indexOf(this.appPath);if(0<h){var n=decodeURIComponent(d[0].link.substring(h+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(b,g){if(null!=g&&g.id==d[0].id){var h=f?b.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+
-1)),null!=h&&0<h.length?b=h:m=new LocalFile(this,b,n,!0));a(n.substring(1),null!=m?m:new DropboxFile(this.ui,b,g))}else this.createFile(d[0],e,c)}),c,f)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var h=d[0].link.indexOf(this.appPath);if(0<h){var m=decodeURIComponent(d[0].link.substring(h+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,function(b,g){if(null!=g&&g.id==d[0].id){var h=f?b.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+
+1)),null!=h&&0<h.length?b=h:l=new LocalFile(this,b,m,!0));a(m.substring(1),null!=l?l:new DropboxFile(this.ui,b,g))}else this.createFile(d[0],e,c)}),c,f)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
DropboxClient.prototype.createFile=function(a,b,d){var c=/(\.png)$/i.test(a.name);this.ui.loadUrl(a.link,mxUtils.bind(this,function(e){null!=e&&0<e.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var f=c?e.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(e.substring(f+1)),null!=f&&0<f.length&&(e=f));this.insertFile(a.name,e,mxUtils.bind(this,function(c){b(a.name,c)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
(this.ui.spinner.stop(),d({message:mxResources.get("errorLoadingFile")}))}),d,c)};OneDriveFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.meta.id)};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.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};OneDriveFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};OneDriveFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
@@ -7619,7 +7624,7 @@ a()))}),b)};
OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){var h="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",h=window.open(h,"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!=h&&(window.onOneDriveCallback=mxUtils.bind(this,function(h,l){if(c){window.onOneDriveCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.setUser(null),this.token=h,e&&this.setPersistentToken(h),a())}catch(g){b(g)}finally{null!=l&&l.close()}}else null!=l&&l.close()}),h.focus())}),
mxUtils.bind(this,function(){c&&(window.onOneDriveCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,n=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(n);h&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,m=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(m);h&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)):d(this.parseRequestText(a)))}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};OneDriveClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)};
OneDriveClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;this.executeRequest(this.baseUrl+"/me/drive/items/"+a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var c=JSON.parse(a.getText()),f=/\.png$/i.test(c.name);if(/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(c["@microsoft.graph.downloadUrl"],c.name,null!=c.file?c.file.mimeType:null,this.extension,b,d);else{var l=!0,g=window.setTimeout(mxUtils.bind(this,
function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(c["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(g);if(l){var d=f?a.lastIndexOf(","):-1,h=null;0<d&&(d=this.ui.extractGraphModelFromPng(a.substring(d+1)),null!=d&&0<d.length?a=d:h=new LocalFile(this.ui,a,c.name,!0));null!=h?b(h):e?b(new OneDriveLibrary(this.ui,a,c)):b(new OneDriveFile(this.ui,a,c))}}),mxUtils.bind(this,function(a){window.clearTimeout(g);l&&d(this.parseRequestText(a))}),
@@ -7628,9 +7633,9 @@ OneDriveClient.prototype.moveFile=function(a,b,d,c){this.writeFile(this.baseUrl+
OneDriveClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;this.checkExists(f,a,!0,mxUtils.bind(this,function(h){h?this.writeFile(this.baseUrl+(null!=f?"/me/drive/items/"+f:"/me/drive/root")+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?d(new OneDriveLibrary(this.ui,b,a)):d(new OneDriveFile(this.ui,b,a))}),c):c()}))};
OneDriveClient.prototype.checkExists=function(a,b,d,c){this.executeRequest(this.baseUrl+(null!=a?"/me/drive/items/"+a:"/me/drive/root")+"/children/"+b,mxUtils.bind(this,function(a){404==a.getStatus()?c(!0):d?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[b]),function(){c(!0)},function(){c(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)}))}),function(a){c(!1)},!0)};
OneDriveClient.prototype.saveFile=function(a,b,d){var c=mxUtils.bind(this,function(c){this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id+"/content/",c,"PUT",null,b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){c(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=a?a.getData():null):c(a.getData())};
-OneDriveClient.prototype.writeFile=function(a,b,d,c,e,f){if(null!=a&&null!=b){var h=mxUtils.bind(this,function(l){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),m=new mxXmlRequest(a,b,d);m.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});m.send(mxUtils.bind(this,function(a){window.clearTimeout(k);g&&(200<=a.getStatus()&&299>=a.getStatus()?
-e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,l?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},f)})}):this.authenticate(function(){h(!0)},f)):f(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(k);g&&f(this.parseRequestText(a))}))}),n=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){n(!0)},f,a):h(a)});null==this.token?
-this.authenticate(function(){n(!0)},f):n(!1)}else f({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(d){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+OneDriveClient.prototype.writeFile=function(a,b,d,c,e,f){if(null!=a&&null!=b){var h=mxUtils.bind(this,function(l){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),n=new mxXmlRequest(a,b,d);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(k);g&&(200<=a.getStatus()&&299>=a.getStatus()?
+e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,l?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},f)})}):this.authenticate(function(){h(!0)},f)):f(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(k);g&&f(this.parseRequestText(a))}))}),m=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){m(!0)},f,a):h(a)});null==this.token?
+this.authenticate(function(){m(!0)},f):m(!1)}else f({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(d){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(a)};
OneDriveClient.prototype.pickFolder=function(a){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){this.token=b.accessToken;a(b)}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){null!=b&&null!=b.value&&0<b.value.length&&(this.token=b.accessToken,a(b.value[0].id,b))}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+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:""):""):""))};
@@ -7641,58 +7646,58 @@ this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFi
!1;null!=c&&c()}),!1,b)}));else null!=d&&d()};GitHubLibrary=function(a,b,d){GitHubFile.call(this,a,b,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){DrawioClient.call(this,a,"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
GitHubClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(401===f.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):200>f.getStatus()||300<=f.getStatus()?b({message:mxResources.get("accessDenied")}):
(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,f.email,f.name)),a()))}))};
-GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(h,n){if(c)if(window.onGitHubCallback=null,c=!1,null==h)b({message:mxResources.get("accessDenied"),retry:d});else{var l=mxUtils.bind(this,function(){var c=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+h,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var h=g.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(u){b(u)}finally{null!=n&&
-n.close()}}))});l()}else null!=n&&n.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,n=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),l=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+l)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(h)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
-function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var g=!1;try{var k=JSON.parse(a.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code)}catch(m){}d({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this,
+GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(h,m){if(c)if(window.onGitHubCallback=null,c=!1,null==h)b({message:mxResources.get("accessDenied"),retry:d});else{var l=mxUtils.bind(this,function(){var c=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+h,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var h=g.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(p){b(p)}finally{null!=m&&
+m.close()}}))});l()}else null!=m&&m.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
+GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,m=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),l=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+l)};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(h)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var g=!1;try{var k=JSON.parse(a.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code)}catch(n){}d({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this,
function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};GitHubClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)};
-GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var f=a.split("/"),h=f[0],n=f[1],l=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);!e&&(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&f)?null!=this.token?(e=this.baseUrl+"/repos/"+h+"/"+n+"/contents/"+a+"?ref="+l+"&token="+this.token,f=a.split("/"),this.ui.convertFile(e,0<f.length?f[f.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
-"/repos/"+h+"/"+n+"/contents/"+a+"?ref="+l,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(h,n,l,JSON.parse(a.getText()),c))}catch(k){d(k)}}),d))};
+GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var f=a.split("/"),h=f[0],m=f[1],l=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);!e&&(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&f)?null!=this.token?(e=this.baseUrl+"/repos/"+h+"/"+m+"/contents/"+a+"?ref="+l+"&token="+this.token,f=a.split("/"),this.ui.convertFile(e,0<f.length?f[f.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
+"/repos/"+h+"/"+m+"/contents/"+a+"?ref="+l,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(h,m,l,JSON.parse(a.getText()),c))}catch(k){d(k)}}),d))};
GitHubClient.prototype.createGitHubFile=function(a,b,d,c,e){a={org:a,repo:b,ref:d,name:c.name,path:c.path,sha:c.sha,html_url:c.html_url,download_url:c.download_url};b=c.content;"base64"===c.encoding&&(/\.jpe?g$/i.test(c.name)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(c.name)?b="data:image/gif;base64,"+b:/\.png$/i.test(c.name)?(c=this.ui.extractGraphModelFromPng(b),b=null!=c&&0<c.length?c:"data:image/png;base64,"+b):b=Base64.decode(b));return e?new GitHubLibrary(this.ui,b,a):new GitHubFile(this.ui,
b,a)};GitHubClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e,!1)};
-GitHubClient.prototype.insertFile=function(a,b,d,c,e,f,h){e=null!=e?e:!1;f=f.split("/");var n=f[0],l=f[1],g=f[2],k=f.slice(3,f.length).join("/");0<k.length&&(k+="/");k+=a;this.checkExists(n+"/"+l+"/"+g+"/"+k,!0,mxUtils.bind(this,function(f,q){f?e?(h||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,l,g,k,a,b,q,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(n,l,g,b.content,e))}catch(x){c(x)}}),c)}),c)):d(new GitHubFile(this.ui,
-b,{org:n,repo:l,ref:g,name:a,path:k,sha:q,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
-GitHubClient.prototype.writeFile=function(a,b,d,c,e,f,h,n,l){f.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:f},null!=h&&(d.sha=h),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){n(a)}),l))};
+GitHubClient.prototype.insertFile=function(a,b,d,c,e,f,h){e=null!=e?e:!1;f=f.split("/");var m=f[0],l=f[1],g=f[2],k=f.slice(3,f.length).join("/");0<k.length&&(k+="/");k+=a;this.checkExists(m+"/"+l+"/"+g+"/"+k,!0,mxUtils.bind(this,function(f,u){f?e?(h||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,l,g,k,a,b,u,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(m,l,g,b.content,e))}catch(v){c(v)}}),c)}),c)):d(new GitHubFile(this.ui,
+b,{org:m,repo:l,ref:g,name:a,path:k,sha:u,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,b,d,c,e,f,h,m,l){f.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:f},null!=h&&(d.sha=h),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){m(a)}),l))};
GitHubClient.prototype.checkExists=function(a,b,d){this.getFile(a,mxUtils.bind(this,function(c){if(b&&null!=c.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();d(!0,c.meta.sha)},function(){e();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,f=a.meta.ref,h=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(n){var l=mxUtils.bind(this,function(g,k){this.writeFile(c,e,f,h,n,k,g,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),
+GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,f=a.meta.ref,h=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(m){var l=mxUtils.bind(this,function(g,k){this.writeFile(c,e,f,h,m,k,g,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),
mxResources.get("cancel"),mxUtils.bind(this,function(){d()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(c+"/"+e+"/"+f+"/"+h,mxUtils.bind(this,function(a){l(a.meta.sha,k)}),mxUtils.bind(this,function(){l(null,k)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):d(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(h)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){l(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):l(a.meta.sha,
Base64.encode(a.getData()))}),mxUtils.bind(this,function(){d()}))};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,b){var d=null,c=null,e=null,f=null,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.height="224px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";h.appendChild(n);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height="194px";
-h.appendChild(l);var g=new CustomDialog(this.ui,h,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+f)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),m=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(k(d+
-"/"+c,mxUtils.bind(this,function(){f=null;y()})));a||(mxUtils.write(b," / "),b.appendChild(k(decodeURIComponent(e),mxUtils.bind(this,function(){f=null;x()}))));if(null!=f&&0<f.length){var g=f.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(k(g[a],mxUtils.bind(this,function(){f=g.slice(0,a+1).join("/");u()})))})(a)}l.appendChild(b)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
-(f=e=c=d=null,y()):this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var h=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(e),null,"GET");g.okButton.removeAttribute("disabled");l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(h,mxUtils.bind(this,function(g){m();this.ui.spinner.stop();var h=JSON.parse(g.getText());l.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,y();else{var a=f.split("/");
-f=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(l);null==h||0==h.length?mxUtils.write(l,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var m=0;m<h.length;m++)mxUtils.bind(this,function(h){g==("dir"==h.type)&&(l.appendChild(k(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(f=h.path,u()):a&&"file"==h.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+h.path))}))),mxUtils.br(l))})(h[m])}),g(!0),a&&g(!1))}),q)}),p=null,v=null,x=mxUtils.bind(this,
-function(a){null==a&&(l.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,
-"scroll",v);x(a+1)});mxEvent.addListener(p,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(m(!0),l.appendChild(k("../ [Up]",mxUtils.bind(this,function(){f=null;y()}))),mxUtils.br(l));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){l.appendChild(k(a.name,mxUtils.bind(this,function(){e=a.name;f="";u()})));mxUtils.br(l)})(b[c]);100==b.length&&(l.appendChild(p),
-v=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",v))}}),q)}),y=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");
-mxUtils.write(p,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",v);y(a+1)});mxEvent.addListener(p,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==a&&(l.appendChild(k(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 b=a.split("/");if(1<b.length){a=b[0];var g=b[1];3>b.length?(d=a,c=g,f=e=null,x()):this.ui.spinner.spin(l,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";u()}),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<b.length;g++)mxUtils.bind(this,function(a){l.appendChild(k(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;f="";u()})));mxUtils.br(l)})(b[g])}100==b.length&&(l.appendChild(p),v=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",
-v))}),q)});y()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;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};
+GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,e=null,f=null,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";h.appendChild(m);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height="194px";
+h.appendChild(l);var g=new CustomDialog(this.ui,h,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+f)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(k(d+
+"/"+c,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(b," / "),b.appendChild(k(decodeURIComponent(e),mxUtils.bind(this,function(){f=null;v()}))));if(null!=f&&0<f.length){var g=f.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(k(g[a],mxUtils.bind(this,function(){f=g.slice(0,a+1).join("/");p()})))})(a)}l.appendChild(b)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
+(f=e=c=d=null,A()):this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){var h=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(e),null,"GET");g.okButton.removeAttribute("disabled");l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(h,mxUtils.bind(this,function(g){n();this.ui.spinner.stop();var h=JSON.parse(g.getText());l.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");
+f=a.slice(0,a.length-1).join("/");p()}})));mxUtils.br(l);null==h||0==h.length?mxUtils.write(l,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var t=0;t<h.length;t++)mxUtils.bind(this,function(h){g==("dir"==h.type)&&(l.appendChild(k(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(f=h.path,p()):a&&"file"==h.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+h.path))}))),mxUtils.br(l))})(h[t])}),g(!0),a&&g(!1))}),u)}),q=null,w=null,v=mxUtils.bind(this,
+function(a){null==a&&(l.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,
+"scroll",w);v(a+1)});mxEvent.addListener(q,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),l.appendChild(k("../ [Up]",mxUtils.bind(this,function(){f=null;A()}))),mxUtils.br(l));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){l.appendChild(k(a.name,mxUtils.bind(this,function(){e=a.name;f="";p()})));mxUtils.br(l)})(b[c]);100==b.length&&(l.appendChild(q),
+w=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",w))}}),u)}),A=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");
+mxUtils.write(q,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",w);A(a+1)});mxEvent.addListener(q,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==a&&(l.appendChild(k(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 b=a.split("/");if(1<b.length){a=b[0];var g=b[1];3>b.length?(d=a,c=g,f=e=null,v()):this.ui.spinner.spin(l,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";p()}),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<b.length;g++)mxUtils.bind(this,function(a){l.appendChild(k(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;f="";p()})));mxUtils.br(l)})(b[g])}100==b.length&&(l.appendChild(q),w=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",
+w))}),u)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;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.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};TrelloFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};TrelloFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});h();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=e;this.meta=f;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&
(this.saveNeededCounter--,this.saveFile(a,b,d,c))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
b,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,e)}));else null!=d&&d()};TrelloLibrary=function(a,b,d){TrelloFile.call(this,a,b,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};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,b,d){d&&this.logout();d=mxUtils.bind(this,function(c,d){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=d&&d();a()},error:function(){null!=d&&d();null!=b&&b(mxResources.get("loggedOut"))}})});this.isAuthorized()?d(!0):this.ui.showAuthDialog(this,!0,d)};TrelloClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)};
-TrelloClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;var f=mxUtils.bind(this,function(){var c=a.split(this.SEPARATOR),n=!0,l=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(l);if(n){var g=/\.png$/i.test(c.name);/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),
-c.name,c.mimeType,this.extension,b,d):(n=!0,l=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(l);if(n){c.compoundId=a;var f=g?d.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(d.substring(f+1)),null!=f&&0<f.length&&(d=f));e?b(new TrelloLibrary(this.ui,d,c)):b(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(l);
-n&&(401==b.status?this.authenticate(f,d,!0):d())}),g||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(l);n&&(401==a.status?this.authenticate(f,d,!0):d())}))});this.authenticate(f,d)};TrelloClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
+TrelloClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;var f=mxUtils.bind(this,function(){var c=a.split(this.SEPARATOR),m=!0,l=window.setTimeout(mxUtils.bind(this,function(){m=!1;d({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(l);if(m){var g=/\.png$/i.test(c.name);/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),
+c.name,c.mimeType,this.extension,b,d):(m=!0,l=window.setTimeout(mxUtils.bind(this,function(){m=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(l);if(m){c.compoundId=a;var f=g?d.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(d.substring(f+1)),null!=f&&0<f.length&&(d=f));e?b(new TrelloLibrary(this.ui,d,c)):b(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(l);
+m&&(401==b.status?this.authenticate(f,d,!0):d())}),g||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(l);m&&(401==a.status?this.authenticate(f,d,!0):d())}))});this.authenticate(f,d)};TrelloClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
TrelloClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;var h=mxUtils.bind(this,function(){var h=mxUtils.bind(this,function(h){this.writeFile(a,h,f,mxUtils.bind(this,function(a){e?d(new TrelloLibrary(this.ui,b,a)):d(new TrelloFile(this.ui,b,a))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){h(this.ui.base64ToBlob(a,"image/png"))}),c,b):h(b)});this.authenticate(h,c)};
TrelloClient.prototype.saveFile=function(a,b,d){var c=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){this.writeFile(a.meta.name,e,c[0],b,d)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(f,d,!0):d()}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),
d,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(f,d)};
-TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var h=!0,n=window.setTimeout(mxUtils.bind(this,function(){h=!1;e({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),l=new FormData;l.append("key",Trello.key());l.append("token",Trello.token());l.append("file","string"===typeof b?new Blob([b]):b,a);l.append("name",
-a);var g=new XMLHttpRequest;g.responseType="json";g.onreadystatechange=mxUtils.bind(this,function(){if(4===g.readyState&&(window.clearTimeout(n),h))if(200==g.status){var a=g.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==g.status?this.authenticate(f,e,!0):e()});g.open("POST",this.baseUrl+"cards/"+d+"/attachments");g.send(l)});this.authenticate(f,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var h=!0,m=window.setTimeout(mxUtils.bind(this,function(){h=!1;e({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),l=new FormData;l.append("key",Trello.key());l.append("token",Trello.token());l.append("file","string"===typeof b?new Blob([b]):b,a);l.append("name",
+a);var g=new XMLHttpRequest;g.responseType="json";g.onreadystatechange=mxUtils.bind(this,function(){if(4===g.readyState&&(window.clearTimeout(m),h))if(200==g.status){var a=g.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==g.status?this.authenticate(f,e,!0):e()});g.open("POST",this.baseUrl+"cards/"+d+"/attachments");g.send(l)});this.authenticate(f,e)}else e({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,b){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,b){var d=null,c="@me",e=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var h=document.createElement("h3");mxUtils.write(h,a?mxResources.get("selectFile"):mxResources.get("selectCard"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height=
-"194px";f.appendChild(n);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var l=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");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";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),k=mxUtils.bind(this,function(){e=0;n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
-mxUtils.bind(this,function(a){this.ui.spinner.stop();n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(n);null==a||0==a.length?mxUtils.write(n,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){n.appendChild(l(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,g,!0):
-null!=g&&g(b)}))});a()}),m=null,q=null,u=mxUtils.bind(this,function(f){null==f&&(e=0,n.innerHTML="",f=1);this.ui.spinner.spin(n,mxResources.get("loading"));null!=m&&null!=m.parentNode&&m.parentNode.removeChild(m);m=document.createElement("a");m.style.display="block";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",q);u(f+1)});mxEvent.addListener(m,"click",h);var p=mxUtils.bind(this,function(){Trello.get("search",
-{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==f&&(n.appendChild(l(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=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(n));for(var g=0;g<e.length;g++)mxUtils.bind(this,function(c){n.appendChild(l(c.name,mxUtils.bind(this,function(){a?(d=c.id,k()):(this.ui.hideDialog(),b(c.id))})))})(e[g]);100==e.length&&(n.appendChild(m),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&h()},mxEvent.addListener(n,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(p,g,!0):null!=g&&g({message:a.responseText})}))});p()});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()};function ChatWindow(a,b,d,c,e,f,h,n){this.editorUi=a;this.doc=n.doc;this.rtModel=n.rt;this.chatHistory=n.chatHistory;this.chatMap=n.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";n=document.createElement("div");n.style.padding="3px";d.appendChild(n);var l=document.createElement("div");l.style.paddingLeft="3px";l.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(l);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
-this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";n.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
+TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c="@me",e=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var h=document.createElement("h3");mxUtils.write(h,a?mxResources.get("selectFile"):mxResources.get("selectCard"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height=
+"194px";f.appendChild(m);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var l=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");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";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),k=mxUtils.bind(this,function(){e=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){p()})));mxUtils.br(m);null==a||0==a.length?mxUtils.write(m,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){m.appendChild(l(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,g,!0):
+null!=g&&g(b)}))});a()}),n=null,u=null,p=mxUtils.bind(this,function(f){null==f&&(e=0,m.innerHTML="",f=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",u);p(f+1)});mxEvent.addListener(n,"click",h);var q=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==f&&(m.appendChild(l(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,p())}),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(m));for(var g=0;g<e.length;g++)mxUtils.bind(this,function(c){m.appendChild(l(c.name,mxUtils.bind(this,function(){a?(d=c.id,k()):(this.ui.hideDialog(),b(c.id))})))})(e[g]);100==e.length&&(m.appendChild(n),u=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",u))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,g,!0):null!=g&&g({message:a.responseText})}))});q()});p()};
+TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,d,c,e,f,h,m){this.editorUi=a;this.doc=m.doc;this.rtModel=m.rt;this.chatHistory=m.chatHistory;this.chatMap=m.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";m=document.createElement("div");m.style.padding="3px";d.appendChild(m);var l=document.createElement("div");l.style.paddingLeft="3px";l.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(l);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
+this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";m.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));l.appendChild(this.chatLineArea);l.appendChild(this.sendBtn);this.window=new mxWindow(b,d,c,e,f,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.handleResize();this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.MAXIMIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,this.handleResize));if(null!=this.chatHistory){for(a=Math.max(0,this.chatHistory.length-this.chatHistoryShow);a<this.chatHistory.length;a++)this.updateChatArea(this.chatHistory.get(a));this.chatHistory.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,
function(a){this.updateChatArea(a.target.get(a.index))}))}this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_JOINED,mxUtils.bind(this,this.collaboratorListener));this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_LEFT,mxUtils.bind(this,this.collaboratorListener));null!=this.chatMap&&this.chatMap.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,mxUtils.bind(this,function(a){this.updateChatArea(a.target.get(a.property))}))}
@@ -7701,8 +7706,8 @@ ChatWindow.prototype.sendMessage=function(){try{var a={timestamp:(new Date).getT
ChatWindow.prototype.updateChatArea=function(a){a='<span style="color : '+a.collaboratorColor+';">&#x25BA;</span><b>'+a.collaboratorName+"</b>: "+this.htmlEscape(a.text)+"<br>";this.chatArea.innerHTML+=a;this.chatArea.scrollTop=this.chatArea.scrollHeight};
ChatWindow.prototype.handleResize=function(){var a=this.window.getElement(),b=this.editorUi.editor.graph.isEnabled()?70:40;this.chatArea.style.height=Math.max(0,a.offsetHeight-b)+"px";this.chatLineArea.style.width=a.offsetWidth-this.sendBtn.offsetWidth-40+"px"};
ChatWindow.prototype.collaboratorListener=function(a){if(!a.collaborator.isMe){if(a.type==gapi.drive.realtime.EventType.COLLABORATOR_JOINED)a='<span style="color : '+a.collaborator.color+';">&#x25B2</span><i>'+mxResources.get("chatJoined",[a.collaborator.displayName])+"</i>";else if(a.type==gapi.drive.realtime.EventType.COLLABORATOR_LEFT)a='<span style="color : '+a.collaborator.color+';">&#x25BC</span><i>'+mxResources.get("chatLeft",[a.collaborator.displayName])+"</i>";else return;this.chatArea.innerHTML=
-this.chatArea.innerHTML+a+"<br>";this.chatArea.scrollTop=this.chatArea.scrollHeight}};ChatWindow.prototype.configCollabInfo=function(){for(var a=this.doc.getCollaborators(),b=0;b<a.length;b++){var d=a[b];d.isMe&&(this.collabColor=d.color,this.displayName=d.displayName)}};ChatWindow.prototype.destroy=function(){this.window.destroy()};ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")};App=function(a,b,d){EditorUi.call(this,a,b,null!=d?d:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,d){var c=null;try{c=window.open(a)}catch(n){}null==c||void 0===c?this.showDialog((new PopupDialog(this,a,b,d)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+this.chatArea.innerHTML+a+"<br>";this.chatArea.scrollTop=this.chatArea.scrollHeight}};ChatWindow.prototype.configCollabInfo=function(){for(var a=this.doc.getCollaborators(),b=0;b<a.length;b++){var d=a[b];d.isMe&&(this.collabColor=d.color,this.displayName=d.displayName)}};ChatWindow.prototype.destroy=function(){this.window.destroy()};ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")};App=function(a,b,d){EditorUi.call(this,a,b,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,d){var c=null;try{c=window.open(a)}catch(m){}null==c||void 0===c?this.showDialog((new PopupDialog(this,a,b,d)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
@@ -7713,14 +7718,14 @@ App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
App.main=function(a,b){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,e,f){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var g=new Image,h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";g.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+h+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(v){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height",
-"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var h=e.split(";"),e=0;e<h.length;e++){var n=App.pluginRegistry[h[e]];null!=n?mxscript(f+n):null!=window.console&&console.log("Unknown plugin:",h[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height",
+"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var h=e.split(";"),e=0;e<h.length;e++){var m=App.pluginRegistry[h[e]];null!=m?mxscript(f+m):null!=window.console&&console.log("Unknown plugin:",h[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
null,null,null,mxClient.IS_SVG);if(null!=c&&0<c.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;h=!0;for(e=0;e<c.length&&h;e++)"/"!=c[e].charAt(0)&&c[e].substring(0,f.length)!=f&&(h=!1);if(h||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",[c.join("\n")]).replace(/\\n/g,
"\n")))for(e=0;e<c.length;e++)try{mxscript(c[e])}catch(l){}}}"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();
-mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=null!=b?b():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===
-typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===
-typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=
-urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
+mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=null!=b?b():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
+urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=
+null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
+("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
"1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";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";
@@ -7741,20 +7746,20 @@ null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.but
IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),b=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=b){var d=b.lastIndexOf("@"),c=b;0<=d&&(c=b.substring(d+1),b=this.crc32(b.substring(0,d))+"@"+c);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&email="+encodeURIComponent(b)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
-a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var d=JSON.parse(b);null!=d&&this.handleLicense(d,c)}}}catch(n){}}))}};
+a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var d=JSON.parse(b);null!=d&&this.handleLicense(d,c)}}}catch(m){}}))}};
App.prototype.handleLicense=function(a,b){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=a)if(c=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var e=new Date(Date.parse(c)),f=Math.round((e-Date.now())/864E5);if(90>f){var h="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);d.style.height="100%";d.style.margin="0px";d.style.display=
"";0>f?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+h+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-h+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return c};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)};
+h+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return c};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var b=this.getRecent();if(null==b)b=[];else for(var d=0;d<b.length;d++)b[d].id==a.id&&b.splice(d,1);null!=b&&(b.unshift(a),b=b.slice(0,5),localStorage.setItem(".recent",JSON.stringify(b)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(b){}return null}};
App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(b){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
-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.chromeless){if((a.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var a=this.editor.appName,b=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=b&&(a=(null!=b.getTitle()?b.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],b,d=0;256>d;d++){b=d;for(var c=0;8>c;c++)b=b&1?3988292384^b>>>1:b>>>1;a[d]=b}return a};
+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()){if((a.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&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,b=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=b&&(a=(null!=b.getTitle()?b.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],b,d=0;256>d;d++){b=d;for(var c=0;8>c;c++)b=b&1?3988292384^b>>>1:b>>>1;a[d]=b}return a};
App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};
App.prototype.getThumbnail=function(a,b){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,f=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(f.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var h=document.createElement("canvas"),n=c.getGraphBounds(),l=a/n.width,l=Math.min(1,Math.min(3*a/(4*n.height),l)),g=Math.floor(n.x),k=Math.floor(n.y);h.setAttribute("width",Math.ceil(l*(n.width+4)));h.setAttribute("height",Math.ceil(l*(n.height+4)));var m=h.getContext("2d");
-m.scale(l,l);m.translate(-g,-k);var q=c.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";m.save();m.fillStyle=q;m.fillRect(g,k,Math.ceil(n.width+4),Math.ceil(n.height+4));m.restore();var u=new mxJsCanvas(h),p=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var v=new mxImageExport;v.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())};v.drawText=function(a,
-b){};v.drawState(c.getView().getState(c.model.root),p);p.finish(mxUtils.bind(this,function(){v.drawState(c.getView().getState(c.model.root),u);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(h)}));d=!0}}catch(x){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
+function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var h=document.createElement("canvas"),m=c.getGraphBounds(),l=a/m.width,l=Math.min(1,Math.min(3*a/(4*m.height),l)),g=Math.floor(m.x),k=Math.floor(m.y);h.setAttribute("width",Math.ceil(l*(m.width+4)));h.setAttribute("height",Math.ceil(l*(m.height+4)));var n=h.getContext("2d");
+n.scale(l,l);n.translate(-g,-k);var u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";n.save();n.fillStyle=u;n.fillRect(g,k,Math.ceil(m.width+4),Math.ceil(m.height+4));n.restore();var p=new mxJsCanvas(h),q=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var w=new mxImageExport;w.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())};w.drawText=function(a,
+b){};w.drawState(c.getView().getState(c.model.root),q);q.finish(mxUtils.bind(this,function(){w.drawState(c.getView().getState(c.model.root),p);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(h)}));d=!0}}catch(v){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
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);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(b,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",b);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+b+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),b=null!=c?c.getMode():null,b==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):b==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):b==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="default"))}})();
@@ -7767,7 +7772,7 @@ App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(docu
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var b=document.createElement("div");b.className="geAlert";b.style.zIndex=2E9;b.style.left="50%";b.style.top="-100%";mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
mxResources.get("close"));a.innerHTML=mxResources.get("close");b.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=b.parentNode&&(b.parentNode.removeChild(b),mxEvent.consume(a))});document.body.appendChild(b);window.setTimeout(function(){b.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(b.style,"transition","all 2s ease");b.style.opacity="0";window.setTimeout(function(){null!=b.parentNode&&b.parentNode.removeChild(b)},2E3)},15E3)}};
-App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(m){null!=document.body&&this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=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(g){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(this.getDiagramId());else{var d=this.getDraft(),l=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;this.createFile(this.defaultFilename,
@@ -7776,7 +7781,7 @@ l,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurr
null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c);this.showDialog(b.container,380,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),b=decodeURIComponent(b);if("http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8))try{null!=window.opener&&null!=window.opener[b]?c(window.opener[b]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(e){this.handleError(e,
mxResources.get("errorLoadingFile"))}else this.loadTemplate(b,function(a){c(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.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?
(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(e){this.handleError(e)}};
-App.prototype.showSplash=function(a){var b=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>b||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")},
+App.prototype.showSplash=function(a){var b=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>b||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==b?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),a);this.showDialog(c.container,3>a?260:300,4<=b?420:300,!0,!1);c.init()}else null==urlParams.create&&d()};
App.prototype.addLanguageMenu=function(a,b){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(b){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var c=document.createElement("span");c.style.display="inline-block";
c.style.fontSize="12px";c.style.margin="5px 24px 0 0";c.style.color="gray";mxUtils.write(c,mxResources.get("language"));d.appendChild(c)}mxEvent.addListener(d,"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 c=mxUtils.getOffset(d);
@@ -7788,25 +7793,25 @@ App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)n
Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var c=this.dialog,e=c.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(c,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var f=
document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&this.openFiles(f.files)}));f.click()}}};
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_TRELLO){var b=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=b&&b.pickLibrary(mxUtils.bind(this,function(a,c){if(null!=c)try{this.loadLibrary(c)}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,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||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
+mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(m){this.handleError(m,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||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=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(h){this.handleError(h,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{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(l){this.handleError(l,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(c.files[a])}));c.click()}};
-App.prototype.saveLibrary=function(a,b,d,c,e,f,h){c=null!=c?c:this.mode;e=null!=e?e:!1;f=null!=f?f:!1;var n=this.createLibraryDataFromImages(b),l=mxUtils.bind(this,function(a){this.spinner.stop();null!=h&&h();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,n,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-n,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,n,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),l)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(n);var g=mxUtils.bind(this,
+App.prototype.saveLibrary=function(a,b,d,c,e,f,h){c=null!=c?c:this.mode;e=null!=e?e:!1;f=null!=f?f:!1;var m=this.createLibraryDataFromImages(b),l=mxUtils.bind(this,function(a){this.spinner.stop();null!=h&&h();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,m,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+m,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,m,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,b)}),l,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,m,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),l)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(m);var g=mxUtils.bind(this,
function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(d,b);null!=h&&h()}),l)});if(a!=d.getTitle()){var k=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&k!=d.getHash()&&(mxSettings.removeCustomLibrary(k),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(k);g()}),l)}else g()}};
App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var c=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,f=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var h=4>=a?2:6<a?4:3,c=new CreateDialog(this,
c,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==f&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):f!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,h);this.showDialog(c.container,460,a>h?390:270,!0,!0);c.init()}else this.save(b.getTitle(),d)}};
EditorUi.prototype.loadTemplate=function(a,b,d){var c=a;this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+c);this.loadUrl(c,mxUtils.bind(this,function(c){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(a){b(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&b(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(c=this.extractGraphModelFromPng(c)),b(c))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,b,d,c,e,f,h,n){c=n?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var l=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(a){l();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(h=null!=this.stateArg?this.stateArg.folderId:h,this.drive.insertFile(a,b,h,mxUtils.bind(this,
+App.prototype.createFile=function(a,b,d,c,e,f,h,m){c=m?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var l=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(a){l();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(h=null!=this.stateArg?this.stateArg.folderId:h,this.drive.insertFile(a,b,h,mxUtils.bind(this,
function(a){l();this.fileCreated(a,d,f,e)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(c,mxUtils.bind(this,function(c){this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){l();this.fileCreated(a,d,f,e)}),g,!1,c)})):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,b,mxUtils.bind(this,function(a){l();this.fileCreated(a,d,f,e)}),g,!1,h):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){l();this.fileCreated(a,d,f,e)}),g):
c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){l();this.fileCreated(a,d,f,e)}),g,!1,h):c==App.MODE_BROWSER?(l(),c=mxUtils.bind(this,function(){var c=new StorageFile(this,b,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(c,d,f,e)}),g)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(l(),this.fileCreated(new LocalFile(this,
b,a,null==c),d,f,e))}};
-App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var f=a.getData(),f=0<f.length?this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0):null,h=window.location.protocol+"//"+window.location.hostname+e,n=f,l=null;null!=f&&/\.svg$/i.test(a.getTitle())&&(l=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(l.container),
-n=this.decodeNodeIntoGraph(n,l));a.setData(this.createFileData(f,l,a,h));null!=l&&l.container.parentNode.removeChild(l.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}),
+App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var f=a.getData(),f=0<f.length?this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0):null,h=window.location.protocol+"//"+window.location.hostname+e,m=f,l=null;null!=f&&/\.svg$/i.test(a.getTitle())&&(l=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(l.container),
+m=this.decodeNodeIntoGraph(m,l));a.setData(this.createFileData(f,l,a,h));null!=l&&l.container.parentNode.removeChild(l.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}),
k=mxUtils.bind(this,function(){d||null==f||!f.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=c&&c(),window.openWindow(e,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?k():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
function(){k()}),mxUtils.bind(this,function(a){g();this.handleError(a)}))}};
App.prototype.loadFile=function(a,b,d){this.hideDialog();var c=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)try{a=decodeURIComponent(a.substring(1));var c=localStorage.getItem(a);if(null!=c)this.fileLoaded(new StorageFile(this,c,a));else throw{message:mxResources.get("fileNotFound")};}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"),
@@ -7818,11 +7823,11 @@ mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=nu
window.location.hash=a.getHash()}))})))}),e=this.getCurrentFile(),f=mxUtils.bind(this,function(){null!=e&&e.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=e&&(window.location.hash=e.getHash())}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null==a||0==a.length?f():null!=e&&e.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,f):f()};
App.prototype.getLibraryStorageHint=function(a){var b=a.getTitle();a.constructor!=LocalLibrary&&(b+="\n"+a.getHash());a.constructor==DriveLibrary?b+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?b+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?b+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?b+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?b+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?b+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(b+=" ("+mxResources.get("device")+")");return b};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,c){var d=0,f=[],h=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=f[a]&&this.loadLibrary(f[a]);null!=c&&c()}});if(null!=b)for(var n=0;n<b.length;n++){var l=encodeURIComponent(decodeURIComponent(b[n]));mxUtils.bind(this,
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,c){var d=0,f=[],h=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=f[a]&&this.loadLibrary(f[a]);null!=c&&c()}});if(null!=b)for(var m=0;m<b.length;m++){var l=encodeURIComponent(decodeURIComponent(b[m]));mxUtils.bind(this,
function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){d++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];f[c]=a;d--;h()}),g=mxUtils.bind(this,function(){a(b);d--;h()});this.pendingLibraries[b]=!0;var k=b.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
-b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):g()}))}catch(y){g()}}),0);else if("U"==k){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){k=l;this.isCorsEnabledForUrl(k)||(k="t="+(new Date).getTime(),k=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+k);try{mxUtils.get(k,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(y){g()}else g()}),function(){g()})}catch(x){g()}}}else{var n=null;"G"==k?null!=
-this.drive&&null!=this.drive.user&&(n=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==k&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){g()}}),function(a){g()}):(delete this.pendingLibraries[b],
-g())}}})(l,n)}h()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
+b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):g()}))}catch(A){g()}}),0);else if("U"==k){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){k=l;this.isCorsEnabledForUrl(k)||(k="t="+(new Date).getTime(),k=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+k);try{mxUtils.get(k,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(A){g()}else g()}),function(){g()})}catch(v){g()}}}else{var m=null;"G"==k?null!=
+this.drive&&null!=this.drive.user&&(m=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(m=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(m=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==k&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(m=this.oneDrive);null!=m?m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(A){g()}}),function(a){g()}):(delete this.pendingLibraries[b],
+g())}}})(l,m)}h()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
this.shareButton=null)}};
@@ -7837,9 +7842,9 @@ d():this.confirm(mxResources.get("replaceIt",[b]),d))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var b=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,b);this.fname.setAttribute("title",b+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var b=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),b,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
App.prototype.showAuthDialog=function(a,b,d,c){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,b,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(h){this.editor.setStatus(mxUtils.htmlEntities(h.message))}}))).container,300,b?180:140,!0,!0,mxUtils.bind(this,function(a){null!=c&&c();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,b,d,c,e,f){var h=b;/\.svg$/i.test(h)||(h=h.substring(0,b.lastIndexOf("."))+c);var n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if((/\.vsdx$/i.test(b)||/\.vsd$/i.test(b))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var l=new XMLHttpRequest;l.open("GET",a,!0);n||(l.responseType="blob");l.onload=mxUtils.bind(this,function(){var a=null;n?(a=JSON.parse(l.responseText),
+App.prototype.convertFile=function(a,b,d,c,e,f){var h=b;/\.svg$/i.test(h)||(h=h.substring(0,b.lastIndexOf("."))+c);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if((/\.vsdx$/i.test(b)||/\.vsd$/i.test(b))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var l=new XMLHttpRequest;l.open("GET",a,!0);m||(l.responseType="blob");l.onload=mxUtils.bind(this,function(){var a=null;m?(a=JSON.parse(l.responseText),
a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([l.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,h,!0))}),f,b)});l.send()}else{var g=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,h,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,h,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,h,!0))}catch(m){null!=f&&f(m)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,h,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,h,!0))}catch(n){null!=f&&f(n)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
"data:image/png;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));g(c)}}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})}):this.loadUrl(a,g,f,d)}};
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="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
@@ -7862,48 +7867,49 @@ App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive
"8pt",this.userElement.style.top="4px",this.userElement.style.right="30px",this.userElement.style.color="#666",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,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";b.style.right="36px";b.style.padding="0px";this.userPanel=b}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var c=!1;this.userPanel.innerHTML="";b=document.createElement("img");b.setAttribute("src",
Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(b);null!=this.drive&&(b=this.drive.getUser(),null!=b&&(c=!0,this.userPanel.innerHTML+='<table title="User ID: '+b.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+
-(null!=b.pictureUrl?'<img style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+"</small></tr></table>",b=document.createElement("div"),b.style.textAlign="center",b.style.padding="12px",b.style.background="whiteSmoke",
-b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",b.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";
-this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,d){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),
-c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font></td>":"")+"</tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background=
-"whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=d&&a.appendChild(mxUtils.button(mxResources.get("signOut"),d)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(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()}));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",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()}));
-null!=this.gitHub&&b(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()}));null!=this.trello&&b(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()}));c||(b=document.createElement("div"),b.style.textAlign="center",b.style.padding="20px 20px 10px 10px",b.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(b));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!=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)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);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:12px;cursor:help;";
+(null!=b.pictureUrl?'<img style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",b=document.createElement("div"),b.style.textAlign="center",
+b.style.padding="12px",b.style.background="whiteSmoke",b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",b.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display=
+"none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=
+mxUtils.bind(this,function(a,b,d,m){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=m?"<br><br><small>"+
+mxUtils.htmlEntities(m)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=d&&a.appendChild(mxUtils.button(mxResources.get("signOut"),d)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(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&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",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&&b(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.trello&&b(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"));c||(b=document.createElement("div"),b.style.textAlign="center",b.style.padding="20px 20px 10px 10px",b.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(b));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!=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)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);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:12px;cursor:help;";
var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();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 b=Menus.prototype.init;Menus.prototype.init=function(){b.apply(this,
-arguments);var a=this.editorUi,d=a.editor.graph,f=mxUtils.bind(d,d.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+arguments);var a=this.editorUi,d=a.editor.graph,f=mxUtils.bind(d,d.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),g=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&
a.exportSvg(b/100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,
mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=
+!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,k,l,t){a.createHtml(b,c,d,e,f,g,h,k,l,t,mxUtils.bind(this,function(b,c){var d=
a.getBaseFilename(),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>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();
if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+
-"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(C){a.handleError(C)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(y){a.handleError(y)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+
"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var k=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=
-!a.isMathEnabled();d.model.execute(b)});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.isMathEnabled()});k.isEnabled=f}isLocalStorage&&(k=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var m=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return m.isEnabled()&&
-a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
+!a.isMathEnabled();d.model.execute(b)});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.isMathEnabled()});k.isEnabled=f}isLocalStorage&&(k=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&&
+a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var u="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
-null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<q.length;f++){var g=q[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<u.length;f++){var g=u[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
-null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));k=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return d.shadowVisible});var u=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){u=!1}),u=!0)},null,null,"F1"));a.actions.addAction("userManual...",
+null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));k=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return d.shadowVisible});var p=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){p||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));a.actions.addAction("userManual...",
function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):
a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});k=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",
function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=a.actions.addAction("find...",mxUtils.bind(this,function(){null==
this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=
this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=
-d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
-c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search:",null,null,c,null,
+d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
+c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,
null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
-window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support",
-"-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);
+null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);
+this.addMenuItems(b,["support","-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);
this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],
c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),
mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);
@@ -7926,58 +7932,59 @@ e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMe
"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,
["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,
this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function e(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
-c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=m(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
+c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");k(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var k=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=
!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,h,k,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,
-e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),m=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");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
+e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.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");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){e(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){e(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){k(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},
-c)})).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
-d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=
-a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));
-return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&f.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=
-App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,
-function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,
-function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=
-this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var v="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),
-x=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted",
-"cells",[a]))}finally{d.getModel().endUpdate()}d.container.focus();d.setSelectionCell(a);d.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
-y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
-"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<v.length;c++)"-"==v[c]?a.addSeparator(b):x(a,b,mxResources.get(v[c])+"...",v[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.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");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);
-b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
-"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&
-(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},
-c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",
-null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?
-b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=
-c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(C){a.handleError(C,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);
-mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,
-"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],
-c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],
-c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,
-["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",
-b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight=
-"0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){k(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));a.showCsvImport&&b.addItem(mxResources.get("csv")+"...",
+null,function(){a.showImportCsvDialog()},c)})).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&"min"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
+c);"min"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",
+mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):
+null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&f.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?
+b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,
+function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,
+function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));
+a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||
+this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var w="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),v=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),
+c)},A=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+d.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",
+80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<w.length;c++)"-"==w[c]?a.addSeparator(b):
+v(a,b,mxResources.get(w[c])+"...",w[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.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");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+
+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?
+b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=
+a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},
+c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,
+null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));
+null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},
+c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(y){a.handleError(y,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),
+a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",
+new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=
+urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,
+["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();
+null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,
+["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&
+d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");
+c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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.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){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
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,c=b.graph.compress(d.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,c);a.viewState=d.getViewState();a.root=d.model.root;d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.rootChanged(a.root);d.setViewState(a.viewState);
-b.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();d.view.validate();d.sizeDidChange();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,c){SelectPage.call(this,a,d);this.relatedPage=b;this.index=c;this.previousIndex=null}
+b.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();d.view.validate();d.sizeDidChange();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,c){SelectPage.call(this,a,d);this.relatedPage=b;this.index=c;this.previousIndex=null}
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;SelectPage.prototype.execute.apply(this,arguments)};
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.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));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 c=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=!1,c=null,e=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&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),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=!0}))):"undefined"===
-typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,d=0;d<c.length;d++)if(c[d]instanceof SelectPage||c[d]instanceof RenamePage||c[d]instanceof MovePage||c[d]instanceof mxRootChange){e();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=!1,c=null,e=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(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),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=
+!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,d=0;d<c.length;d++)if(c[d]instanceof SelectPage||c[d]instanceof RenamePage||c[d]instanceof MovePage||c[d]instanceof mxRootChange){e();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),e=a.getAttribute("pageHeight"),f=a.getAttribute("background"),h=a.getAttribute("backgroundImage"),h=null!=h&&0<h.length?JSON.parse(h):null;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.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=f&&0<f.length?f:this.defaultGraphBackground,backgroundImage:null!=h?new mxImage(h.src,h.width,h.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=e?new mxRectangle(0,0,parseFloat(c),parseFloat(e)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
-selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
+a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=f&&0<f.length?f:this.defaultGraphBackground,backgroundImage:null!=h?new mxImage(h.src,h.width,h.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=e?new mxRectangle(0,0,parseFloat(c),parseFloat(e)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
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}};
Graph.prototype.setViewState=function(a){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=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
@@ -7991,12 +7998,12 @@ EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled
EditorUi.prototype.duplicatePage=function(a,b){var d=this.editor.graph,c=null;d.isEnabled()&&(d.isEditing()&&d.stopEditing(),c=a.node.cloneNode(!1),c.removeAttribute("id"),c=new DiagramPage(c),c.root=d.cloneCells([d.model.root])[0],c.viewState=d.getViewState(),c.viewState.scale=1,c.viewState.scrollLeft=null,c.viewState.scrollRight=null,c.setName(b),c=this.insertPage(c,mxUtils.indexOf(this.pages,a)+1));return c};
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.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var d=this.editor.chromeless?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
d)/this.pages.length)+1),e=null,f=0;f<this.pages.length;f++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):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/>"),e=c):mxEvent.consume(b)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){e=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=e&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=e&&c!=e&&this.movePage(e,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(f,this.createTabForPage(this.pages[f],c,this.pages[f]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var h=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");h.style.position="absolute";h.style.right=this.editor.chromeless?"29px":"55px";h.style.fontSize="13pt";this.tabContainer.appendChild(h);var n=this.createControlTab(4,
-"&nbsp;&#10095;");n.style.position="absolute";n.style.right=this.editor.chromeless?"0px":"29px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=l+"px";mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(n,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(h,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(n,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,l-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(n,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()};
+c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var h=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");h.style.position="absolute";h.style.right=this.editor.chromeless?"29px":"55px";h.style.fontSize="13pt";this.tabContainer.appendChild(h);var m=this.createControlTab(4,
+"&nbsp;&#10095;");m.style.position="absolute";m.style.right=this.editor.chromeless?"0px":"29px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=l+"px";mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(m,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(h,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(m,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,l-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(m,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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=b;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
@@ -8006,51 +8013,110 @@ null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSepar
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){d=this.createTab(d);var c=a.getName();d.setAttribute("title",c);mxUtils.write(d,c);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 c=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;e=a==this.currentPage;d.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(f)&&e||mxEvent.isPopupTrigger(f))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!c){var h=new mxPopupMenu(this.createPageMenu(a));h.div.className+=" geMenubarMenu";h.smartSeparators=!0;h.showDisabled=!0;h.autoExpand=!0;h.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(h,arguments);this.resetCurrentMenu();h.destroy()});var n=mxEvent.getClientX(f),l=mxEvent.getClientY(f);h.popup(n,l,null,f);this.setCurrentMenu(h,b)}mxEvent.consume(f)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!c){var h=new mxPopupMenu(this.createPageMenu(a));h.div.className+=" geMenubarMenu";h.smartSeparators=!0;h.showDisabled=!0;h.autoExpand=!0;h.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(h,arguments);this.resetCurrentMenu();h.destroy()});var m=mxEvent.getClientX(f),l=mxEvent.getClientY(f);h.popup(m,l,null,f);this.setCurrentMenu(h,b)}mxEvent.consume(f)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,c){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,c){c.setAttribute("page",d.page.getId());return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.page=a.ui.getPageById(d.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,c){c.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(c.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,c));return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(d.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",d.getAttribute("relatedPage"));
b.setAttribute("name",d.getAttribute("name"));c.relatedPage=new DiagramPage(b);d=d.cloneNode(!0);b=d.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var f=b.getAttribute("id");null==a.lookup(f)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return d};a.afterDecode=function(a,d,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,c,d,n,l){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],h=0;h<d.length;h++){var q=this.view.getState(d[h]),u=null!=q?q.style:this.getCellStyle(d[h]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[h],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[h]&&f.push(a);return a==d[h]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[h],
-a))}for(h=0;h<f.length;h++)this.model.setVisible(f[h],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType);
-return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function n(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.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 l(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],p.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);p.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=p.view.getState(a),k=p.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=p.getOutgoingEdges(p.model.getTerminal(d[0],
-!0));if(null!=m){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<m.length;t++){var u=p.model.getTerminal(m[t],!1);if(f==n(u)){var A=p.view.getState(u);u!=a&&null!=A&&(q&&b!=A.getCenterX()<h.getCenterX()||!q&&b!=A.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,A)&&(d=10+Math.max(d,(Math.min(l.x+l.width,A.x+A.width)-Math.max(l.x,A.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,A.y+A.height)-Math.max(l.y,A.y))/k))}}q?g=0:d=0;for(t=0;t<m.length;t++)if(u=p.model.getTerminal(m[t],
-!1),f==n(u)&&(A=p.view.getState(u),u!=a&&null!=A&&(q&&b!=A.getCenterX()<h.getCenterX()||!q&&b!=A.getCenterY()<h.getCenterY()))){var v=[];p.traverse(A.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});p.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function g(a){p.model.beginUpdate();try{var b=n(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1);
-var e=p.model.getParent(a),f=e.geometry,g=[];p.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);p.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);p.moveCells(g,h,k);return p.addCells(d,e)}finally{p.model.endUpdate()}}function k(a){p.model.beginUpdate();try{var b=
-p.model.getParent(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(d[0],a,!0);var c=p.getOutgoingEdges(a),e=b.geometry,f=[];p.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=p.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=p.view.getBounds(f),l=n(a),m=p.view.translate,q=p.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/q-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/q-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/q-m.y+-e.y+10);return p.addCells(d,b)}finally{p.model.endUpdate()}}function m(a,
-b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=p.view.getState(p.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 c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=m(p.model.getTerminal(c[0],!0),d,a),c=p.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&p.setSelectionCell(d[c].cell)))))}var u=this,p=u.editor.graph,v=p.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(p.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(p.getSelectionCell())&&
-(a.addSeparator(),0<p.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),
-a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",
-function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+T");var y=p.removeCells;p.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&c(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(p.traverse(g,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=p.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return y.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=p.duplicateCells;p.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=p.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=p.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
-a)}this.model.beginUpdate();try{var h=t.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=p.getIncomingEdges(h[e]),g=p.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,p.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var z=p.moveCells;p.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||p.model.isEdge(a[q])&&null==p.model.getTerminal(a[q],!0)){f=p.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=p.getIncomingEdges(a[0]);if(0<t.length){var u=p.view.getState(p.model.getTerminal(t[0],!0));if(null!=u){var v=p.view.getState(l);null!=v&&(c=(v.getCenterX()-u.getCenterX())/p.view.scale,d=(v.getCenterY()-u.getCenterY())/p.view.scale)}}}}k=z.apply(this,arguments);
-if(null!=k&&null!=a&&k.length==a.length)for(q=0;q<k.length;q++)if(this.model.isEdge(k[q]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[q],!0))&&this.model.setTerminal(k[q],l,!0);else if(b(a[q])&&(t=p.getIncomingEdges(a[q]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==p.getIncomingEdges(k[q]).length){m=l;if(null==m||m==p.model.getParent(a[q]))m=p.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,
-p.getDefaultParent(),m,k[q])}}finally{this.model.endUpdate()}return k};if(null!=u.sidebar){var G=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=p.model,g=null;f.beginUpdate();try{if(g=G.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=p.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:u.actions.get("selectChildren"),
-84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},w=u.onKeyDown;u.onKeyDown=function(a){try{if(p.isEnabled()&&!p.isEditing()&&b(p.getSelectionCell())&&1==p.getSelectionCount()){var c=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(p.getSelectionCell()):k(p.getSelectionCell()):13==a.which&&(c=l(p.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&p.model.isEdge(c[0])?p.setSelectionCell(p.model.getTerminal(c[0],
-!1)):p.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(p.view.getState(p.getSelectionCell())),p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=D[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(p.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||w.apply(this,arguments)};var B=p.connectVertex;p.connectVertex=function(a,c,d,e,f,h){var m=p.getIncomingEdges(a);return b(a)&&0<m.length?(d=n(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?k(a):e==f?g(a):l(a,c!=mxConstants.DIRECTION_NORTH&&
-c!=mxConstants.DIRECTION_WEST)):B.call(this,a,c,d,e,f,h)};p.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&p.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+Graph.prototype.foldCells=function(a,c,d,m,l){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],h=0;h<d.length;h++){var u=this.view.getState(d[h]),p=null!=u?u.style:this.getCellStyle(d[h]);"1"==mxUtils.getValue(p,"treeFolding","0")&&(this.traverse(d[h],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[h]&&f.push(a);return a==d[h]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[h],
+a))}for(h=0;h<f.length;h++)this.model.setVisible(f[h],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);
+return b}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function m(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.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 l(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=q.getOutgoingEdges(q.model.getTerminal(d[0],
+!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<n.length;t++){var v=q.model.getTerminal(n[t],!1);if(f==m(v)){var u=q.view.getState(v);v!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/k))}}p?g=0:d=0;for(t=0;t<n.length;t++)if(v=q.model.getTerminal(n[t],
+!1),f==m(v)&&(u=q.view.getState(v),v!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY()))){var C=[];q.traverse(u.cell,!0,function(a,b){null!=b&&C.push(b);C.push(a);return!0});q.moveCells(C,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function g(a){q.model.beginUpdate();try{var b=m(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
+var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);q.moveCells(g,h,k);return q.addCells(d,e)}finally{q.model.endUpdate()}}function k(a){q.model.beginUpdate();try{var b=
+q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=q.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=q.view.getBounds(f),l=m(a),n=q.view.translate,p=q.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function n(a,
+b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.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 u(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?p.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}var p=this,q=p.editor.graph,w=q.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var v=p.menus.createPopupMenu;p.menus.createPopupMenu=function(a,c,d){v.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(q.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(q.getSelectionCell())&&
+(a.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};p.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),
+a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",
+function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+T");var A=q.removeCells;q.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(q.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return A.apply(this,arguments)};p.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var h=t.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=q.getIncomingEdges(h[e]),g=q.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,q.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var x=q.moveCells;q.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);
+if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||q.model.isEdge(a[p])&&null==q.model.getTerminal(a[p],!0)){f=q.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=q.getIncomingEdges(a[0]);if(0<t.length){var v=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=v){var u=q.view.getState(l);null!=u&&(c=(u.getCenterX()-v.getCenterX())/q.view.scale,d=(u.getCenterY()-v.getCenterY())/q.view.scale)}}}}k=x.apply(this,arguments);
+if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&&(t=q.getIncomingEdges(a[p]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,
+q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=p.sidebar){var G=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=G.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=q.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var F={88:p.actions.get("selectChildren"),
+84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},z=p.onKeyDown;p.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(q.getSelectionCell()):k(q.getSelectionCell()):13==a.which&&(c=l(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],
+!1)):q.setSelectionCell(c[c.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=F[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(q.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(K){console.log("error",K)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var D=q.connectVertex;q.connectVertex=function(a,c,d,e,f,h){var n=q.getIncomingEdges(a);return b(a)&&0<n.length?(d=m(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?k(a):e==f?g(a):l(a,c!=mxConstants.DIRECTION_NORTH&&
+c!=mxConstants.DIRECTION_WEST)):D.call(this,a,c,d,e,f,h)};q.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&q.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){y.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",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.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;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.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.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),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;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;container=1;recursiveResize=0;treeFolding=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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=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 e=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");q.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);q.insertEdge(u,!1);var p=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);p.insertEdge(v,!1);a.insert(d);a.insert(f);a.insert(u);a.insert(v);a.insert(b);a.insert(c);a.insert(e);a.insert(q);a.insert(p);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var u=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");u.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);u.insertEdge(p,!1);var q=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");q.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);q.insertEdge(w,!1);a.insert(d);a.insert(f);a.insert(p);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(u);a.insert(q);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap 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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=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 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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=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;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;
-c.insertEdge(e,!0);d.insertEdge(e,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");m.geometry.relative=!0;m.edge=!0;c.insertEdge(m,!0);f.insertEdge(m,!1);a.insert(e);a.insert(m);a.insert(c);a.insert(d);a.insert(f);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(e,!0);d.insertEdge(e,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.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;c.insertEdge(n,!0);f.insertEdge(n,!1);a.insert(e);a.insert(n);a.insert(c);a.insert(d);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;container=1;recursiveResize=0;");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;container=1;recursiveResize=0;treeFolding=1;");
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;container=1;recursiveResize=0;treeFolding=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;container=1;recursiveResize=0;treeFolding=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")})])}}})();
+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){a.editor.graph.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new e(a,mxResources.get("format"),Math.max(0,a.diagramContainer.clientWidth-a.formatWidth-12),56,a.formatWidth,546,function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.minimumSize=
+new mxRectangle(0,0,a.formatWidth,80),a.formatWindow.window.setVisible(!0),a.formatWindow.window.fit(),a.fireEvent(new mxEventObject("sidebar"))):(a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible()),a.formatWindow.window.isVisible()&&a.formatWindow.window.fit());var b=mxUtils.getOffset(a.container);a.formatWindow.window.div.style.top=Math.max(parseInt(a.formatWindow.window.div.style.top),b.y)+"px"}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==
+a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,300);a.sidebarWindow=new e(a,mxResources.get("shapes"),10,56,c-6,Math.min(600,b.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;";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";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("1"!=urlParams.embed||"1"==urlParams.libraries)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.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",
+function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.sidebarWindow.window.fit();a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible()),a.sidebarWindow.window.isVisible()&&
+a.sidebarWindow.window.fit();b=mxUtils.getOffset(a.container);a.sidebarWindow.window.div.style.top=Math.max(parseInt(a.sidebarWindow.window.div.style.top),b.y)+"px"}var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: normal; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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:2px; 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 0 2px 0; 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); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}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:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { 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: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !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: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !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; }";
+document.getElementsByTagName("head")[0].appendChild(c)}catch(p){}var e=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};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="#ffffff"/>').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="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
+mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
+Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,36,'<path d="m 6 36 L 12 36 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleRight=Graph.createSvgImage(36,18,'<path d="m 1 6 L 24 6 L 24 1 L 36 9 L 24 18 L 24 12 L 1 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleDown=Graph.createSvgImage(18,36,'<path d="m 6 1 L 6 24 L 1 24 L 9 36 L 18 24 L 12 24 L 12 1 z" stroke="#fff" fill="#29b6f2"/>');
+HoverIcons.prototype.triangleLeft=Graph.createSvgImage(36,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
+Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);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.HIGHLIGHT_SIZE=5;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.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
+25;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var f=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){f.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var h=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):h.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var l=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){l.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="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};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="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
+b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";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="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;g.apply(this,arguments);
+mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
+a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};var k=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
+function(a){a=k.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="0px";a.appendChild(d);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
+e.style.position="relative";e.style.top="4px";d.appendChild(e)}return a};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);
+null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.actions.tagsWindow&&(this.actions.tagsWindow.window.setVisible(!1),this.actions.tagsWindow.window.destroy(),this.actions.tagsWindow=null);null!=this.actions.findWindow&&(this.actions.findWindow.window.setVisible(!1),this.actions.findWindow.window.destroy(),this.actions.findWindow=null);n.apply(this,arguments)};EditorUi.prototype.chromelessWindowResize=function(){};var u=EditorUi.prototype.init;
+EditorUi.prototype.init=function(){function c(a,b,c,d){var e=g.menus.get(a),f=D.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML="",mxUtils.setOpacity(f,d||40)):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function e(a,b,c,d,e,g){var f=document.createElement("a");f.setAttribute("href","javascript:void(0)");f.className="geMenuItem";
+f.style.display="inline-block";f.style.boxSizing="border-box";f.style.height="30px";f.style.padding="6px";f.style.position="relative";f.style.verticalAlign="top";f.style.top="0px";z.appendChild(f);null!=g?(f.style.backgroundImage="url("+g+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px"):mxUtils.write(f,a);mxEvent.addListener(f,"click",function(a){"disabled"!=f.getAttribute("disabled")&&b();mxEvent.consume(a)});
+null==c&&(f.style.marginRight="4px");null!=d&&f.setAttribute("title",d);mxUtils.setOpacity(f,null!=g?40:100);null!=e&&(a=function(){e.isEnabled()?(f.removeAttribute("disabled"),mxUtils.setOpacity(f,null!=g?40:100),f.style.cursor=""):(f.setAttribute("disabled","disabled"),mxUtils.setOpacity(f,null!=g?10:50),f.style.cursor="default")},e.addListener("stateChanged",a),a());return f}function f(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign=
+"top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));z.appendChild(b);return b}u.apply(this,arguments);var g=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);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);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=
+mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
+g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){a(g)}));var l=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
+g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b,mxResources.get("open")),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,
+["-","close"])})));if(isLocalStorage){var k=g.menus.get("openFrom"),m=k.funct;k.funct=function(a,b){m.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,
+["-","revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"exportPng exportJpg exportSvg - exportPdf exportVsdx - exportHtml exportXml exportUrl -".split(" "),b);g.menus.addSubmenu("embed",a,b);g.menus.addSubmenu("publish",a,b)})));g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&
+g.menus.addSubmenu("theme",a,b);g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),
+b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
+g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<n.length;c++)"-"==n[c]?a.addSeparator(b):l(a,b,mxResources.get(n[c])+"...",n[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
+"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var z=document.createElement("div");z.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var D=new Menubar(g,z);(k=900>d)||c("diagram");f([k?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,e(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
+null,mxResources.get("shapes"),g.actions.get("image"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var y=c("insert",!0,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([y,e(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=d){var B=g.actions.get("undo"),k=g.actions.get("redo"),B=e("",B.funct,null,mxResources.get("undo")+" ("+B.shortcut+")",B,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),k=e("",k.funct,
+null,mxResources.get("redo")+" ("+k.shortcut+")",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([B,k]);560<=d&&f([e("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
+c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=d?e("",g.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=d?e("",g.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));g.setStatusText(g.editor.getStatus());z.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText=
+"position:absolute;right:40px;top:12px;white-space:nowrap;";z.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;480<=d&&(k=g.menus.get("language"),null!=k&&(y=D.addMenu("",k.funct),y.setAttribute("title",mxResources.get("language")),y.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundSize="24px 24px",y.style.position="absolute",y.style.height="24px",y.style.width="24px",y.style.zIndex="1",y.style.top="11px",y.style.right="14px",mxUtils.setOpacity(y,30),z.appendChild(y)));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+k=g.diagramContainer.parentNode;B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";var H=g.menus.get("viewZoom");if(null!=H){this.tabContainer.style.right="70px";y=D.addMenu("100%",H.funct);y.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");y.style.whiteSpace="nowrap";y.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+y.style.backgroundPosition="right 6px center";y.style.backgroundRepeat="no-repeat";y.style.paddingRight="10px";y.style.display="block";y.style.position="absolute";y.style.textDecoration="none";y.style.textDecoration="none";y.style.right="0px";y.style.bottom="0px";y.style.overflow="hidden";y.style.textAlign="center";y.style.color="#000";y.style.fontSize="12px";y.style.color="#707070";y.style.width="59px";y.style.borderTop="1px solid lightgray";y.style.borderLeft="1px solid lightgray";y.style.height=
+parseInt(g.tabContainer.style.height)-1+"px";y.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";B.appendChild(y);H=mxUtils.bind(this,function(){y.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,H);g.editor.addListener("resetGraphView",H);g.editor.addListener("pageSelected",H);var C=g.setGraphEnabled;g.setGraphEnabled=function(){C.apply(this,arguments);null!=this.tabContainer&&(y.style.visibility=this.tabContainer.style.visibility)}}B.appendChild(g.tabContainer);
+B.appendChild(z);B.appendChild(g.diagramContainer);k.appendChild(B);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.outlineWindow.fit();null!=g.actions.layersWindow&&g.outlineWindow.fit();null!=g.actions.tagsWindow&&g.tagsWindow.window.fit();null!=g.actions.findWindow&&g.findWindow.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)}})();
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index 567ddb9a..9df85b23 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -104,7 +104,7 @@ window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Ba
ko:"한국어",ja:"日本語",zh:"中文(中国)","zh-tw":"中文(台灣)"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}return a}();
function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL="https://log.draw.io"))})();
-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");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";
+if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");"min"==uiTheme&&(urlParams.toolbar="0");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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.9.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
@@ -272,7 +272,7 @@ g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume
mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.buttons.appendChild(this.closeImg);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",a));this.destroyOnClose?this.destroy():
this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
mxWindow.prototype.isVisible=function(){return null!=this.div?"none"!=this.div.style.display:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
-mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||"none"==this.contentWrapper.style.display||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
mxForm.prototype.addText=function(a,b,c){var d=document.createElement("input");d.setAttribute("type",c||"text");d.value=b;return this.addField(a,d)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
@@ -282,22 +282,23 @@ function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=windo
mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}));mxEvent.addListener(a,"dragstart",function(a){mxEvent.consume(a)});this.eventConsumer=function(a,b){var c=b.getProperty("eventName"),d=b.getProperty("event");c!=mxEvent.MOUSE_DOWN&&d.consume()}}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;
mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;
-mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
+mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.checkEventSource=!0;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c,d){return a.getCellAt(b,c)};mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};mxDragSource.prototype.isActive=function(){return null!=this.mouseMoveHandler};
mxDragSource.prototype.reset=function(){null!=this.currentGraph&&(this.dragExit(this.currentGraph),this.currentGraph=null);this.removeDragElement();this.removeListeners();this.stopDrag()};
mxDragSource.prototype.mouseDown=function(a){this.enabled&&!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))};
-mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
-mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);this.checkEventSource&&mxClient.IS_SVG&&(this.dragElement.style.pointerEvents="none")};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
+mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.getElementForEvent=function(a){return mxEvent.isTouchEvent(a)||mxEvent.isPenEvent(a)?document.elementFromPoint(mxEvent.getClientX(a),mxEvent.getClientY(a)):mxEvent.getSource(a)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin(),g=this.getElementForEvent(b);if(this.checkEventSource)for(;null!=g&&g!=a.container;)g=g.parentNode;return null!=g&&c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null==b||this.graphContainsEvent(b,a)||(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility=
"hidden");else{var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}mxEvent.consume(a)};
mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)};
mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null};
-mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)};
-mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents="none");this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,
+this.eventConsumer)};mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x-a.panDx,c=mxEvent.getClientY(b)-c.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c,b),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==
this.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,
g=a.view.translate,k=a.gridSize/2,e=(a.snap(e/d-g.x-k)+g.x)*d,c=(a.snap(c/d-g.y-k)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};
-mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler.apply(this,arguments);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),k=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
g.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
@@ -1948,7 +1949,7 @@ b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rg
0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=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=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),y=!1,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);p()},jscolor.addEvent(u,"keyup",
q),jscolor.addEvent(u,"input",q),jscolor.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:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}jscolor.requireImage("cross.gif");jscolor.requireImage("arrow.gif");this.importColor()}};jscolor.install();
-Editor=function(a,b,e,c,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=k?k:!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,e,c,h){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=h?h:!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,c){var b=null!=c?c.getProperty("edit"):null;null!=b&&b.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.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+
@@ -1967,27 +1968,28 @@ Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCA
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAgVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9d3yJTAAAAKnRSTlMA+hzi3nRQWyXzkm0h2j3u54gzEgSXjlYoTBgJxL2loGpAOS3Jt7Wxm35Ga7gRAAAA6UlEQVQ4y63Q2XaCMBSF4Q0JBasoQ5DJqbXjfv8HbCK2BZNwo/8FXHx7rcMC7lQu0iX8qU/qtvAWCpoqH8dYzS0SwaV5eK/UAf8X9pd2CWKzuF5Jrftp1owXwnIGLUaL3PYndOHf4kNNXWrXK/m7CHunk7K8LE6YtBpcknwG9GKxnroY+ylBXcx4xKyx/u/EuXi509cP9V7OO1oyHnzrdFTcqLG/4ibBA5pIMr/4xvKzuQDkVy9wW8SgBFD6HDvuzMvrZcC9QlkfMzI7w64m+b4PqBMNHB05lH21PVxJo2/fBXxV4hB38PcD+5AkI4FuETsAAAAASUVORK5CYII=";
Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";Editor.nextLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFRJREFUOMvd0skRgCAQBVEFwQ0V7fxzNQP6wI05v6pZ/kyj1b7FNgik2gQzzLcAwiUAigHOTwDHK4A1CmB5BJANJG1hQ9qafYcqFlZP3IFc9eVGrR+iIgkDQRUXIAAAAABJRU5ErkJggg==";
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";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.init=function(){};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 e=null!=b?"?title="+encodeURIComponent(b):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){"ready"==c.data&&c.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"))):
-this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
-Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.chromeless||"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=this.graph.defaultGraphBackground;this.graph.pageScale=
-mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.chromeless||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled="0"!=
-a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var b=a.getAttribute("pageScale");this.graph.pageScale=null!=b?b:mxGraph.prototype.pageScale;this.graph.lightbox?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=null!=b?"0"!=b:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
+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.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 e=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){"ready"==c.data&&c.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+
+(0<e.length?"&":"?")+"client=1"))):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
+Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!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=this.graph.defaultGraphBackground;
+this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
+Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled=
+"0"!=a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var b=a.getAttribute("pageScale");this.graph.pageScale=null!=b?b:mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=null!=b?"0"!=b:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
this.graph.pageBreaksVisible;var b=a.getAttribute("pageWidth"),e=a.getAttribute("pageHeight");null!=b&&null!=e&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(b),parseFloat(e)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var e=b.document.createElement("mxGraphModel");e.appendChild(a);b.decode(e,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
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":"hidden",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,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],t=0;t<e.length;t++)(k.isVertex(e[t])||k.isEdge(e[t]))&&null!=a.view.getState(e[t])&&
-q.push(e[t]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),h=a.getModel(),q=[],u=0;u<e.length;u++)(h.isVertex(e[u])||h.isEdge(e[u]))&&null!=a.view.getState(e[u])&&
+q.push(e[u]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);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,e,c,k,l,n,q){var t=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(t=80);e+=t;c+=t;var d=e,h=c,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((f-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,f-64);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=f+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var g=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=g.x+"px";this.bg.style.top=g.y+"px";p+=g.x;m+=g.y;k&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");k=this.getPosition(p,m,
-e,c);p=k.x;m=k.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=p+"px";w.style.top=m+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=m+14+"px",l.style.left=p+e+38-t+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",
-mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){f=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=f+"px";p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((f-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
-Math.min(h,f-64);var g=this.getPosition(p,m,e,c);p=g.x;m=g.y;w.style.left=p+"px";w.style.top=m+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=p+e+38-t+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+function Dialog(a,b,e,c,h,m,p,q){var u=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(u=80);e+=u;c+=u;var d=e,g=c,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),t=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),n=Math.max(1,Math.round((f-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,f-64);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=f+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var l=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=l.x+"px";this.bg.style.top=l.y+"px";t+=l.x;n+=l.y;h&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");h=this.getPosition(t,n,
+e,c);t=h.x;n=h.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=t+"px";w.style.top=n+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=n+14+"px",m.style.left=t+e+38-u+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",
+mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){f=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=f+"px";t=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));n=Math.max(1,Math.round((f-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
+Math.min(g,f-64);var k=this.getPosition(t,n,e,c);t=k.x;n=k.y;w.style.left=t+"px";w.style.top=n+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=n+14+"px",this.dialogImg.style.left=t+e+38-u+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
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";
@@ -1998,30 +2000,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
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){null!=this.onDialogClose&&(this.onDialogClose(a),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 PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,p=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var r=q.checked?1:parseInt(h.value);isNaN(r)||(m=mxUtils.getScaleForPageCount(r,e,p))}e.getGraphBounds();var k=r=0,p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*b);p.height=Math.ceil(p.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),r-=b.x*p.width,k-=b.y*p.height):
-c=!0;c=PrintDialog.createPrintPreview(e,m,p,0,r,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage"));
-k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(k);n.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t,
-"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var h=document.createElement("input");h.setAttribute("value","1");h.setAttribute("type","number");h.setAttribute("min","1");h.setAttribute("size","4");h.setAttribute("disabled","disabled");h.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(h);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);n.appendChild(c);mxEvent.addListener(d,"change",
-function(){d.checked?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled");q.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);c.appendChild(k);n.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";k.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst||
-k.appendChild(t);c.appendChild(k);n.appendChild(c);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,e,c,k,l,n){b=new mxPrintPreview(a,b,e,c,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.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.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(c){var t=q.checked?1:parseInt(g.value);isNaN(t)||(n=mxUtils.getScaleForPageCount(t,e,k))}e.getGraphBounds();var h=t=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*b);k.height=Math.ceil(k.height*b);n*=b;!c&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*k.width,h-=b.y*k.height):
+c=!0;c=PrintDialog.createPrintPreview(e,n,k,0,t,h,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,h,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+h.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(h);p.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(d);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");h.appendChild(u);mxEvent.addListener(u,
+"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(h);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(g);mxUtils.write(h," "+mxResources.get("pages")+" (max)");c.appendChild(h);p.appendChild(c);mxEvent.addListener(d,"change",
+function(){d.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!d.checked});c=c.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");c.appendChild(h);h=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";h.appendChild(f);c.appendChild(h);p.appendChild(c);c=document.createElement("tr");h=document.createElement("td");h.colSpan=2;
+h.style.paddingTop="20px";h.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&h.appendChild(u);if(PrintDialog.previewEnabled){var t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});t.className="geBtn";h.appendChild(t)}t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});t.className="geBtn gePrimaryBtn";h.appendChild(t);a.editor.cancelFirst||
+h.appendChild(u);c.appendChild(h);p.appendChild(c);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,e,c,h,m,p){b=new mxPrintPreview(a,b,e,c,h,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 q=b.writeHead;b.writeHead=function(a){q.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==h||h==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=h,d.style.backgroundImage="")}function e(){null==m?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",m.src),p.style.fontSize="11px",p.innerHTML=m.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,n=document.createElement("table");n.style.width=
-"100%";n.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
-mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var h=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(h||"none",function(a){h=a;b()});mxEvent.consume(d)});
-l.appendChild(d);mxUtils.write(l,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();l.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
-":");k.appendChild(l);l=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var m=c.backgroundImage;mxEvent.addListener(p,"click",function(d){a.showBackgroundImageDialog(function(a){m=a;e()});mxEvent.consume(d)});e();l.appendChild(p);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var g=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var d=new ChangePageSetup(a,h,m,t.get());d.ignoreColor=c.background==h;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=m?m.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
-d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";l.appendChild(w);a.editor.cancelFirst||l.appendChild(g);k.appendChild(l);q.appendChild(k);n.appendChild(q);this.container=n};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,c){if(c||f!=document.activeElement&&p!=document.activeElement){a=!1;for(d=0;d<g.length;d++)c=g[d],r?"custom"==c.key&&(q.value=c.key,r=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
-e.height==c.format.height?(q.value=c.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(q.value=c.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,a=n.checked=!0));a?(t.style.display="",h.style.display="none"):(f.value=e.width/100,p.value=e.height/100,l.setAttribute("checked","checked"),
-q.value="custom",t.style.display="none",h.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft="4px";t.style.width="210px";
-t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);n.style.marginLeft="10px";n.style.marginRight="6px";t.appendChild(n);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));t.appendChild(d);var h=document.createElement("div");h.style.marginLeft="4px";h.style.width="210px";h.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";h.appendChild(f);mxUtils.write(h," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";h.appendChild(p);mxUtils.write(h," in");t.style.display="none";h.style.display="none";for(var m={},g=PageSetupDialog.getFormats(),w=0;w<g.length;w++){var u=g[w];m[u.key]=u;var v=document.createElement("option");v.setAttribute("value",u.key);mxUtils.write(v,u.title);q.appendChild(v)}var r=!1;k();a.appendChild(q);mxUtils.br(a);
-a.appendChild(t);a.appendChild(h);var z=e,A=function(a,d){var b=m[q.value];null!=b.format?(f.value=b.format.width/100,p.value=b.format.height/100,h.style.display="none",t.style.display=""):(t.style.display="none",h.style.display="");isNaN(parseFloat(f.value))&&(f.value=e.width/100);isNaN(parseFloat(p.value))&&(p.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(p.value)));"custom"!=q.value&&n.checked&&(b=new mxRectangle(0,0,b.height,b.width));
-d&&r||b.width==z.width&&b.height==z.height||(z=b,null!=c&&c(z))};mxEvent.addListener(b,"click",function(a){l.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){n.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",A);mxEvent.addListener(f,"click",A);mxEvent.addListener(p,"blur",A);mxEvent.addListener(p,"click",A);mxEvent.addListener(n,"change",A);mxEvent.addListener(l,"change",A);mxEvent.addListener(q,"change",function(a){r="custom"==q.value;A(a,!0)});A();
-return{set:function(a){e=a;k(null,null,!0)},get:function(){return z},widthInput:f,heightInput:p}};
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=g,d.style.backgroundImage="")}function e(){null==n?(t.removeAttribute("title"),t.style.fontSize="",t.innerHTML=mxResources.get("change")+"..."):(t.setAttribute("title",n.src),t.style.fontSize="11px",t.innerHTML=n.src.substring(0,42)+"...")}var c=a.editor.graph,h,m,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var q=document.createElement("tbody");h=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");h.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",c.pageFormat);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");
+mxUtils.write(m,mxResources.get("background")+":");h.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var g=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(d)});
+m.appendChild(d);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
+":");h.appendChild(m);m=document.createElement("td");var t=document.createElement("a");t.style.textDecoration="underline";t.style.cursor="pointer";t.style.color="#a0a0a0";var n=c.backgroundImage;mxEvent.addListener(t,"click",function(d){a.showBackgroundImageDialog(function(a){n=a;e()});mxEvent.consume(d)});e();m.appendChild(t);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var l=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&m.appendChild(l);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var d=new ChangePageSetup(a,g,n,u.get());d.ignoreColor=c.background==g;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=n?n.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
+d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";m.appendChild(w);a.editor.cancelFirst||m.appendChild(l);h.appendChild(m);q.appendChild(h);p.appendChild(q);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function h(a,d,c){if(c||f!=document.activeElement&&t!=document.activeElement){a=!1;for(d=0;d<l.length;d++)c=l[d],r?"custom"==c.key&&(q.value=c.key,r=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
+e.height==c.format.height?(q.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(q.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",g.style.display="none"):(f.value=e.width/100,t.value=e.height/100,m.setAttribute("checked","checked"),
+q.value="custom",u.style.display="none",g.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 q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
+u.style.height="24px";m.style.marginRight="6px";u.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";u.appendChild(p);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));u.appendChild(d);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var f=document.createElement("input");
+f.setAttribute("size","7");f.style.textAlign="right";g.appendChild(f);mxUtils.write(g," in x ");var t=document.createElement("input");t.setAttribute("size","7");t.style.textAlign="right";g.appendChild(t);mxUtils.write(g," in");u.style.display="none";g.style.display="none";for(var n={},l=PageSetupDialog.getFormats(),w=0;w<l.length;w++){var k=l[w];n[k.key]=k;var v=document.createElement("option");v.setAttribute("value",k.key);mxUtils.write(v,k.title);q.appendChild(v)}var r=!1;h();a.appendChild(q);mxUtils.br(a);
+a.appendChild(u);a.appendChild(g);var E=e,G=function(a,d){var b=n[q.value];null!=b.format?(f.value=b.format.width/100,t.value=b.format.height/100,g.style.display="none",u.style.display=""):(u.style.display="none",g.style.display="");isNaN(parseFloat(f.value))&&(f.value=e.width/100);isNaN(parseFloat(t.value))&&(t.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(t.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,b.height,b.width));
+d&&r||b.width==E.width&&b.height==E.height||(E=b,null!=c&&c(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;G(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){p.checked=!0;G(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",G);mxEvent.addListener(f,"click",G);mxEvent.addListener(t,"blur",G);mxEvent.addListener(t,"click",G);mxEvent.addListener(p,"change",G);mxEvent.addListener(m,"change",G);mxEvent.addListener(q,"change",function(a){r="custom"==q.value;G(a,!0)});G();
+return{set:function(a){e=a;h(null,null,!0)},get:function(){return E},widthInput:f,heightInput:t}};
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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{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:"custom",title:mxResources.get("custom"),format:null}]};
(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 d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2031,33 +2033,33 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
b="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-d,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-e,f))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
c,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=c,d.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var d=this.gridSteps*c,b=[],f=1;f<this.gridSteps;f++){var e=f*c;b.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+
d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" 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(c,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
-this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var h=this.gridSize*this.view.scale*this.view.gridSteps,h=-Math.round(h-mxUtils.mod(this.view.translate.x*this.view.scale+c,h))+"px "+-Math.round(h-mxUtils.mod(this.view.translate.y*this.view.scale+b,h))+"px";d.style.backgroundPosition=h}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,f=this.view.translate,e=this.pageFormat,m=b*this.pageScale,g=this.view.getBackgroundPageBounds();c=g.width;d=g.height;var k=
-new mxRectangle(b*f.x,b*f.y,e.width*m,e.height*m),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(d/k.height)-1:0,v=a?Math.ceil(c/k.width)-1:0,r=g.x+c,q=g.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:v,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(c+1)*k.height)),
-new mxPoint(Math.round(r),Math.round(g.y+(c+1)*k.height))]:[new mxPoint(Math.round(g.x+(c+1)*k.width),Math.round(g.y)),new mxPoint(Math.round(g.x+(c+1)*k.width),Math.round(q))];null!=a[c]?(a[c].points=b,a[c].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[c]=b)}for(c=d;c<a.length;c++)a[c].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var h=0;h<c.length;h++)if(this.graph.getModel().isVertex(c[h])){var f=this.graph.getCellGeometry(c[h]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,d){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,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,f=this.graph.pageScale,e=b.width*f,b=b.height*f,f=Math.floor(Math.min(0,c)/e),m=Math.floor(Math.min(0,
-d)/b);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+m*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-f)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-m)*b)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.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=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,d,b,f,e){var h=k.apply(this,arguments);null==e||e||mxEvent.addListener(h,"mousedown",function(a){mxEvent.consume(a)});return h};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),f=c.getParent(b);
-if(null==d||d!=b&&d!=f)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(f)&&c.isVertex(f)&&!this.graph.isContainer(f);)b=f,f=this.graph.getModel().getParent(b);return b};var n=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=n.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),f=b.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&b.isVertex(f)){d=!0;break}f=b.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed=
+this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+c,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+b,g))+"px";d.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,f=this.view.translate,e=this.pageFormat,n=b*this.pageScale,l=this.view.getBackgroundPageBounds();c=l.width;d=l.height;var w=
+new mxRectangle(b*f.x,b*f.y,e.width*n,e.height*n),k=(a=a&&Math.min(w.width,w.height)>this.minPageBreakDist)?Math.ceil(d/w.height)-1:0,v=a?Math.ceil(c/w.width)-1:0,r=l.x+c,h=l.y+d;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:v,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(c+1)*w.height)),
+new mxPoint(Math.round(r),Math.round(l.y+(c+1)*w.height))]:[new mxPoint(Math.round(l.x+(c+1)*w.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(c+1)*w.width),Math.round(h))];null!=a[c]?(a[c].points=b,a[c].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[c]=b)}for(c=d;c<a.length;c++)a[c].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var g=0;g<c.length;g++)if(this.graph.getModel().isVertex(c[g])){var f=this.graph.getCellGeometry(c[g]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,d){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,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,f=this.graph.pageScale,e=b.width*f,b=b.height*f,f=Math.floor(Math.min(0,c)/e),n=Math.floor(Math.min(0,
+d)/b);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+n*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-f)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-n)*b)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.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=b+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,d,b,f,e){var g=h.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=m.apply(this,arguments),f=c.getParent(b);
+if(null==d||d!=b&&d!=f)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(f)&&c.isVertex(f)&&!this.graph.isContainer(f);)b=f,f=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=p.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),f=b.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&b.isVertex(f)){d=!0;break}f=b.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();null==c&&(c=this.cell);var d=this.graph.view.getState(c);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),b=d.getParent(c);!this.graph.isCellSelected(b)&&d.isVertex(b);)c=b,b=d.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),d=c.getParent(a);c.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&&
(a=d),d=c.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var c=this.editor.graph;c.lightbox=e;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,c.isEnabled=function(){return!1},c.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
-k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var d=mxEvent.getSource(a);
-if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
-mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,n=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||n.apply(this,arguments)};this.keydownHandler=
-mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return t.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 d=!1,h=null,f=null,p=null,m=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var g=0;g<p.length;g++)this.toolbar.container.appendChild(p[g]);this.toolbar.fontMenu=h;this.toolbar.sizeMenu=
-f}d=c.cellEditor.isContentEditing();h=a;f=e;p=b}}),g=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this,arguments);m();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=g.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
-b.substring(0,b.length-1));g.toolbar.setFontName(b);g.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var u=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){u.apply(this,arguments);m()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";
-if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(D){}var v=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,c){this.menus.createPopupMenu(a,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],h=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),h.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],p=0;p<e.length;p++){var g=e[p],
-m=g.indexOf("=");0<=m&&(f=g.substring(0,m),g=g.substring(m+1),null!=a[f]&&"none"==g&&(b.push(g),h.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",h,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var A=
-["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)r.push(F[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(r,z[a])&&r.push(z[a]);var y=function(a,d){var b=c.getModel();b.beginUpdate();
-try{if(d)for(var f=b.isEdge(p),h=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var g=h[f[e]];null!=g&&c.setCellStyles(f[e],g,a)}else for(g=0;g<a.length;g++){for(var p=a[g],m=b.getStyle(p),u=null!=m?m.split(";"):[],O=r.slice(),e=0;e<u.length;e++){var v=u[e],k=v.indexOf("=");if(0<=k){var w=v.substring(0,k),q=mxUtils.indexOf(O,w);0<=q&&O.splice(q,1);for(var x=0;x<F.length;x++){var l=F[x];if(0<=mxUtils.indexOf(l,w))for(var n=0;n<l.length;n++){var A=
-mxUtils.indexOf(O,l[n]);0<=A&&O.splice(A,1)}}}}for(var h=(f=b.isEdge(p))?c.currentEdgeStyle:c.currentVertexStyle,t=b.getStyle(p),e=0;e<O.length;e++){var w=O[e],D=h[w];null==D||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(z,w))||(t=mxUtils.setStyle(t,w,D))}b.setStyle(p,t)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){y(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){y(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=
-[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));y(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,h=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(h=c.getModel().isEdge(b[e])||h)||!f);e++);else h=f=!0;for(var b=d.getProperty("keys"),g=d.getProperty("values"),e=0;e<b.length;e++){var p=0<=mxUtils.indexOf(A,b[e]);if("strokeColor"!=b[e]||null!=g[e]&&"none"!=g[e])if(0<=mxUtils.indexOf(z,
-b[e]))h||0<=mxUtils.indexOf(x,b[e])?null==g[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=g[e]:f&&0<=mxUtils.indexOf(r,b[e])&&(null==g[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=g[e]);else if(0<=mxUtils.indexOf(r,b[e])){if(f||p)null==g[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=g[e];if(h||p||0<=mxUtils.indexOf(x,b[e]))null==g[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=g[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||
+this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,c.isEnabled=function(){return!1},c.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var h=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=h,this.menubarContainer.onmousedown=
+h,this.toolbarContainer.onselectstart=h,this.toolbarContainer.onmousedown=h,this.diagramContainer.onselectstart=h,this.diagramContainer.onmousedown=h,this.sidebarContainer.onselectstart=h,this.sidebarContainer.onmousedown=h,this.formatContainer.onselectstart=h,this.formatContainer.onmousedown=h,this.footerContainer.onselectstart=h,this.footerContainer.onmousedown=h,null!=this.tabContainer&&(this.tabContainer.onselectstart=h));!this.editor.chromeless||this.editor.editable?(b=function(a){var d=mxEvent.getSource(a);
+if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}return h(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
+mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return m||p.apply(this,arguments)};this.keydownHandler=
+mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
+function(a){return q.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return u.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 d=!1,g=null,f=null,t=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var k=0;k<t.length;k++)this.toolbar.container.appendChild(t[k]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
+f}d=c.cellEditor.isContentEditing();g=a;f=e;t=b}}),l=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this,arguments);n();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=l.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+b.substring(0,b.length-1));l.toolbar.setFontName(b);l.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var k=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){k.apply(this,arguments);n()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";
+if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(y){}var v=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,c){this.menus.createPopupMenu(a,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),E="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],g=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),g.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],k=0;k<e.length;k++){var n=e[k],
+l=n.indexOf("=");0<=l&&(f=n.substring(0,l),n=n.substring(l+1),null!=a[f]&&"none"==n&&(b.push(n),g.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=
+["fontFamily","fontSize","fontColor"],H="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<C.length;a++)for(b=0;b<C[a].length;b++)r.push(C[a][b]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(r,E[a])&&r.push(E[a]);var x=function(a,d){var b=c.getModel();
+b.beginUpdate();try{if(d)for(var f=b.isEdge(n),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var k=g[f[e]];null!=k&&c.setCellStyles(f[e],k,a)}else for(k=0;k<a.length;k++){for(var n=a[k],l=b.getStyle(n),t=null!=l?l.split(";"):[],Q=r.slice(),e=0;e<t.length;e++){var v=t[e],w=v.indexOf("=");if(0<=w){var h=v.substring(0,w),H=mxUtils.indexOf(Q,h);0<=H&&Q.splice(H,1);for(var q=0;q<C.length;q++){var m=C[q];if(0<=mxUtils.indexOf(m,h))for(var p=0;p<
+m.length;p++){var G=mxUtils.indexOf(Q,m[p]);0<=G&&Q.splice(G,1)}}}}for(var g=(f=b.isEdge(n))?c.currentEdgeStyle:c.currentVertexStyle,u=b.getStyle(n),e=0;e<Q.length;e++){var h=Q[e],y=g[h];null==y||"shape"==h&&!f||f&&!(0>mxUtils.indexOf(E,h))||(u=mxUtils.setStyle(u,h,y))}b.setStyle(n,u)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){x(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){x(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));x(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),k=d.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(G,b[e]);if("strokeColor"!=b[e]||null!=k[e]&&"none"!=
+k[e])if(0<=mxUtils.indexOf(E,b[e]))g||0<=mxUtils.indexOf(H,b[e])?null==k[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=k[e]:f&&0<=mxUtils.indexOf(r,b[e])&&(null==k[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=k[e]);else if(0<=mxUtils.indexOf(r,b[e])){if(f||n)null==k[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=k[e];if(g||n||0<=mxUtils.indexOf(H,b[e]))null==k[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||"none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(c.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2077,35 +2079,35 @@ a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==c?"geSprite geSprite-"+a+"block":"g
a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"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"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(c){c.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var c=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
-!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale*a.width*d.width,
-this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container){c=null!=c?c:0;f=null!=f?f:0;var h=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),g=a.view.translate,p=a.view.scale,m=mxRectangle.fromRectangle(h);
-m.x=m.x/p-g.x;m.y=m.y/p-g.y;m.width/=p;m.height/=p;var g=a.container.scrollTop,u=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var v=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,v/m.width)):p;b=(v-d*m.width)/2/d;var k=0==this.lightboxVerticalDivider?0:(r-d*m.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||h.width<v||h.height<r)a.view.scaleAndTranslate(d,
-Math.floor(b-m.x),Math.floor(k-m.y)),a.container.scrollTop=g*d/p,a.container.scrollLeft=u*d/p;else if(0!=c||0!=f)h=a.view.translate,a.view.setTranslate(Math.floor(h.x+c/p),Math.floor(h.y+f/p))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
+this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),k=a.view.translate,n=a.view.scale,l=mxRectangle.fromRectangle(g);
+l.x=l.x/n-k.x;l.y=l.y/n-k.y;l.width/=n;l.height/=n;var k=a.container.scrollTop,t=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var v=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,v/l.width)):n;b=(v-d*l.width)/2/d;var w=0==this.lightboxVerticalDivider?0:(r-d*l.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),w=Math.max(w,0));if(e||g.width<v||g.height<r)a.view.scaleAndTranslate(d,
+Math.floor(b-l.x),Math.floor(w-l.y)),a.container.scrollTop=k*d/n,a.container.scrollLeft=t*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){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="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||
-0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,d,b){l++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);
-return c}),n=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
-d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var h=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",n.style.display="",q.style.display="inline-block"):(t.style.display="none",n.style.display=
-"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",h);this.editor.addListener("pageSelected",d);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(d){a.lightbox?(1==a.view.scale?
-this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var f=null,p=null,m=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=
-null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var w=k(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
+"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var h=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||
+0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",h);h();var m=0,h=mxUtils.bind(this,function(a,d,b){m++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);
+return c}),p=h(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var u=h(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
+d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",q.style.display="inline-block"):(u.style.display="none",p.style.display=
+"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",d);h(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");h(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");h(mxUtils.bind(this,function(d){a.isLightboxView()?(1==a.view.scale?
+this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var f=null,t=null,n=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=
+null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var w=h(mxUtils.bind(this,function(d){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 b=w.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){w.style.display=1<u.getChildCount(u.root)?
-"":"none"})}this.addChromelessToolbarItems(k);null!=this.editor.editButtonLink&&k(mxUtils.bind(this,function(d){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
-mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||g(30),m())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=
-b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?m():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var r=
-a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}r.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*
-c.width),h=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=h)a.minimumGraphSize=new mxRectangle(0,0,f,h);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),
-this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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-.01)/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(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=A&&(c=a.container.offsetWidth/2-A.x+d.x,f=a.container.offsetHeight/2-A.y+d.y);d=this.view.scale;
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),k=a.getModel();k.addListener(mxEvent.CHANGE,function(){w.style.display=1<k.getChildCount(k.root)?
+"":"none"})}this.addChromelessToolbarItems(h);null!=this.editor.editButtonLink&&h(mxUtils.bind(this,function(d){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||h(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
+mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||l(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||l(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=
+b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():l(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var r=
+a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}r.apply(this,arguments)};var E=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*
+c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),
+this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var G=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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-.01)/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(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=G&&(c=a.container.offsetWidth/2-G.x+d.x,f=a.container.offsetHeight/2-G.y+d.y);d=this.view.scale;
this.zoom(this.cumulativeZoomFactor);this.view.scale!=d&&(null!=b&&e.chromelessResize(!1,null,c*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==c&&0==f||(a.container.scrollLeft-=c*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(d))for(var c=
-mxEvent.getSource(d);null!=c;){if(c==a.container){A=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+mxEvent.getSource(d);null!=c;){if(c==a.container){G=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};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.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"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,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,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.chromeless)return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
+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 e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
this.editor.fireEvent(new mxEventObject("resetGraphView"))};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){}};
@@ -2113,32 +2115,32 @@ EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing())
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,e;for(e in urlParams)a=0==b?a+"?":a+"&",a+=e+"="+urlParams[e],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,e=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();e!=b.container.style.overflow&&("hidden"==b.container.style.overflow?(a=b.view.translate,b.view.setTranslate(a.x-b.container.scrollLeft/b.view.scale,a.y-b.container.scrollTop/b.view.scale),b.container.scrollLeft=0,b.container.scrollTop=0,b.minimumGraphSize=null,b.sizeDidChange()):(a=b.view.translate.x,e=b.view.translate.y,b.view.translate.x=0,b.view.translate.y=
0,b.sizeDidChange(),b.container.scrollLeft-=Math.round(a*b.view.scale),b.container.scrollTop-=Math.round(e*b.view.scale)));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.chromeless)if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing);a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2));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(),e=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-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-b.height)/
-4))-b.y)))};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),c=0,k=0;e&&(c=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-c,b.container.scrollTop=b.view.translate.y*
-b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,c){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=c;this.ignoreImage=this.ignoreColor=!1}
+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);a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2));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(),e=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-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
+b.height)/4))-b.y)))};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),c=0,h=0;e&&(c=b.view.translate.x*b.view.scale-b.container.scrollLeft,h=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-c,b.container.scrollTop=b.view.translate.y*
+b.view.scale-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,c){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=c;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}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),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)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);return c};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){this.editor.graph.pageFormat=a;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"),e=this.editor.undoManager,c=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,c);e.addListener(mxEvent.UNDO,c);e.addListener(mxEvent.REDO,c);e.addListener(mxEvent.CLEAR,c);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);c()};var l=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);c()};c()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var n=k[l];a.getModel().isEdge(n)&&(c=!0);a.getModel().isVertex(n)&&(e=!0);if(c&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
-0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(c);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);c=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,c=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,c);e.addListener(mxEvent.UNDO,c);e.addListener(mxEvent.REDO,c);e.addListener(mxEvent.CLEAR,c);var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);c()};var m=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){m.apply(this,arguments);c()};c()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,h=a.getSelectionCells();if(null!=h)for(var m=0;m<h.length;m++){var p=h[m];a.getModel().isEdge(p)&&(c=!0);a.getModel().isVertex(p)&&(e=!0);if(c&&e)break}h="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
+0;m<h.length;m++)this.actions.get(h[m]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(c);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);c=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
c&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||c&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(c&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(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()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());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);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());
this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight: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 l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&!mxClient.IS_QUIRKS&&(n+=1);var q=0;if(null!=this.sidebarFooterContainer){var t=
-this.footerHeight+k,q=Math.max(0,Math.min(c-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
-null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;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=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=
-this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var h=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(h=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var u=
+this.footerHeight+h,q=Math.max(0,Math.min(c-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+null!=this.hsplit.parentNode?m+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+h+"px";this.hsplit.style.left=m+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
+b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
+this.footerHeight+h+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=h+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+h+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+h+"px",this.formatContainer.style.bottom=
+this.footerHeight+h+"px",this.diagramContainer.style.bottom=this.footerHeight+h+e+"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-2;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};
@@ -2147,64 +2149,64 @@ 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";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");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,e,c){function k(a){if(null!=n){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?f.x-n.x:n.y-f.y)-e));mxEvent.consume(a);q!=h()&&(t=!0,d=null)}}function l(a){k(a);n=q=null}var n=null,q=null,t=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var h=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){n=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=h();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!t){var b=null!=d?d-e:0;d=h();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,n){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,n);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,c){function h(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?f.x-p.x:p.y-f.y)-e));mxEvent.consume(a);q!=g()&&(u=!0,d=null)}}function m(a){h(a);p=q=null}var p=null,q=null,u=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=g();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!u){var b=null!=d?d-e:0;d=g();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,h,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,m)})};EditorUi.prototype.showDialog=function(a,b,e,c,h,m,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,h,m,p);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
-EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(k.container,230,430,!0,!1);k.init()};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),h=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(h.container,230,430,!0,!1);h.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 e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var c=a.lastIndexOf("&lt;/mxGraphModel&gt;");c>e&&(b=a.substring(e,c+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var c=a.lastIndexOf("&lt;/mxGraphModel&gt;");c>e&&(b=a.substring(e,c+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(h){}return b};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
(b=e);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(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,e){var c=this.editor.graph;if(c.isEnabled()){c.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var n=new Image;n.onload=function(){e(l,n.width,n.height)};n.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};n.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,b,e){var c=this.editor.graph;if(c.isEnabled()){c.getModel().beginUpdate();try{a()}catch(h){throw h;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var h=c.saveSelection(),m=mxUtils.prompt(a,b);c.restoreSelection(h);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){e(m,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showBackgroundImageDialog=function(a){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 b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else 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,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){n.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),h=0;h<f.length;h++)if(c.getModel().isVertex(f[h])&&c.isCellResizable(f[h])){var e=c.getCellGeometry(f[h]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[h],e))}}finally{c.getModel().endUpdate()}}else f=
-c.getSelectionCell(),h=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(h)),null!=e&&e.constructor==mxStackLayout?(e=h.getIndex(f),37==a||38==a?c.model.add(h,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(h,f,Math.min(c.model.getChildCount(h),e+1))):(h=f=0,37==a?f=-d:38==a?h=-d:39==a?f=d:40==a&&(h=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,h))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-n.length){c.getModel().beginUpdate();try{for(var a=0;a<n.length;a++)n[a]();n=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!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)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var n=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,h={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
-80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var f=h[a.keyCode];if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=t[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
-c.connectVertex(c.getSelectionCell(),t[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return d.apply(this,
-arguments)};k.bindAction=mxUtils.bind(this,function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):c?k.bindShiftKey(a,b):k.bindKey(a,b))});var f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,
-!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),k.bindControlKey(35,function(){c.isEnabled()&&c.foldCells(!1)}),k.bindControlKey(13,function(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,
-"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,
-"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",
-!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){c.isEnabled()&&c.startEditingAtCell()}),k.bindKey(113,function(){c.isEnabled()&&c.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){p.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),g=0;g<f.length;g++)if(c.getModel().isVertex(f[g])&&c.isCellResizable(f[g])){var e=c.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[g],e))}}finally{c.getModel().endUpdate()}}else f=
+c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
+p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,h=new mxKeyHandler(c),m=h.isEventIgnored;h.isEventIgnored=function(a){return(!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)};h.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};h.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=h.getFunction,g={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
+80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var f=g[a.keyCode];if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=u[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
+c.connectVertex(c.getSelectionCell(),u[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return d.apply(this,
+arguments)};h.bindAction=mxUtils.bind(this,function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?h.bindControlShiftKey(a,b):h.bindControlKey(a,b):c?h.bindShiftKey(a,b):h.bindKey(a,b))});var f=h.escape;h.escape=function(a){f.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){c.exitGroup()});h.bindControlShiftKey(35,function(){c.enterGroup()});h.bindKey(36,function(){c.home()});h.bindKey(35,function(){c.refresh()});h.bindAction(107,
+!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(80,!0,"print");h.bindAction(79,!0,"outline",!0);h.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)h.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),h.bindControlKey(35,function(){c.isEnabled()&&c.foldCells(!1)}),h.bindControlKey(13,function(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(46,!1,
+"delete"),h.bindAction(46,!0,"deleteAll"),h.bindAction(72,!0,"resetView"),h.bindAction(72,!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,!0,
+"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,"toBack",!0),h.bindAction(70,!0,"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,!0,"lockUnlock"),h.bindAction(76,!0,"layers",
+!0),h.bindAction(80,!0,"formatPanel",!0),h.bindAction(85,!0,"underline"),h.bindAction(85,!0,"ungroup",!0),h.bindAction(190,!0,"superscript"),h.bindAction(188,!0,"subscript"),h.bindKey(13,function(){c.isEnabled()&&c.startEditingAtCell()}),h.bindKey(113,function(){c.isEnabled()&&c.startEditingAtCell()});mxClient.IS_WIN?h.bindAction(89,!0,"redo"):h.bindAction(90,!0,"redo",!0);return h};
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);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.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-Graph=function(a,b,e,c,k){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);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){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,n=null,q=null,t=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,n=c,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=n){if(c=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var h=this.selectionCellsHandler.getHandler(c.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var e=h.getHandleForEvent(n),g=this.view.getEdgeStyle(c);f=g==mxEdgeStyle.EntityRelation;d||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=h.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==h.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==g&&null==e||g==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=h.bends.length-1:null!=g&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==g?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),e),t=l=n=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){h=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
-b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))h="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))h="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)g=this.view.getEdgeStyle(c),h="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(g=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
-g<f.length-1&&0<=g&&(h=0==Math.round(f[g].x-f[g+1].x)?"col-resize":"row-resize"));null!=h&&c.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,d){t=l=n=q=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
-this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var h=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=h.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,f=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),p=0;p<g.width;p++)d.push(new mxRectangle(((g.x+p)*f+c.x)*e,(g.y*b+c.y)*e,f*e,b*e));for(p=0;p<g.height;p++)d.push(new mxRectangle((g.x*f+c.x)*e,((g.y+p)*b+c.y)*e,f*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+Graph=function(a,b,e,c,h){mxGraph.call(this,a,b,e,c);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);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){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a);
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var m=null,p=null,q=null,u=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(m=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,p=c,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=m&&null!=q&&null!=p){if(c=q,Math.abs(m.x-b.getGraphX())>f||Math.abs(m.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),k=this.view.getEdgeStyle(c);f=k==mxEdgeStyle.EntityRelation;d||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(m.x,m.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=k&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),u=m=p=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)k=this.view.getEdgeStyle(c),g="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(k=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
+k<f.length-1&&0<=k&&(g=0==Math.round(f[k].x-f[k+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){u=m=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,f=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),n=0;n<k.width;n++)d.push(new mxRectangle(((k.x+n)*f+c.x)*e,(k.y*b+c.y)*e,f*e,b*e));for(n=0;n<k.height;n++)d.push(new mxRectangle((k.x*f+c.x)*e,((k.y+n)*b+c.y)*e,f*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,d){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)};this.graphHandler.getCells=function(a){for(var d=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]),f=null!=f?f.style:this.graph.getCellStyle(d[c]);
"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var f=new mxRubberband(this);
-this.getRubberband=function(){return f};var p=(new Date).getTime(),m=0,g=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;g.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),m=0):m=(new Date).getTime()-p};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<m||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&w.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var r=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(r=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=r)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||a.isConsumed())return z.apply(this,
-arguments);d=d?a.sourceState.cell:a.getCell();if(null!=d){var b=this.getLinkForCell(d);null!=b&&(this.isPageLink(b)?this.pageLinkClicked(d,b):this.openLink(b))}};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};var A=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
-this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return A.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,h){h=null!=h?h:[];if(0<b||0<c){var e=this.getModel(),g=a+b,p=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),O=0;O<m;O++){var u=e.getChildAt(f,O),
-r=this.view.getState(u);if(null!=r&&this.isCellVisible(u)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var v=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(r=mxUtils.getBoundingBox(r,v));(e.isEdge(u)||e.isVertex(u))&&r.x>=a&&r.y+r.height<=p&&r.y>=d&&r.x+r.width<=g&&h.push(u);this.getAllCells(a,d,b,c,u,h)}}}return h};var x=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:x.apply(this,
-arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);F=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored=
-function(a,d){return d&&a.view.graph.isCellSelected(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 y=this.updateMouseEvent;this.updateMouseEvent=function(a){a=y.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
+this.getRubberband=function(){return f};var t=(new Date).getTime(),n=0,l=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;l.apply(this,arguments);a!=this.currentState?(t=(new Date).getTime(),n=0):n=(new Date).getTime()-t};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&w.apply(this,arguments)};var k=this.isToggleEvent;this.isToggleEvent=function(a){return k.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var r=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(r=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=r)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var E=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||a.isConsumed())return E.apply(this,
+arguments);d=d?a.sourceState.cell:a.getCell();if(null!=d){var b=this.getLinkForCell(d);null!=b&&(this.isPageLink(b)?this.pageLinkClicked(d,b):this.openLink(b))}};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};var G=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
+this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return G.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),k=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var l=e.getChildCount(f),t=0;t<l;t++){var r=e.getChildAt(f,t),
+v=this.view.getState(r);if(null!=v&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(v.style,"locked","0")){var h=mxUtils.getValue(v.style,mxConstants.STYLE_ROTATION)||0;0!=h&&(v=mxUtils.getBoundingBox(v,h));(e.isEdge(r)||e.isVertex(r))&&v.x>=a&&v.y+v.height<=n&&v.y>=d&&v.x+v.width<=k&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:H.apply(this,
+arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();C=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f.start(b.x,b.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);C=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+function(a,d){return d&&a.view.graph.isCellSelected(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 x=this.updateMouseEvent;this.updateMouseEvent=function(a){a=x.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
null);return a}}};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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,e){e=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" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
-Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,n=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,n,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,h=!0,m=null,p=mxUtils.bind(this,function(a){h=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){h=h&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(d){if(h)for(var b=mxEvent.getSource(d);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
Graph.prototype.openLink=function(a,b){var e=window;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 c=a.split("#")[1];window.location.hash=="#"+c&&(window.location.hash="");window.location.hash=c}else e=window.open(a,b);return e};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,b){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",b))};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)};
@@ -2213,42 +2215,42 @@ Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutMana
"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",
30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",
mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};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 e=Math.ceil(b.x/this.view.scale-this.view.translate.x),c=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(c/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((c+Math.floor(b.height/this.view.scale))/a.height)-l)};
+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 e=Math.ceil(b.x/this.view.scale-this.view.translate.x),c=Math.ceil(b.y/this.view.scale-this.view.translate.y),h=Math.floor(e/a.width),m=Math.floor(c/a.height);return new mxRectangle(h,m,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-h,Math.ceil((c+Math.floor(b.height/this.view.scale))/a.height)-m)};
Graph.prototype.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.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!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)&&!mxClient.IS_MAC||null!=this.panningHandler&&this.panningHandler.isActive()};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&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.view.getState(a),b=null!=b?b.style:this.getCellStyle(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.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,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,n=function(a,d){a=String(a);for(d=d||2;a.length<d;)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(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",t=a[q+"Date"](),d=a[q+"Day"](),h=a[q+"Month"](),f=a[q+"FullYear"](),p=a[q+"Hours"](),m=a[q+"Minutes"](),g=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),u={d:t,dd:n(t),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:h+1,mm:n(h+1),mmm:c.i18n.monthNames[h],mmmm:c.i18n.monthNames[h+
-12],yy:String(f).slice(2),yyyy:f,h:p%12||12,hh:n(p%12||12),H:p,HH:n(p),M:m,MM:n(m),s:g,ss:n(g),l:n(q,3),L:n(99<q?Math.round(q/10):q),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<w?"-":"+")+n(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,h=/\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,d){a=String(a);for(d=d||2;a.length<d;)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(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),d=a[q+"Day"](),g=a[q+"Month"](),f=a[q+"FullYear"](),t=a[q+"Hours"](),n=a[q+"Minutes"](),l=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),k={d:u,dd:p(u),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:g+1,mm:p(g+1),mmm:c.i18n.monthNames[g],mmmm:c.i18n.monthNames[g+
+12],yy:String(f).slice(2),yyyy:f,h:t%12||12,hh:p(t%12||12),H:t,HH:p(t),M:n,MM:p(n),s:l,ss:p(l),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>t?"a":"p",tt:12>t?"am":"pm",T:12>t?"A":"P",TT:12>t?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(m,""),o:(0<w?"-":"+")+p(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in k?k[a]:a.slice(1,
a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)(function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(c)&&(k.setAttribute("checked","checked"),k.defaultChecked=
-!0);e.appendChild(k);var q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var n=k.substring(1,k.length-1);if(0>n.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(n)?null!=q.getAttribute(n)?q.getAttribute(n):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(c,
-match.index)+(null!=l?l:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var 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(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,t=this.view.translate,d=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(d=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+n.x*q,t+n.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
-null));if(k=!mxEvent.isShiftDown(c)||k)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;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var d=a,h=this.getCellGeometry(a);null!=
-h&&h.relative;)d=this.getModel().getParent(d),h=this.getCellGeometry(d);var f=this.view.getState(d),p=null!=f?f.style:this.getCellStyle(d);if(mxUtils.getValue(p,"part",!1)){var m=this.model.getParent(d);this.model.isVertex(m)&&(d=m)}q=this.duplicateCells([d],!1)[0];h=this.getCellGeometry(q);null!=h&&(h.x=n.x-h.width/2,h.y=n.y-h.height/2)}h=null;null!=this.layoutManager&&(h=this.layoutManager.getLayout(this.model.getParent(a)));var g=mxEvent.isControlDown(c)&&k||null==l&&null!=h&&h.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=g&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=g.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==g.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,g,w))}null==l&&null!=q&&null!=h&&null!=a.parent&&h.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,
-q,w));null!=g&&e.push(g);null==l&&null!=q&&e.push(q);null==q&&null!=g&&g.geometry.setTerminalPoint(n,!1);null!=g&&this.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)(function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var h=document.createElement("input");h.style.display="inline-block";h.setAttribute("type","checkbox");b.isVisible(c)&&(h.setAttribute("checked","checked"),h.defaultChecked=
+!0);e.appendChild(h);var q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(h,"click",function(){null!=h.getAttribute("checked")?h.removeAttribute("checked"):h.setAttribute("checked","checked");b.setVisible(c,h.checked)})})(b.getChildAt(b.root,c));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var h=match[0];if(2<h.length&&"%label%"!=h&&"%tooltip%"!=h){var m=null;if(match.index>c&&"%"==b.charAt(match.index-1))m=h.substring(1);else{var p=h.substring(1,h.length-1);if(0>p.indexOf("{"))for(var q=a;null==m&&null!=q;)null!=q.value&&"object"==typeof q.value&&(m=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==m&&(m=this.getGlobalVariable(p))}e.push(b.substring(c,
+match.index)+(null!=m?m:h));c=match.index+h.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
+Graph.prototype.connectVertex=function(a,b,e,c,h,m){m=m?m:!1;var p=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(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
+var q=this.view.scale,u=this.view.translate,d=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(d=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(c)&&!h?null:this.getCellAt(d+p.x*q,u+p.y*q);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),q=this.view.getState(m),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(m=
+null));if(h=!mxEvent.isShiftDown(c)||h)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];this.model.beginUpdate();try{q=m;if(null==q&&h){for(var d=a,g=this.getCellGeometry(a);null!=
+g&&g.relative;)d=this.getModel().getParent(d),g=this.getCellGeometry(d);var f=this.view.getState(d),t=null!=f?f.style:this.getCellStyle(d);if(mxUtils.getValue(t,"part",!1)){var n=this.model.getParent(d);this.model.isVertex(n)&&(d=n)}q=this.duplicateCells([d],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=p.x-g.width/2,g.y=p.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var l=mxEvent.isControlDown(c)&&h||null==m&&null!=g&&g.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=l.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==l.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,l,w))}null==m&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,
+q,w));null!=l&&e.push(l);null==m&&null!=q&&e.push(q);null==q&&null!=l&&l.geometry.setTerminalPoint(p,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}return e};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,c=null;null==c&&null!=e;)null!=e.value&&"object"==typeof e.value&&(c=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return c||""}return a.value.getAttribute("label")}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.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var c=this.layoutManager.getLayout(this.model.getParent(a));null!=c&&c.constructor==mxStackLayout&&(c.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var n=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=n&&null!=q){var t=Math.round(q.width-n.width/this.view.scale),d=Math.round(q.height-n.height/this.view.scale);if(0!=d||0!=t){var h=this.model.getParent(e[l]),f=this.layoutManager.getLayout(h);
-null==f?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(n,h,t,d):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(h,f,t,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),n=this.getCellGeometry(k[b]);null!=l&&null!=n&&(n=n.clone(),n.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],n))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),n=this.view.getState(a);null!=n&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,n.width/this.view.scale-l.width):l.height+=c+Math.min(0,n.height/this.view.scale-l.height),this.model.setGeometry(a,
-l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(a,b,e,c,h){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),q=this.getCellGeometry(e[m]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),d=Math.round(q.height-p.height/this.view.scale);if(0!=d||0!=u){var g=this.model.getParent(e[m]),f=this.layoutManager.getLayout(g);
+null==f?null!=h&&this.isMoveCellsEvent(h)&&this.moveSiblings(p,g,u,d):null!=h&&mxEvent.isAltDown(h)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(g,f,u,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<h.length;b++)if(h[b]!=a.cell){var m=this.view.getState(h[b]),p=this.getCellGeometry(h[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(h[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var h=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==h&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,p.width/this.view.scale-m.width):m.height+=c+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.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.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,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!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.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var c=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&c.push({name:a[k].nodeName,value:a[k].nodeValue});c.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(k=0;k<c.length;k++)"link"==c[k].name&&this.isPageLink(c[k].value)||(b+=("link"!=c[k].name?c[k].name+":":"")+mxUtils.htmlEntities(c[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var c=[];this.isEnabled()&&e.push("link");for(var h=0;h<a.length;h++)0>mxUtils.indexOf(e,a[h].nodeName)&&0<a[h].nodeValue.length&&c.push({name:a[h].nodeName,value:a[h].nodeValue});c.sort(function(a,
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(h=0;h<c.length;h++)"link"==c[h].name&&this.isPageLink(c[h].value)||(b+=("link"!=c[h].name?c[h].name+":":"")+mxUtils.htmlEntities(c[h].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(26,14,'<path d="m 1 14 L 13 1 L 26 14 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(14,26,'<path d="m 1 1 L 14 13 L 1 26 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
@@ -2259,7 +2261,7 @@ HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;b
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.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);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,
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,c){b=!1;var e=c.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(c.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
+!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,c){b=!1;var e=c.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var m=this.getState(c.getState());null==m&&mxEvent.isTouchEvent(e)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
this.update(this.getState(c.getState()),c.getGraphX(),c.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.isActive()&&null!=this.mouseDownPoint&&Math.abs(c.getGraphX()-this.mouseDownPoint.x)<this.graph.tolerance&&Math.abs(c.getGraphY()-this.mouseDownPoint.y)<this.graph.tolerance?b||this.click(this.currentState,this.getDirection(),c):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(c.getGraphX(),c.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,c.getGraphX(),c.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};
HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
@@ -2269,14 +2271,14 @@ this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redire
this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,a=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=a&&a.setHandlesVisible(!1))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
-HoverIcons.prototype.click=function(a,b,e){var c=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(c)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,c),this.graph.selectCellsForConnectVertex(a,c,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(c)?this.update(this.getState(this.graph.view.getState(a[1]))):
-this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};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.click=function(a,b,e){var c=e.getEvent(),h=e.getGraphX(),m=e.getGraphY(),h=this.getStateAt(a,h,m);null==h||!this.graph.model.isEdge(h.cell)||mxEvent.isControlDown(c)||h.getVisibleTerminalState(!0)!=a&&h.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,c),this.graph.selectCellsForConnectVertex(a,c,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(c)?this.update(this.getState(this.graph.view.getState(a[1]))):
+this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(h.cell),this.reset());e.consume()};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);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&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
"px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+
"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),c=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==c&&c==a&&(a=c=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==k||c.height<6*k.height&&c.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"});
-l(b,this.arrowRight);l(e,this.arrowLeft);l(c,this.arrowUp);l(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",
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==c&&c==a&&(a=c=e=b=null);var h=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==h||c.height<6*h.height&&c.width<6*h.width)?b.style.visibility="hidden":b.style.visibility="visible"});
+m(b,this.arrowRight);m(e,this.arrowLeft);m(c,this.arrowUp);m(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){a=a.cell;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)}return a};
@@ -2285,23 +2287,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activa
this.reset())}else 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};
(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,d){var c=this.getState(a);null!=c&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,arguments);null!=
c&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,d){return e.apply(this,arguments)||null!=a.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var h=new mxPoint(b,f);h.type=d;c.push(h);h=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==h||h.type!=d||h.x!=b||h.y!=f},m=.5*this.scale,b=!1,c=[],g=0;g<d.length-1;g++){for(var k=d[g+1],u=d[g],v=[],r=d[g+2];g<
-d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,r.x,r.y,k.x,k.y)<1*this.scale*this.scale;)k=r,g++,r=d[g+2];for(var b=e(0,u.x,u.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],n=l.absolutePoints;if(null!=n&&mxUtils.intersects(a,l)&&"1"!=l.style.noJump)for(l=0;l<n.length-1;l++){for(var t=n[l+1],y=n[l],r=n[l+2];l<n.length-2&&mxUtils.ptSegDistSq(y.x,y.y,r.x,r.y,t.x,t.y)<1*this.scale*this.scale;)t=r,l++,r=n[l+2];r=mxUtils.intersection(u.x,u.y,k.x,k.y,y.x,y.y,t.x,t.y);if(null!=r&&(Math.abs(r.x-
-y.x)>m||Math.abs(r.y-y.y)>m)&&(Math.abs(r.x-t.x)>m||Math.abs(r.y-t.y)>m)){t=r.x-u.x;y=r.y-u.y;r={distSq:t*t+y*y,x:r.x,y:r.y};for(t=0;t<v.length;t++)if(v[t].distSq>r.distSq){v.splice(t,0,r);r=null;break}null==r||0!=v.length&&v[v.length-1].x===r.x&&v[v.length-1].y===r.y||v.push(r)}}}for(l=0;l<v.length;l++)b=e(1,v[l].x,v[l].y)||b}r=d[d.length-1];b=e(0,r.x,r.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,h=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),g,q=!0,u=null,v=null;g=[];var r=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var n=
-this.state.routedPoints[l],x=new mxPoint(n.x/this.scale,n.y/this.scale);0==l?x=d[0]:l==this.state.routedPoints.length-1&&(x=d[d.length-1]);var t=!1;if(null!=u&&1==n.type){var y=this.state.routedPoints[l+1],n=y.x/this.scale-x.x,y=y.y/this.scale-x.y,n=n*n+y*y;null==r&&(r=new mxPoint(x.x-u.x,x.y-u.y),v=Math.sqrt(r.x*r.x+r.y*r.y),r.x=r.x*h/v,r.y=r.y*h/v);n>h*h&&0<v&&(n=u.x-x.x,y=u.y-x.y,n=n*n+y*y,n>h*h&&(t=new mxPoint(x.x-r.x,x.y-r.y),n=new mxPoint(x.x+r.x,x.y+r.y),g.push(t),this.addPoints(a,g,b,c,!1,
-null,q),g=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,q=!1,"sharp"==e?(a.lineTo(t.x-r.y*g,t.y+r.x*g),a.lineTo(n.x-r.y*g,n.y+r.x*g),a.lineTo(n.x,n.y)):"arc"==e?(g*=1.3,a.curveTo(t.x-r.y*g,t.y+r.x*g,n.x-r.y*g,n.y+r.x*g,n.x,n.y)):(a.moveTo(n.x,n.y),q=!0),g=[n],t=!0))}else r=null;t||(g.push(x),u=x)}this.addPoints(a,g,b,c,!1,null,q);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
-a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),h=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=e)var u=Math.cos(-e),v=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,v,k);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);f=this.getPerimeterPoint(d,f,0==e&&h,u);0!=e&&(u=Math.cos(e),v=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var h=this.graph.getConnectionPoint(d,a[f]);if(null!=h){var p=(h.x-e.x)*(h.x-e.x)+(h.y-e.y)*(h.y-e.y);if(null==c||p<c)b=h,c=p}}null!=b&&(e=b)}return e};var n=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=n.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
-return new mxShape(new mxStencil(c.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var k=b[c];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l=
-mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(n){null!=window.console&&console.log("error in getStencil:",k,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var e=new mxPoint(b,f);e.type=d;c.push(e);e=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==e||e.type!=d||e.x!=b||e.y!=f},n=.5*this.scale,b=!1,c=[],l=0;l<d.length-1;l++){for(var h=d[l+1],k=d[l],v=[],r=d[l+2];l<
+d.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,h.x,h.y)<1*this.scale*this.scale;)h=r,l++,r=d[l+2];for(var b=e(0,k.x,k.y)||b,q=0;q<this.validEdges.length;q++){var m=this.validEdges[q],p=m.absolutePoints;if(null!=p&&mxUtils.intersects(a,m)&&"1"!=m.style.noJump)for(m=0;m<p.length-1;m++){for(var u=p[m+1],x=p[m],r=p[m+2];m<p.length-2&&mxUtils.ptSegDistSq(x.x,x.y,r.x,r.y,u.x,u.y)<1*this.scale*this.scale;)u=r,m++,r=p[m+2];r=mxUtils.intersection(k.x,k.y,h.x,h.y,x.x,x.y,u.x,u.y);if(null!=r&&(Math.abs(r.x-
+x.x)>n||Math.abs(r.y-x.y)>n)&&(Math.abs(r.x-u.x)>n||Math.abs(r.y-u.y)>n)){u=r.x-k.x;x=r.y-k.y;r={distSq:u*u+x*x,x:r.x,y:r.y};for(u=0;u<v.length;u++)if(v[u].distSq>r.distSq){v.splice(u,0,r);r=null;break}null==r||0!=v.length&&v[v.length-1].x===r.x&&v[v.length-1].y===r.y||v.push(r)}}}for(m=0;m<v.length;m++)b=e(1,v[m].x,v[m].y)||b}r=d[d.length-1];b=e(0,r.x,r.y)||b}a.routedPoints=c;return b}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l,w=!0,k=null,v=null;l=[];var r=null;a.begin();for(var q=0;q<this.state.routedPoints.length;q++){var m=
+this.state.routedPoints[q],p=new mxPoint(m.x/this.scale,m.y/this.scale);0==q?p=d[0]:q==this.state.routedPoints.length-1&&(p=d[d.length-1]);var u=!1;if(null!=k&&1==m.type){var x=this.state.routedPoints[q+1],m=x.x/this.scale-p.x,x=x.y/this.scale-p.y,m=m*m+x*x;null==r&&(r=new mxPoint(p.x-k.x,p.y-k.y),v=Math.sqrt(r.x*r.x+r.y*r.y),r.x=r.x*e/v,r.y=r.y*e/v);m>e*e&&0<v&&(m=k.x-p.x,x=k.y-p.y,m=m*m+x*x,m>e*e&&(u=new mxPoint(p.x-r.x,p.y-r.y),m=new mxPoint(p.x+r.x,p.y+r.y),l.push(u),this.addPoints(a,l,b,c,!1,
+null,w),l=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,w=!1,"sharp"==g?(a.lineTo(u.x-r.y*l,u.y+r.x*l),a.lineTo(m.x-r.y*l,m.y+r.x*l),a.lineTo(m.x,m.y)):"arc"==g?(l*=1.3,a.curveTo(u.x-r.y*l,u.y+r.x*l,m.x-r.y*l,m.y+r.x*l,m.x,m.y)):(a.moveTo(m.x,m.y),w=!0),l=[m],u=!0))}else r=null;u||(l.push(p),k=p)}this.addPoints(a,l,b,c,!1,null,w);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
+a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),h=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=g)var k=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,k,v,h);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);f=this.getPerimeterPoint(d,f,0==g&&e,k);0!=g&&(k=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,k,v,h));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var t=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||t<c)b=g,c=t}}null!=b&&(e=b)}return e};var p=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
+return new mxShape(new mxStencil(c.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var h=b[c];if(".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,null);else if(".js"==h.toLowerCase().substring(h.length-3,h.length))try{if(mxStencilRegistry.allowEval){var m=
+mxUtils.load(h);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",h,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(n){null!=window.console&&console.log("error in loadStencilSet:",a,n)}null!=k&&null!=
-k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};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,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var n=c.getAttribute("w"),
-q=c.getAttribute("h"),n=null==n?80:parseInt(n,10),q=null==q?80:parseInt(q,10);b(k,l,a,n,q)}}c=c.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,e,c){var h=mxStencilRegistry.packages[a];if(null!=e&&e||null==h){var m=!1;if(null==h)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,m=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,m))}));return}h=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=h;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=h&&null!=
+h.documentElement&&mxStencilRegistry.parseStencilSet(h.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,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,h="";a=a.getAttribute("name");for(null!=a&&(h=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var h=h.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(h+m.toLowerCase(),new mxStencil(c));if(null!=b){var p=c.getAttribute("w"),
+q=c.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(h,m,a,p,q)}}c=c.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}mxConstants.HANDLE_FILLCOLOR="#99ccff";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=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
b.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));
@@ -2309,72 +2311,72 @@ for(var d in this.graph.currentEdgeStyle)a.style[d]=this.graph.currentEdgeStyle[
a.getCell=mxUtils.bind(this,function(a){var b=d.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+
this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"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.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.importGraphModel=function(a,d,b,c){d=null!=d?
-d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var h={},g=0;g<a;g++){var p=e.getChildAt(e.getRoot(),g);if(1!=a||this.isCellLocked(this.getDefaultParent()))p=this.importCells([p],0,0,this.model.getRoot(),null,h)[0],m=this.model.getChildren(p),this.moveCells(m,d,b),f=f.concat(m);else var m=e.getChildren(p),f=f.concat(this.importCells(m,d,b,this.getDefaultParent(),
-null,h))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,d-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(X){}return c}if(null!=
+d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},k=0;k<a;k++){var n=e.getChildAt(e.getRoot(),k);if(1!=a||this.isCellLocked(this.getDefaultParent()))n=this.importCells([n],0,0,this.model.getRoot(),null,g)[0],l=this.model.getChildren(n),this.moveCells(l,d,b),f=f.concat(l);else var l=e.getChildren(n),f=f.concat(this.importCells(l,d,b,this.getDefaultParent(),
+null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var r=this.getBoundingBoxFromGeometry(f,!0);null!=r&&this.moveCells(f,d-r.x,b-r.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(X){}return c}if(null!=
a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a]))}};
Graph.prototype.isValidRoot=function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(d,"dropTarget",
"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),h=d.getTerminal(f,!1);d.setTerminal(f,h,!0);d.setTerminal(f,e,!1);var g=d.getGeometry(f);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var p=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);
-g.setTerminalPoint(p,!1);g.setTerminalPoint(m,!0);d.setGeometry(f,g);var u=this.view.getState(f),r=this.view.getState(e),v=this.view.getState(h);if(null!=u){var O=null!=r?this.getConnectionConstraint(u,r,!0):null,k=null!=v?this.getConnectionConstraint(u,v,!1):null;this.setConnectionConstraint(f,e,!0,k);this.setConnectionConstraint(f,h,!1,O)}b.push(f)}}else if(d.isVertex(f)&&(g=this.getCellGeometry(f),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var q=g.width;g.width=g.height;
-g.height=q;d.setGeometry(f,g);var w=this.view.getState(f);if(null!=w){var l=w.style[mxConstants.STYLE_DIRECTION]||"east";"east"==l?l="south":"south"==l?l="west":"west"==l?l="north":"north"==l&&(l="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,l,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
+arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var k=d.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var n=k.getTerminalPoint(!0),l=k.getTerminalPoint(!1);
+k.setTerminalPoint(n,!1);k.setTerminalPoint(l,!0);d.setGeometry(f,k);var r=this.view.getState(f),t=this.view.getState(e),v=this.view.getState(g);if(null!=r){var Q=null!=t?this.getConnectionConstraint(r,t,!0):null,h=null!=v?this.getConnectionConstraint(r,v,!1):null;this.setConnectionConstraint(f,e,!0,h);this.setConnectionConstraint(f,g,!1,Q)}b.push(f)}}else if(d.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var w=k.width;k.width=k.height;
+k.height=w;d.setGeometry(f,k);var q=this.view.getState(f);if(null!=q){var m=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==m?m="south":"south"==m?m="west":"west"==m?m="north":"north"==m&&(m="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,m,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
if(0<d.length)for(var b=0;b<d.length;b++)this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!1,!1)}};Graph.prototype.replaceElement=function(a,d){for(var b=a.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.updateLabelElements=function(a,d,b){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),f=
-0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var h=c.getElementsByTagName(null!=b?b:"*"),g=0;g<h.length;g++)d(h[g]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),
+0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var g=c.getElementsByTagName(null!=b?b:"*"),k=0;k<g.length;k++)d(g[k]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),
f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(c)){this.setAttributeForCell(f,c,d);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",d);d=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(var c=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||
-d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),h=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&h==mxConstants.NONE){e=!0;for(h=0;h<this.model.getChildCount(f.cell)&&e;h++)d.get(this.model.getChildAt(f.cell,h))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,
+d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)d.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,
arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var d=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var c=this.view.getState(a[b]);if(null!=c){var f=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&c==mxConstants.NONE&&d.push(a[b])}}a=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,d){this.setAttributeForCell(a,
"link",d)};Graph.prototype.setTooltipForCell=function(a,d){this.setAttributeForCell(a,"tooltip",d)};Graph.prototype.setAttributeForCell=function(a,d,b){var c;null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=b&&0<b.length?c.setAttribute(d,b):c.removeAttribute(d);this.model.setValue(a,c)};Graph.prototype.getDropTarget=function(a,d,b,c){this.getModel();if(mxEvent.isAltDown(d))return null;
for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,d){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?
this.view.getState(d):null,f=mxEvent.getSource(a);this.firstClickState!=c||this.firstClickSource!=f||null!=c&&null!=c.text&&null!=c.text.node&&(mxUtils.contains(c.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(a)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(d=this.addText(b.x,b.y,c))}mxGraph.prototype.dblClick.call(this,
a,d)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),f=this.getPageSize(),d=Math.max(d,c.x*f.width),b=Math.max(b,c.y*f.height);return new mxPoint(this.snap(d+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,d=this.getGraphBounds(),b=this.getInsertPoint(),c=this.snap(Math.round(Math.max(b.x,
-d.x/a.scale-a.translate.x+(0==d.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+(0==d.height?1:2)*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;resizable=0;points=[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b){c.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";c.geometry.relative=
+d.x/a.scale-a.translate.x+(0==d.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;resizable=0;points=[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b){c.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";c.geometry.relative=
!0;c.connectable=!1;var f=this.view.getRelativePoint(b,a,d);c.geometry.x=Math.round(1E4*f.x)/1E4;c.geometry.y=Math.round(f.y);c.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,c.geometry),e=this.view.scale;c.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((d-f.y)/e))}else c.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(a/this.view.scale)-f.x,c.geometry.y=Math.round(d/this.view.scale)-
f.y;this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};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.addClickHandler=function(a,d,b){var c=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");
-if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),h=this,g={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
-a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-
-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!h.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),g=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-
-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(g)||mxEvent.isMiddleMouseButton(g))&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(f=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(g,this.currentLink),mxEvent.isConsumed(g)||(g=mxEvent.isMiddleMouseButton(g)?"_blank":f?h.linkTarget:"_top",h.openLink(this.currentLink,
-g),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&(h.container.style.cursor=
-f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};h.click=function(a){};h.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),h=0;h<a.length;h++){var g=b.getParent(a[h]),p=this.moveCells([e[h]],c,c,!1)[0];
-f.push(p);if(d)b.add(g,e[h]);else{var m=g.getIndex(a[h]);b.add(g,e[h],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};
+if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
+a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-
+d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!g.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),k=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-
+g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=mxEvent.isMiddleMouseButton(k)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,
+k),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=
+f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var k=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1)[0];
+f.push(n);if(d)b.add(k,e[g]);else{var l=k.getIndex(a[g]);b.add(k,e[g],l+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};
Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());
-if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var h=this.view.getState(d[e]);if(null!=h){var g=a?h.getCenterX():h.getCenterY(),c=null!=c?Math.max(c,g):g,f=null!=f?Math.min(f,g):g;b.push(h)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});h=this.view.translate;g=this.view.scale;f=f/g-(a?h.x:h.y);c=c/g-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var p=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),
-u=this.getCellGeometry(b[e].cell),c=c+p;null!=u&&null!=m&&(u=u.clone(),a?u.x=Math.round(c-u.width/2)-m.origin.x:u.y=Math.round(c-u.height/2)-m.origin.y,this.getModel().setGeometry(b[e].cell,u))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=
+if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var k=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,k):k,f=null!=f?Math.min(f,k):k;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});g=this.view.translate;k=this.view.scale;f=f/k-(a?g.x:g.y);c=c/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var l=this.view.getState(this.model.getParent(b[e].cell)),
+r=this.getCellGeometry(b[e].cell),c=c+n;null!=r&&null!=l&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-l.origin.x:r.y=Math.round(c-r.height/2)-l.origin.y,this.getModel().setGeometry(b[e].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=
this.view.getState(a[c]);if(null!=f){var e=this.getCellGeometry(d[c]);null==e||!e.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(e,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});
-return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,h,g){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;h=null!=h?h:!0;c=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,m=mxUtils.createXmlDocument(),u=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+
-a));null==m.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/p;u.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");u.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");u.setAttribute("version","1.1");var r=u;f&&(r=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),r.setAttribute("transform",
-"translate(0.5,0.5)"),u.appendChild(r));m.appendChild(u);m=this.createSvgCanvas(r);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=f?-.5:0;m.translate(Math.floor((b/d-c.x)/p),Math.floor((b/d-c.y)/p));var v=document.createElement("textarea"),k=m.createAlternateContent;m.createAlternateContent=function(a,d,b,c,f,e,h,g,m,p,u,r,q){var w=this.state;if(null!=this.foAltText&&(0==c||0!=w.fontSize&&e.length<5*c/w.fontSize)){var l=this.createElement("text");l.setAttribute("x",Math.round(c/2));l.setAttribute("y",
-Math.round((f+w.fontSize)/2));l.setAttribute("fill",w.fontColor||"black");l.setAttribute("text-anchor","middle");l.setAttribute("font-size",Math.round(w.fontSize)+"px");l.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&l.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&l.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.setAttribute("text-decoration",
-"underline");try{return v.innerHTML=e,l.textContent=v.value,l}catch(Ba){return k.apply(this,arguments)}}else return k.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=p/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&m.image(d.x,d.y,b.width,b.height,b.src,!0));m.scale(a);m.textEnabled=h;g=null!=g?g:this.createSvgImageExport();var q=g.drawCellState;g.drawCellState=function(a,d){(e||a.view.graph.isCellSelected(a.cell))&&q.apply(this,arguments)};
-g.drawState(this.getView().getState(this.model.root),m);return u};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;
+return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,k){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;c=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var n=this.view.scale,l=mxUtils.createXmlDocument(),r=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=r.style?r.style.backgroundColor=a:r.setAttribute("style","background-color:"+
+a));null==l.createElementNS?(r.setAttribute("xmlns",mxConstants.NS_SVG),r.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/n;r.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");r.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");r.setAttribute("version","1.1");var t=r;f&&(t=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),t.setAttribute("transform",
+"translate(0.5,0.5)"),r.appendChild(t));l.appendChild(r);l=this.createSvgCanvas(t);l.foOffset=f?-.5:0;l.textOffset=f?-.5:0;l.imageOffset=f?-.5:0;l.translate(Math.floor((b/d-c.x)/n),Math.floor((b/d-c.y)/n));var v=document.createElement("textarea"),h=l.createAlternateContent;l.createAlternateContent=function(a,d,b,c,f,e,g,k,n,l,r,t,w){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&e.length<5*c/q.fontSize)){var m=this.createElement("text");m.setAttribute("x",Math.round(c/2));m.setAttribute("y",
+Math.round((f+q.fontSize)/2));m.setAttribute("fill",q.fontColor||"black");m.setAttribute("text-anchor","middle");m.setAttribute("font-size",Math.round(q.fontSize)+"px");m.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&m.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&m.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&m.setAttribute("text-decoration",
+"underline");try{return v.innerHTML=e,m.textContent=v.value,m}catch(Ba){return h.apply(this,arguments)}}else return h.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=n/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&l.image(d.x,d.y,b.width,b.height,b.src,!0));l.scale(a);l.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var w=k.drawCellState;k.drawCellState=function(a,d){(e||a.view.graph.isCellSelected(a.cell))&&w.apply(this,arguments)};
+k.drawState(this.getView().getState(this.model.root),l);return r};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;
a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),
f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=
a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=
function(a,d){d=null!=d?d:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});
var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=
-this.fireMouseEvent;this.fireMouseEvent=function(a,e,h){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&
+this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&
(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(R){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var n=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){n.apply(this,
+document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(R){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
+"1"));h.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?m.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){p.apply(this,
arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||
mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=
a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}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)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"),b=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(d?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
-this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=h?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(d?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
+"1"),b=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(d?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
+this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,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 k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>"));k=this.graph.sanitizeHtml(d?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
+this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,
-"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};
+"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",u.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(O){}};var h=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(h.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,
+this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Q){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=
-function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var f=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,d,b,c,e,h){mxEvent.isAltDown(h)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/
+function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var f=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,d,b,c,e,g){mxEvent.isAltDown(g)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/
c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!mxEvent.isControlDown(d.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,d){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(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};
-var p=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=p.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
+var t=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=t.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(d=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/d)+" x "+this.roundLength(this.bounds.height/d)),d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==d&&(d=this.bounds),this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=d.y+d.height+12+"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="")};mxEdgeHandler.prototype.updateHint=function(d,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-c.x),c=this.roundLength(b.y/f-c.y);this.hint.innerHTML=e+", "+c;this.hint.style.visibility=
"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
@@ -2387,106 +2389,106 @@ Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((n
(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing=
-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=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=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null==
-a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var m=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){m.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&
-(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};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.mouseUp=function(a,d){var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,h=null;null!=this.first&&
-null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,h=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),g=
-this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<g.length;b++)if(this.graph.isCellMovable(g[b])){var m=this.graph.view.getState(g[b]),p=this.graph.getCellGeometry(g[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(e,h),this.graph.model.setGeometry(g[b],p))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
-this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(f)>h||Math.abs(e)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),
+a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var n=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){n.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&
+(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};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.mouseUp=function(a,d){var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&&
+null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),k=
+this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<k.length;b++)if(this.graph.isCellMovable(k[b])){var n=this.graph.view.getState(k[b]),l=this.graph.getCellGeometry(k[b]);null!=n&&null!=l&&(l=l.clone(),l.translate(e,g),this.graph.model.setGeometry(k[b],l))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
+this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),
this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=b-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)),d.consume()}};var g=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);g.apply(this,
-arguments)};var w=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){v.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),u=0):u=(new Date).getTime()-w;this.currentTerminalState=b};var r=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||
+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)),d.consume()}};var l=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);l.apply(this,
+arguments)};var w=(new Date).getTime(),k=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){v.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),k=0):k=(new Date).getTime()-w;this.currentTerminalState=b};var r=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<k||(null==this.currentTerminalState||
"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&r.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),
-f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var A=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return A.apply(this,
-arguments)};var x=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):x.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;
-mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
-this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(a,d){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
+f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var E=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return E.apply(this,arguments)};var G=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return G.apply(this,
+arguments)};var H=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):H.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;
+mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
+this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var x=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){x.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var y=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(a,d){y.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
d()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,b){if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=
this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c=
document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/edit.gif");c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));c=document.createElement("img");c.setAttribute("src",Dialog.prototype.clearImage);
c.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));c.setAttribute("width","13");c.setAttribute("height","10");c.style.marginLeft="4px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(c=0;c<b.length;c++){var f=document.createElement("div");f.style.marginTop=null!=d||0<c?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"),
-mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var L=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){L.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!=
+mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var I=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){I.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.selectionHandler=mxUtils.bind(this,function(d,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(d,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,
-this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var C=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){C.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this);
+this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this);
if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=d&&(b=Math.max(b,
-d.y+d.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(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(){J.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var W=mxEdgeHandler.prototype.redrawHandles;
+d.y+d.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(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var D=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(){K.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var W=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(W.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+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function d(){mxActor.call(this)}function h(){mxActor.call(this)}function f(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function g(a,d){this.canvas=
-a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,g.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function r(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function y(){mxShape.call(this)}function D(){mxShape.call(this)}
-function G(){mxEllipse.call(this)}function L(){mxShape.call(this)}function C(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function J(){mxShape.call(this)}function W(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function O(){mxDoubleEllipse.call(this)}function M(){mxArrowConnector.call(this);this.spacing=0}function H(){mxArrowConnector.call(this);this.spacing=0}function R(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}
-function P(){mxActor.call(this)}function X(){mxActor.call(this)}function B(){mxActor.call(this)}function V(){mxActor.call(this)}function N(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function ha(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,h,g,m,p){h+=m;var la=c.clone();c.x-=f*(2*h+m);c.y-=e*(2*h+m);f*=h+m;e*=h+m;return function(){a.ellipse(la.x-f-h,la.y-e-h,2*h,2*h);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
+this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function d(){mxActor.call(this)}function g(){mxActor.call(this)}function f(){mxActor.call(this)}function t(){mxActor.call(this)}function n(){mxActor.call(this)}function l(a,d){this.canvas=
+a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function r(){mxActor.call(this)}function E(){mxActor.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function x(){mxShape.call(this)}function y(){mxShape.call(this)}
+function B(){mxEllipse.call(this)}function I(){mxShape.call(this)}function z(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function D(){mxShape.call(this)}function K(){mxShape.call(this)}function W(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function M(){mxArrowConnector.call(this);this.spacing=0}function J(){mxArrowConnector.call(this);this.spacing=0}function R(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}
+function O(){mxActor.call(this)}function X(){mxActor.call(this)}function A(){mxActor.call(this)}function V(){mxActor.call(this)}function N(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
+function ha(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,k,n,l){g+=n;var la=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(la.x-f-g,la.y-e-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d,f),a.lineTo(d,d),a.lineTo(0,0),a.moveTo(d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(d,f),a.lineTo(0,f-d),a.lineTo(0,0),a.close());a.end()};a.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",
a);var xa=Math.tan(mxUtils.toRadians(30)),pa=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/xa);a.translate((c-d)/2,(f-d)/2+d/4);a.moveTo(0,.25*d);a.lineTo(.5*d,d*pa);a.lineTo(d,.25*d);a.lineTo(.5*d,(.5-pa)*d);a.lineTo(0,.25*d);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(c,f/(.5+xa));e?(a.moveTo(0,.25*d),a.lineTo(.5*
d,(.5-pa)*d),a.lineTo(d,.25*d),a.moveTo(.5*d,(.5-pa)*d),a.lineTo(.5*d,(1-pa)*d)):(a.translate((c-d)/2,(f-d)/2),a.moveTo(0,.25*d),a.lineTo(.5*d,d*pa),a.lineTo(d,.25*d),a.lineTo(d,.75*d),a.lineTo(.5*d,(1-pa)*d),a.lineTo(0,.75*d),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(c,mxCylinder);c.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||
(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,-d);e||(a.moveTo(0,d),a.curveTo(0,-d/3,c,-d/3,c,d),a.lineTo(c,f-d),a.curveTo(c,f+d/3,0,f+d/3,0,f-d),a.close())};c.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",
-c);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5*
-c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
-e?"left"==h?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==h?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",n);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*
-c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",
-t);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};d.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();
-a.end()};mxCellRenderer.registerShape("document",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",h);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded,
-b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};
-mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",m);g.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};g.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)};g.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};g.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};g.prototype.arcTo=function(a,d,b,c,f,e,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=
-h};g.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var h=Math.round(e/10),la=this.defaultVariation;5>h&&(h=5,la/=3);for(var g=b(a-this.lastX)*c/h,b=b(d-this.lastY)*f/h,c=c/e,f=f/e,e=0;e<h;e++){var m=(Math.random()-.5)*la;this.originalLineTo.call(this.canvas,
-g*e+this.lastX-m*f,b*e+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};g.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};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
-function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new g(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};
+c);mxUtils.extend(h,mxCylinder);h.prototype.size=30;h.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",h);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5*
+c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
+e?"left"==g?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==g?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*
+c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",
+u);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};d.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();
+a.end()};mxCellRenderer.registerShape("document",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",g);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded,
+b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(t,mxActor);t.prototype.size=.5;t.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};
+mxCellRenderer.registerShape("curlyBracket",t);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",n);l.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};l.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)};l.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};l.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};l.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=
+g};l.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),k=this.defaultVariation;5>g&&(g=5,k/=3);for(var la=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*k;this.originalLineTo.call(this.canvas,
+la*e+this.lastX-n*f,b*e+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};l.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};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
+function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new l(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};
var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)?e=Math.min(c/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(c*e,f*e)),a.moveTo(d+e,b),a.lineTo(d+c-e,b),a.quadTo(d+c,b,d+c,b+e),a.lineTo(d+c,b+f-e),a.quadTo(d+c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d,
b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.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 d=
-a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};w.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*h,f*h));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground=
-function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),h=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+g),f-b),new mxPoint(h,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
+a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};w.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(k,mxRectangleShape);k.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};k.prototype.paintForeground=
+function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",k);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+k),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
v);mxUtils.extend(r,mxActor);r.prototype.size=.2;r.prototype.fixedSize=20;r.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-
-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],
-this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",A);var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
+d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],
+this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",G);var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ca.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ca.apply(this,[a,d,
-b,c,f]))}};mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};x.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,h;do{h=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=h){var g=this.style["symbol"+e+"Align"],la=this.style["symbol"+e+"VerticalAlign"],m=this.style["symbol"+e+"Width"],p=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||u,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth,
-f+this.strokewidth),u+=v,r+=v);var v=d,k=b,v=g==mxConstants.ALIGN_CENTER?v+(c-m)/2:g==mxConstants.ALIGN_RIGHT?v+(c-m-u):v+u,k=la==mxConstants.ALIGN_MIDDLE?k+(f-p)/2:la==mxConstants.ALIGN_BOTTOM?k+(f-p-r):k+r;a.save();g=new h;g.style=this.style;h.prototype.paintVertexShape.call(g,a,v,k,m,p);a.restore()}e++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",x);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,d,b,c,f,e){e?
-(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(y,mxShape);y.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};
-mxCellRenderer.registerShape("umlActor",y);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};D.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,d,
-b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(C,mxShape);C.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
-a.height/8,a.width,7*a.height/8)};C.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,f/8,c,7*f/8);a.fillAndStroke()};C.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",C);mxUtils.extend(I,mxRectangleShape);I.prototype.size=40;I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=
-function(a){var d=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,d)};I.prototype.paintBackground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=I&&(h=new h,
-h.apply(this.state),a.save(),h.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};I.prototype.paintForeground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",I);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=
-10;E.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))};E.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,h=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
-mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+h,b);a.lineTo(d+h,b+Math.max(0,g-1.5*e));a.lineTo(d+Math.max(0,h-e),b+g);a.lineTo(d,b+g);a.close();a.fillAndStroke();a.begin();
-a.moveTo(d+h,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=I.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
+b,c,f]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};H.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var k=this.style["symbol"+e+"Align"],n=this.style["symbol"+e+"VerticalAlign"],l=this.style["symbol"+e+"Width"],la=this.style["symbol"+e+"Height"],r=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||r,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth,
+f+this.strokewidth),r+=v,t+=v);var v=d,h=b,v=k==mxConstants.ALIGN_CENTER?v+(c-l)/2:k==mxConstants.ALIGN_RIGHT?v+(c-l-r):v+r,h=n==mxConstants.ALIGN_MIDDLE?h+(f-la)/2:n==mxConstants.ALIGN_BOTTOM?h+(f-la-t):h+t;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,v,h,l,la);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",H);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?
+(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(x,mxShape);x.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};
+mxCellRenderer.registerShape("umlActor",x);mxUtils.extend(y,mxShape);y.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};y.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",y);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(a,d,
+b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(I,mxShape);I.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",I);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,f/8,c,7*f/8);a.fillAndStroke()};z.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",z);mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=
+function(a){var d=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,d)};F.prototype.paintBackground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=F&&(g=new g,
+g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};F.prototype.paintForeground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",F);mxUtils.extend(D,mxShape);D.prototype.width=60;D.prototype.height=30;D.prototype.corner=
+10;D.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))};D.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,
+mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,k-1.5*e));a.lineTo(d+Math.max(0,g-e),b+k);a.lineTo(d,b+k);a.close();a.fillAndStroke();a.begin();
+a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+k);a.stroke()};mxCellRenderer.registerShape("umlFrame",D);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=F.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x<
a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",v.prototype.size))*
-d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var f=h.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,m=a.width,p=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=p*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g),new mxPoint(e+
-m,g+f),new mxPoint(e+m,g+p),new mxPoint(e,g+p-f),new mxPoint(e,g)]):(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+m,g),new mxPoint(e+m-f,g+p),new mxPoint(e,g+p),new mxPoint(e+f,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=
-mxUtils.getValue(d.style,"size",e));var h=a.x,g=a.y,m=a.width,p=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+e,g),new mxPoint(h+m-e,g),new mxPoint(h+m,g+p),new mxPoint(h,g+p),new mxPoint(h+e,g)]):d==mxConstants.DIRECTION_WEST?(e=m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m,g),new mxPoint(h+m-e,g+p),new mxPoint(h+e,g+p),new mxPoint(h,
-g)]):d==mxConstants.DIRECTION_NORTH?(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g+e),new mxPoint(h+m,g),new mxPoint(h+m,g+p),new mxPoint(h,g+p-e),new mxPoint(h,g+e)]):(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m,g+e),new mxPoint(h+m,g+p-e),new mxPoint(h,g+p),new mxPoint(h,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<h||b.x>h+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
-mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?r.prototype.fixedSize:r.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var h=a.x,g=a.y,m=a.width,p=a.height,u=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m-
-f,g),new mxPoint(h+m,a),new mxPoint(h+m-f,g+p),new mxPoint(h,g+p),new mxPoint(h+f,a),new mxPoint(h,g)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+f,g),new mxPoint(h+m,g),new mxPoint(h+m-f,a),new mxPoint(h+m,g+p),new mxPoint(h+f,g+p),new mxPoint(h,a),new mxPoint(h+f,g)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g+f),new mxPoint(u,g),new mxPoint(h+m,g+f),new mxPoint(h+m,
-g+p),new mxPoint(u,g+p-f),new mxPoint(h,g+p),new mxPoint(h,g+f)]):(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(u,g+f),new mxPoint(h+m,g),new mxPoint(h+m,g+p-f),new mxPoint(u,g+p),new mxPoint(h,g+p-f),new mxPoint(h,g)]);u=new mxPoint(u,a);c&&(b.x<h||b.x>h+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(g,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=z.prototype.size;null!=
-d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,g=a.width,m=a.height,p=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(p,h),new mxPoint(e+g,h+f),new mxPoint(e+g,h+m-f),new mxPoint(p,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f),new mxPoint(p,h)]):(f=g*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+
-f,h),new mxPoint(e+g-f,h),new mxPoint(e+g,a),new mxPoint(e+g-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,a),new mxPoint(e+f,h)]);p=new mxPoint(p,a);c&&(b.x<e||b.x>e+g?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(h,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();
-a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",J);mxUtils.extend(W,mxShape);W.prototype.size=10;W.prototype.inset=2;W.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+h);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-h,e/2);a.quadTo((c-e)/2-h,e+h,c/
-2,e+h);a.quadTo((c+e)/2+h,e+h,(c+e)/2+h,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",W);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,d,b,c,f,e){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,g=.3*f-d/2,m=.7*f-d/2;e?(a.moveTo(b,g),a.lineTo(h,g),a.lineTo(h,g+d),a.lineTo(b,g+d),a.moveTo(b,m),
-a.lineTo(h,m),a.lineTo(h,m+d),a.lineTo(b,m+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,m+d),a.lineTo(0,m+d),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,g+d),a.lineTo(0,g+d),a.lineTo(0,g),a.lineTo(b,g),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);
-this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",U);mxUtils.extend(O,U);O.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",O);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=4;M.prototype.isOpenEnded=function(){return!0};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};M.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-M);mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=10;H.prototype.defaultArrowWidth=20;H.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};H.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-H);mxUtils.extend(R,mxActor);R.prototype.size=30;R.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",R);mxUtils.extend(K,mxRectangleShape);K.prototype.dx=20;K.prototype.dy=20;K.prototype.isHtmlAllowed=
-function(){return!1};K.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*h,f*h));h=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e);
-a.end();a.stroke();a.begin();a.moveTo(d+h,b);a.lineTo(d+h,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",K);mxUtils.extend(P,mxActor);P.prototype.dx=20;P.prototype.dy=20;P.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,f/2);a.end()};mxCellRenderer.registerShape("crossbar",X);mxUtils.extend(B,mxActor);B.prototype.dx=20;B.prototype.dy=
-20;B.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c-
-d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",B);mxUtils.extend(V,mxActor);V.prototype.arrowWidth=.3;V.prototype.arrowSize=.2;V.prototype.redrawPath=function(a,d,b,c,f){var e=f*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=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("singleArrow",V);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",V.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",V.prototype.arrowSize))));
-b=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",N);mxUtils.extend(Z,mxActor);Z.prototype.size=.1;Z.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,k=a.y,n=a.width,l=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=l*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+
+n,k+f),new mxPoint(e+n,k+l),new mxPoint(e,k+l-f),new mxPoint(e,k)]):(f=n*Math.max(0,Math.min(1,f)),k=[new mxPoint(e+f,k),new mxPoint(e+n,k),new mxPoint(e+n-f,k+l),new mxPoint(e,k+l),new mxPoint(e+f,k)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);c&&(b.x<e||b.x>e+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=
+mxUtils.getValue(d.style,"size",e));var g=a.x,k=a.y,n=a.width,l=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+e,k),new mxPoint(g+n-e,k),new mxPoint(g+n,k+l),new mxPoint(g,k+l),new mxPoint(g+e,k)]):d==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+n,k),new mxPoint(g+n-e,k+l),new mxPoint(g+e,k+l),new mxPoint(g,
+k)]):d==mxConstants.DIRECTION_NORTH?(e=l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k+e),new mxPoint(g+n,k),new mxPoint(g+n,k+l),new mxPoint(g,k+l-e),new mxPoint(g,k+e)]):(e=l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+n,k+e),new mxPoint(g+n,k+l-e),new mxPoint(g,k+l),new mxPoint(g,k)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
+mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?r.prototype.fixedSize:r.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,k=a.y,n=a.width,l=a.height,t=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+n-
+f,k),new mxPoint(g+n,a),new mxPoint(g+n-f,k+l),new mxPoint(g,k+l),new mxPoint(g+f,a),new mxPoint(g,k)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+f,k),new mxPoint(g+n,k),new mxPoint(g+n-f,a),new mxPoint(g+n,k+l),new mxPoint(g+f,k+l),new mxPoint(g,a),new mxPoint(g+f,k)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k+f),new mxPoint(t,k),new mxPoint(g+n,k+f),new mxPoint(g+n,
+k+l),new mxPoint(t,k+l-f),new mxPoint(g,k+l),new mxPoint(g,k+f)]):(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(t,k+f),new mxPoint(g+n,k),new mxPoint(g+n,k+l-f),new mxPoint(t,k+l),new mxPoint(g,k+l-f),new mxPoint(g,k)]);t=new mxPoint(t,a);c&&(b.x<g||b.x>g+n?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(k,t,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=E.prototype.size;null!=
+d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,k=a.width,n=a.height,l=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(l,g),new mxPoint(e+k,g+f),new mxPoint(e+k,g+n-f),new mxPoint(l,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(l,g)]):(f=k*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+
+f,g),new mxPoint(e+k-f,g),new mxPoint(e+k,a),new mxPoint(e+k-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);l=new mxPoint(l,a);c&&(b.x<e||b.x>e+k?l.y=b.y:l.x=b.x);return mxUtils.getPerimeterPoint(g,l,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(K,mxShape);K.prototype.size=10;K.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();
+a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",K);mxUtils.extend(W,mxShape);W.prototype.size=10;W.prototype.inset=2;W.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/
+2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",W);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,k=.3*f-d/2,n=.7*f-d/2;e?(a.moveTo(b,k),a.lineTo(g,k),a.lineTo(g,k+d),a.lineTo(b,k+d),a.moveTo(b,n),
+a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,k+d),a.lineTo(0,k+d),a.lineTo(0,k),a.lineTo(b,k),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);
+this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",U);mxUtils.extend(Q,U);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=4;M.prototype.isOpenEnded=function(){return!0};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};M.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+M);mxUtils.extend(J,mxArrowConnector);J.prototype.defaultWidth=10;J.prototype.defaultArrowWidth=20;J.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};J.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};J.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
+J);mxUtils.extend(R,mxActor);R.prototype.size=30;R.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",R);mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=
+function(){return!1};L.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));g=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e);
+a.end();a.stroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",L);mxUtils.extend(O,mxActor);O.prototype.dx=20;O.prototype.dy=20;O.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",O);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,f/2);a.end()};mxCellRenderer.registerShape("crossbar",X);mxUtils.extend(A,mxActor);A.prototype.dx=20;A.prototype.dy=
+20;A.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c-
+d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",A);mxUtils.extend(V,mxActor);V.prototype.arrowWidth=.3;V.prototype.arrowSize=.2;V.prototype.redrawPath=function(a,d,b,c,f){var e=f*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=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",V);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",V.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",V.prototype.arrowSize))));
+b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",N);mxUtils.extend(Z,mxActor);Z.prototype.size=.1;Z.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Z);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",aa);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close();
a.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,.8*d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
T);mxUtils.extend(da,mxActor);da.prototype.size=.375;da.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",da);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=
@@ -2496,76 +2498,76 @@ arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end
function(a,d,b,c,f){var e=b+f-5;a.begin();a.moveTo(d,b);a.lineTo(d,b+f);a.moveTo(d,e);a.lineTo(d+10,e-5);a.moveTo(d,e);a.lineTo(d+10,e+5);a.moveTo(d,e);a.lineTo(d+c,e);a.moveTo(d+c,b);a.lineTo(d+c,b+f);a.moveTo(d+c,e);a.lineTo(d+c-10,e-5);a.moveTo(d+c,e);a.lineTo(d+c-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ra);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,d,b,c,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,
arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(d,b,c,f),a.fill(),a.begin(),a.moveTo(d,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(d+c,b):a.moveTo(d+c,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(d+c,b+f):a.moveTo(d+c,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(d,b+f):a.moveTo(d,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(d,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ha);mxUtils.extend(ia,
mxEllipse);ia.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(d+c/2,b),a.lineTo(d+c/2,b+f)):(a.moveTo(d,b+f/2),a.lineTo(d+c,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ia);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);a.moveTo(0,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(0,
-f);a.close();a.end()};mxCellRenderer.registerShape("delay",ca);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(f-e)/2;b=d+e;var h=(c-e)/2,e=h+e;a.moveTo(0,d);a.lineTo(h,d);a.lineTo(h,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(h,f);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",
+f);a.close();a.end()};mxCellRenderer.registerShape("delay",ca);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(f-e)/2;b=d+e;var g=(c-e)/2,e=g+e;a.moveTo(0,d);a.lineTo(g,d);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",
ja);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);b=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ka);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,d,b){for(var c=
[],f=0;f<d.length;f++)c.push(mxUtils.clone(d[f]));var f=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,c,b]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),oa.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;
-StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,h,g,m,p){var u=f*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,h,g,m,
-p){var u=f*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.moveTo(c.x-u/2+r/2,c.y-r/2-u/2);a.lineTo(c.x-r/2-3*u/2,c.y-3*r/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,h,g,m,p){var u=c.clone(),r=Aa.apply(this,arguments),v=f*(h+2*m),k=e*(h+2*m);return function(){r.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*v+f*m,u.y-2*k+e*m);a.moveTo(u.x-
-v-k+e*m,u.y-k+v-f*m);a.lineTo(u.x+k-v-e*m,u.y-k-v+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,h,g,m,p){d=f*m*1.118;b=e*m*1.118;f*=h+m;e*=h+m;var u=c.clone();u.x-=d;u.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);g?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,h,g,m,p,u){e*=g+p;h*=g+p;var r=
-f.clone();return function(){d.begin();d.moveTo(r.x,r.y);m?d.lineTo(r.x-e-h/a,r.y-h+e/a):d.lineTo(r.x+h/a-e,r.y-h-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,d,b){return sa(a,["width"],d,function(d,c,f,e,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*h/2,e.y+f*d/4-c*h/2)},function(d,c,f,e,h,g){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return Q(a,d,
-function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var h=a.view.scale,g=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-g.x,m=f.y-g.y,p=Math.sqrt(e*e+m*m),g=c.call(this,p,e/p,m/p,g,f);return new mxPoint(g.x/h-d.x,g.y/h-d.y)},function(d,c,e){var h=a.absolutePoints,g=h.length-1;d=a.view.translate;var m=a.view.scale,p=b?h[0]:h[g],h=b?h[1]:h[g-1],g=h.x-p.x,u=h.y-p.y,r=Math.sqrt(g*g+u*u);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;f.call(this,r,g/r,u/r,p,h,c,e)})},ma=function(a){return function(d){return[Q(d,["arrowWidth",
+StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,k,n,l){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-t/2,c.y-t/2+r/2);a.lineTo(c.x+t/2-3*r/2,c.y-3*t/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,k,n,
+l){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-t/2,c.y-t/2+r/2);a.lineTo(c.x+t/2-3*r/2,c.y-3*t/2-r/2);a.moveTo(c.x-r/2+t/2,c.y-t/2-r/2);a.lineTo(c.x-t/2-3*r/2,c.y-3*t/2+r/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,k,n,l){var r=c.clone(),t=Aa.apply(this,arguments),v=f*(g+2*n),h=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*v+f*n,r.y-2*h+e*n);a.moveTo(r.x-
+v-h+e*n,r.y-h+v-f*n);a.lineTo(r.x+h-v-e*n,r.y-h-v+f*n);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,k,n,l){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=c.clone();r.x-=d;r.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);k?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,k,n,l,r){e*=k+l;g*=k+l;var t=
+f.clone();return function(){d.begin();d.moveTo(t.x,t.y);n?d.lineTo(t.x-e-g/a,t.y-g+e/a):d.lineTo(t.x+g/a-e,t.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,d,b){return sa(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,k){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return P(a,d,
+function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,k=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-k.x,n=f.y-k.y,l=Math.sqrt(e*e+n*n),k=c.call(this,l,e/l,n/l,k,f);return new mxPoint(k.x/g-d.x,k.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,k=g.length-1;d=a.view.translate;var n=a.view.scale,l=b?g[0]:g[k],g=b?g[1]:g[k-1],k=g.x-l.x,r=g.y-l.y,t=Math.sqrt(k*k+r*r);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,t,k/t,r/t,l,g,c,e)})},ma=function(a){return function(d){return[P(d,["arrowWidth",
"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",V.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",V.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},ya=function(a,d,b){return function(c){var f=
-[Q(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var h=[Q(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var h=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=h?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));h&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fa(e));return h}},Ea=function(a){return function(d){var b=
-[Q(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d}},fa=function(a,d){return Q(a,
+[P(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(fa(e));return g}},Ea=function(a){return function(d){var b=
+[P(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d}},fa=function(a,d){return P(a,
[mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*
-f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},Q=function(a,d,b,c,f,e){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};
-h.getPosition=b;h.setPosition=c;h.ignoreGrid=null!=f?f:!0;if(e){var g=h.positionChanged;h.positionChanged=function(){g.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},za={link:function(a){return[Da(a,!0,10),Da(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
-b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;
-a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,
-Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth=
+f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},P=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};
+g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var k=g.positionChanged;g.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Da(a,!0,10),Da(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
+b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,k,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;
+a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
+a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,k,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,
+Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth=
a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,
-e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
-d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,h,g,m){b=
-Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[Q(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),
+e,g,k,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,k,n){b=
+Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[P(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),
d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(fa(a,b/2))}return d},
-label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[Q(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
-"width",E.prototype.width))),b=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[Q(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",w.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},cross:function(a){return[Q(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ja.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,
-a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=
-[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",R.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},dataStorage:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.x+
-(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[Q(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,
-"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),Q(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),Q(a,["base"],function(a){var d=
+label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[P(a,["width","height"],function(a){var d=Math.max(D.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",D.prototype.width))),b=Math.max(1.5*D.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",D.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(D.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*D.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[P(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",w.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},cross:function(a){return[P(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ja.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=
+[P(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",R.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},dataStorage:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.x+
+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[P(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,
+"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),P(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),P(a,["base"],function(a){var d=
Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,
-d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},internalStorage:function(a){var d=[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",K.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",K.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},corner:function(a){return[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",B.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",B.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),
-folder:function(a){return[Q(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,
-"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[Q(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},
-tape:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},
-function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:ua(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ua(z.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=Q;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
+d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},internalStorage:function(a){var d=[P(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},corner:function(a){return[P(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[P(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",A.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",A.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),
+folder:function(a){return[P(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,
+"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},
+tape:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},
+function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:ua(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ua(E.prototype.size,!0,.5,!0),curlyBracket:ua(t.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=P;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);
-a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=c&&(c=e.transformControlPoint(a,
-c));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,p=va.y,u=wa.x,r=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=h&&null!=g){a=function(a,d,b){a-=k.x;var c=d-k.y;d=(r*a-u*c)/(m*r-p*u);a=(p*a-m*c)/(p*u-m*r);v?(b&&(k=new mxPoint(k.x+m*d,k.y+p*d),f.push(k)),k=new mxPoint(k.x+u*a,k.y+r*a)):(b&&(k=new mxPoint(k.x+u*a,k.y+r*a),f.push(k)),k=new mxPoint(k.x+m*d,k.y+p*d));f.push(k)};
-var k=g;null==c&&(c=new mxPoint(g.x+(h.x-g.x)/2,g.y+(h.y-g.y)/2));a(c.x,c.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints=
+a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,
+c));null==k&&null!=d&&(k=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=va.x,l=va.y,r=wa.x,t=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){a=function(a,d,b){a-=h.x;var c=d-h.y;d=(t*a-r*c)/(n*t-l*r);a=(l*a-n*c)/(l*r-n*t);v?(b&&(h=new mxPoint(h.x+n*d,h.y+l*d),f.push(h)),h=new mxPoint(h.x+r*a,h.y+t*a)):(b&&(h=new mxPoint(h.x+r*a,h.y+t*a),f.push(h)),h=new mxPoint(h.x+n*d,h.y+l*d));f.push(h)};
+var h=k;null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=
-mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=
mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;
T.prototype.constraints=mxRectangleShape.prototype.constraints;da.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)];y.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,
+.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,
1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Y.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)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
+.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)];m.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)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
0),!1)];r.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
+.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
-.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];h.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;B.prototype.constraints=null;P.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;A.prototype.constraints=null;O.prototype.constraints=null;X.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)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
-new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];I.prototype.constraints=null;aa.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,
+new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];F.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",function(){c.openLink(b.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(h){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+h.message)}}));b.showDialog((new OpenDialog(this)).container,
-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
-function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
+Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",function(){c.openLink(b.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,
+320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
+function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=h;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(c)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate();try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var d=0;d<b.length&&
-a;d++)a=a&&c.model.isEdge(b[d]);var e=c.view.translate,f=c.view.scale,p=e.x,m=e.y,e=null;if(1==b.length&&a){var g=c.getCellGeometry(b[0]);null!=g&&(e=g.getTerminalPoint(!0))}e=null!=e?e:c.getBoundingBoxFromGeometry(b,a);if(null!=e){var k=Math.round(c.snap(c.popupMenuHandler.triggerX/f-p)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/f-m));c.cellsMoved(b,k-e.x,u-e.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+a;d++)a=a&&c.model.isEdge(b[d]);var e=c.view.translate,f=c.view.scale,t=e.x,n=e.y,e=null;if(1==b.length&&a){var l=c.getCellGeometry(b[0]);null!=l&&(e=l.getTerminalPoint(!0))}e=null!=e?e:c.getBoundingBoxFromGeometry(b,a);if(null!=e){var h=Math.round(c.snap(c.popupMenuHandler.triggerX/f-t)),k=Math.round(c.snap(c.popupMenuHandler.triggerY/f-n));c.cellsMoved(b,h-e.x,k-e.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){c.setSelectionCells(c.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){c.turnShapes(c.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()},
null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.isCellMovable(c.getSelectionCell())?1:0;c.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);c.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);c.toggleCellStyles(mxConstants.STYLE_ROTATABLE,
a);c.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);c.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);c.toggleCellStyles("connectable",a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){c.home()},null,null,"Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)},
@@ -2573,48 +2575,48 @@ null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){c.foldCells
c.getSelectionCount()&&0==c.getModel().getChildCount(c.getSelectionCell())?c.setCellStyles("container","0"):c.setSelectionCells(c.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){c.removeCellsFromParent()});this.addAction("edit",function(){c.isEnabled()&&c.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=c.getSelectionCell()||c.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container,
340,340,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var e=c.value.getAttribute("tooltip");null!=e&&(d=e)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=
c.getLinkForCell(c.getSelectionCell());null!=a&&c.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(d){d=mxUtils.trim(d);a.setLinkForCell(c,0<d.length?d:null)})}},null,null,"Alt+Shift+L");this.addAction("insertLink...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),
-function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,h=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var f=a.indexOf(",");0<f&&(h=b.getPageById(a.substring(f+1)),h=null!=h?h.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,h=e[0].name||e[0].type,h=h.charAt(0).toUpperCase()+h.substring(1),30<h.length&&(h=h.substring(0,30)+"..."));f=c.getFreeInsertPoint();d=new mxCell(h,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
-(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);c.scrollCellToVisible(c.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=
-a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var e=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(e);null!=d&&a.insertLink(d)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();try{for(var b=
+function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,g=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var f=a.indexOf(",");0<f&&(g=b.getPageById(a.substring(f+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,g=e[0].name||e[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));f=c.getFreeInsertPoint();d=new mxCell(g,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);c.scrollCellToVisible(c.getSelectionCell())}})}).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=
+a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var e=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(e);null!=d&&a.insertLink(d)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();try{for(var b=
0;b<a.length;b++){var d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d],20);else{var e=c.view.getState(d),f=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=e&&null!=e.text&&null!=f&&c.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,f)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=
-a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var h=document.createElement("div");h.innerHTML=d;d=mxUtils.extractTextWithWhitespace(h.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
+a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=d;d=mxUtils.extractTextWithWhitespace(g.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
c.sanitizeHtml(d));c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=c.getView().getState(c.getSelectionCell());
null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&c.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){c.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
this.addAction("zoomOut",function(a){c.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){c.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/a.width/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=
a.y*c.view.scale,c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/(2*a.width)/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=Math.min(a.y,
(c.container.scrollHeight-c.container.clientHeight)/2),c.container.scrollLeft=Math.min(a.x,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();c.zoomTo(Math.floor(20*(c.container.clientWidth-10)/c.pageFormat.width/c.pageScale)/20);if(mxUtils.hasScrollbars(c.container)){var a=c.getPagePadding();c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-
c.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
-parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){c.setGridEnabled(!c.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isGridEnabled()});l.setEnabled(!1);
-l=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=
-new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return c.pageVisible});
-l=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});
-l=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var n=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){n||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){n=!1}),n=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,e){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){c.setGridEnabled(!c.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.isGridEnabled()});m.setEnabled(!1);
+m=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=
+new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.foldingEnabled});m.isEnabled=h;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return c.pageVisible});
+m=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});
+m=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var a=
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,b,d,e){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
b),(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?c.updateLabelElements(c.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?c.updateLabelElements(c.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.updateLabelElements(c.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&
-c.replaceElement(a)})}finally{c.getModel().endUpdate()}}},null,null,e)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
+c.replaceElement(a)})}finally{c.getModel().endUpdate()}}},null,null,e)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,null),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});
this.addAction("dashed",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dotted",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("sharp",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});
this.addAction("rounded",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!c.isSelectionEmpty()&&c.isEnabled()){c.getModel().beginUpdate();try{var a=c.getSelectionCells(),e=c.view.getState(a[0]),
-d=null!=e?e.style:c.getCellStyle(a[0]),h="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,h);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[h,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,
+d=null!=e?e.style:c.getCellStyle(a[0]),g="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,g);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,
"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=c.view.getState(c.getSelectionCell()),e="1";null!=a&&null!=c.getFoldingImage(a)&&(e="0");c.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",c.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var a=c.getSelectionCells();if(null!=a&&0<a.length){var b=c.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(d){null!=d&&c.setCellStyle(mxUtils.trim(d),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){c.isEnabled()&&!c.isSelectionEmpty()&&b.setDefaultStyle(c.getSelectionCell())},null,null,Editor.ctrlKey+
-"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var d=c.view.translate,h=c.view.scale,f=d.x,d=d.y,a=c.getModel().getParent(a),p=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=p;)f+=p.x,d+=p.y,a=c.getModel().getParent(a),p=
-c.getCellGeometry(a);f=Math.round(c.snap(c.popupMenuHandler.triggerX/h-f));h=Math.round(c.snap(c.popupMenuHandler.triggerY/h-d));b.addPointAt(b.state,f,h)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var e=
-c.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,c.getModel().setGeometry(d,e))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
-function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var h=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(h),c.insertImage(a,d,b);else{var f=c.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var e=null;c.getModel().beginUpdate();
-try{if(0==f.length){var m=c.getFreeInsertPoint(),e=f=[c.insertVertex(c.getDefaultParent(),null,"",m.x,m.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",e))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var p=c.view.getState(f[0]),r=null!=p?p.style:c.getCellStyle(f[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=d&&null!=b){var k=f[0],l=c.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=d,l.height=b,c.getModel().setGeometry(k,l))}}finally{c.getModel().endUpdate()}null!=e&&(c.setSelectionCells(e),c.scrollCellToVisible(e[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
-(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
-this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
+"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var d=c.view.translate,g=c.view.scale,f=d.x,d=d.y,a=c.getModel().getParent(a),t=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=t;)f+=t.x,d+=t.y,a=c.getModel().getParent(a),t=
+c.getCellGeometry(a);f=Math.round(c.snap(c.popupMenuHandler.triggerX/g-f));g=Math.round(c.snap(c.popupMenuHandler.triggerY/g-d));b.addPointAt(b.state,f,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var e=
+c.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,c.getModel().setGeometry(d,e))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
+function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var g=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(g),c.insertImage(a,d,b);else{var f=c.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var e=null;c.getModel().beginUpdate();
+try{if(0==f.length){var k=c.getFreeInsertPoint(),e=f=[c.insertVertex(c.getDefaultParent(),null,"",k.x,k.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",e))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var n=c.view.getState(f[0]),r=null!=n?n.style:c.getCellStyle(f[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=d&&null!=b){var t=f[0],h=c.getModel().getGeometry(t);null!=h&&(h=h.clone(),h.width=d,h.height=b,c.getModel().setGeometry(t,h))}}finally{c.getModel().endUpdate()}null!=e&&(c.setSelectionCells(e),c.scrollCellToVisible(e[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=h;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
+(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=h;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
+this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",
mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
-null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,c,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,c,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,e,c,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=c;this.shortcut=k;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,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,c,h){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,e,c,h))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,c,h){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=c;this.shortcut=h;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.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||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};
+DrawioFile.prototype.move=function(a,b,e){};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};
DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
@@ -2624,8 +2626,8 @@ DrawioFile.prototype.autosave=function(a,b,e,c){null==this.lastAutosave&&(this.l
mxUtils.bind(this,function(a){null!=c&&c(a)}))}else null!=e&&e(null)}),a)};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.close=function(a){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 e=a.lastIndexOf("."),c=0<e?a.substring(e):"",e=b.lastIndexOf(".");return c===(0<e?b.substring(e):"")}return a==b};
DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,b,e,c){DrawioFile.call(this,a,b);this.title=e;this.mode=c?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};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,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
-LocalFile.prototype.saveFile=function(a,b,e,c){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
+LocalFile.prototype.saveFile=function(a,b,e,c){this.title=a;this.updateFileData();b=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -2641,34 +2643,34 @@ null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.len
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 f=new mxCodec(c.ownerDocument);f.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");b=d.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);
mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1)}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 d=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&d.setAttribute("style",this.graph.currentStyle);
null!=this.graph.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));d.setAttribute("math",this.graph.mathEnabled?"1":"0");d.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return d};Editor.prototype.isDataSvg=function(a){try{var d=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),
-null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(z){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
+null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(E){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
a=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0]),b=this.graph.decompress(b),0<b.length&&(c=mxUtils.parseXml(b),a=c.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),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)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
null==a||d||(c=null,"diagram"==a.nodeName?c=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(c=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=c&&(b=this.graph.decompress(mxUtils.getTextContent(c)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,d){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
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 b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
d){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;c[0].parentNode.appendChild(f)}};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 d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,f){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==f&&d.push(f);return""});/,\s*$/.test(a)&&d.push("");return d};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=t.apply(this,arguments);if(mxClient.IS_SVG){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",
-this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),
-function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},
-{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var h=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=
-mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+
-" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),h=0;h<e.length;h++)f=mxUtils.removeStylename(f,e[h]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,
-a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";null!=a?(null!=
-a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":d.style.backgroundColor=a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");f.appendChild(d)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,
-4)&&mxUtils.br(f),d(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="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(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));var g=document.createElement("div");g.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(h),a.appendChild(g));mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(g);d(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+var d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,f){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==f&&d.push(f);return""});/,\s*$/.test(a)&&d.push("");return d};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+q.apply(this,arguments):this.clear()};var u=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=u.apply(this,arguments);var d=this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&("1"==urlParams.embed||null!=d&&d.isEditable())){var b=this.editorUi,c=b.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var d=new ChangePageSetup(b);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;c.model.execute(d)},{install:function(a){this.listener=
+function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&
+(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
+stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
+{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"}]];var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
+d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
+e[g]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height=
+"30px";d.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":d.style.backgroundColor=a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");f.appendChild(d)}f.innerHTML=
+"";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),d(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="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(" ");
+null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(g),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(k);d(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(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 c=this.editorUi.editor.graph,f=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d)):d.image&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==b?d.style.width="202px":
(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}p.apply(this,arguments);var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var t=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}t.apply(this,arguments);var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;
this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,d){d.height=Math.max(d.height,20);if(1<d.height/20){var b=d.height%20;d.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
-d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var m=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){m.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
+d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var n=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){n.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
d,b){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,c,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1;
var c=a.ownerDocument,f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");
e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"):
@@ -2681,317 +2683,317 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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 d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var g=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,h,m,p,k){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);
-null!=u&&mxStencilRegistry.getStencil(u)}return g.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){w.value=Math.max(1,Math.min(g,Math.max(parseInt(w.value),parseInt(l.value))));l.value=Math.max(1,Math.min(g,Math.min(parseInt(w.value),parseInt(l.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),h=0,g=0,m=aa.get(),p=1/d.pageScale,k=t.checked;if(k)var p=parseInt(N.value),r=parseInt(Z.value),p=Math.min(m.height*r/(e.height/d.view.scale),m.width*p/(e.width/
-d.view.scale));else p=parseInt(q.value)/(100*d.pageScale),isNaN(p)&&(c=1/d.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*c);m.height=Math.ceil(m.height*c);p*=c;!k&&d.pageVisible?(e=d.getPageLayout(),h-=e.x*m.width,g-=e.y*m.height):k=!0;if(null==b){b=PrintDialog.createPrintPreview(d,p,m,0,h,g,k);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var u=b.writeHead;b.writeHead=function(d){u.apply(this,arguments);null!=a.editor.fontCss&&
-(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var l=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var h=l.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=k;b.appendGraph(d,p,h,g,f,!0)}return b}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value=
-"100 %");var c=.75*c,e=l.value,h=w.value,g=!k.checked,p=null;g&&(g=e==m&&h==m);if(!g&&null!=a.pages&&a.pages.length){var r=0,g=a.pages.length-1;k.checked||(r=parseInt(e)-1,g=parseInt(h)-1);for(var u=r;u<=g;u++){var v=a.pages[u],e=v==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),h=!0,r=!1,n=null,C=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(h=v.viewState.pageVisible,r=v.viewState.mathEnabled,n=v.viewState.background,
-C=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(r="0"!=v.mapping.diagramMap.get("mathEnabled"),n=v.mapping.diagramMap.get("background"),C=v.mapping.diagramMap.get("backgroundImage"),C=null!=C&&0<C.length?JSON.parse(C):null);e.background=n;e.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;e.pageVisible=h;e.mathEnabled=r;var z=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?u+1:z.apply(this,arguments)};document.body.appendChild(e.container);
-a.updatePageRoot(v);e.model.setRoot(v.root)}p=b(e,p,u!=g);e!=f&&e.container.parentNode.removeChild(e.container)}}else p=b(f);p.mathEnabled&&(g=p.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),d&&(g.writeln("MathJax.Hub.Queue(function () {"),g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));p.closeDocument();!p.mathEnabled&&d&&PrintDialog.printPreview(p)}
-var f=a.editor.graph,e=document.createElement("div"),h=document.createElement("h3");h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,d||mxResources.get("print"));e.appendChild(h);var g=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");
-k.setAttribute("name","pages-printdialog");p.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("printAllPages"));p.appendChild(h);mxUtils.br(p);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");p.appendChild(u);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+":");p.appendChild(h);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type",
-"number");l.setAttribute("min","1");l.style.width="50px";p.appendChild(l);h=document.createElement("span");mxUtils.write(h,mxResources.get("to"));p.appendChild(h);var w=l.cloneNode(!0);p.appendChild(w);mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+
-1;l.value=m;w.value=m;break}l.setAttribute("max",g);w.setAttribute("max",g);1<g&&e.appendChild(p);var v=document.createElement("div");v.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");v.appendChild(n);h=document.createElement("span");mxUtils.write(h,mxResources.get("adjustTo"));v.appendChild(h);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";
-q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});e.appendChild(v);var p=p.cloneNode(!1),t=n.cloneNode(!0);t.setAttribute("value","fit");n.setAttribute("checked","checked");h=document.createElement("div");h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";h.appendChild(t);p.appendChild(h);v=document.createElement("table");v.style.display="inline-block";var O=document.createElement("tbody"),
-M=document.createElement("tr"),H=M.cloneNode(!0),R=document.createElement("td"),K=R.cloneNode(!0),P=R.cloneNode(!0),X=R.cloneNode(!0),B=R.cloneNode(!0),V=R.cloneNode(!0);R.style.textAlign="right";X.style.textAlign="right";mxUtils.write(R,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";K.appendChild(N);h=document.createElement("span");mxUtils.write(h,
-mxResources.get("fitToSheetsAcross"));P.appendChild(h);mxUtils.write(X,mxResources.get("fitToBy"));var Z=N.cloneNode(!0);B.appendChild(Z);mxEvent.addListener(N,"focus",function(){t.checked=!0});mxEvent.addListener(Z,"focus",function(){t.checked=!0});h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsDown"));V.appendChild(h);M.appendChild(R);M.appendChild(K);M.appendChild(P);H.appendChild(X);H.appendChild(B);H.appendChild(V);O.appendChild(M);O.appendChild(H);v.appendChild(O);
-p.appendChild(v);e.appendChild(p);p=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom="12px";mxUtils.write(h,mxResources.get("paperSize"));p.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var aa=PageSetupDialog.addPageFormatPanel(h,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));p.appendChild(h);
-var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";p.appendChild(S);e.appendChild(p);h=document.createElement("div");h.style.cssText="text-align:right;margin:62px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&h.appendChild(p);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-v.className="geBtn",h.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),v.className="geBtn",h.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});v.className="geBtn gePrimaryBtn";h.appendChild(v);a.editor.cancelFirst||h.appendChild(p);e.appendChild(h);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+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 d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var l=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,n,t,h){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);
+null!=k&&mxStencilRegistry.getStencil(k)}return l.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){m.value=Math.max(1,Math.min(n,Math.max(parseInt(m.value),parseInt(w.value))));w.value=Math.max(1,Math.min(n,Math.min(parseInt(m.value),parseInt(w.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,n=0,k=aa.get(),l=1/d.pageScale,t=u.checked;if(t)var l=parseInt(N.value),r=parseInt(Z.value),l=Math.min(k.height*r/(e.height/d.view.scale),k.width*l/(e.width/
+d.view.scale));else l=parseInt(q.value)/(100*d.pageScale),isNaN(l)&&(c=1/d.pageScale,q.value="100 %");k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*c);k.height=Math.ceil(k.height*c);l*=c;!t&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*k.width,n-=e.y*k.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(d,l,k,0,g,n,t);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var h=b.writeHead;b.writeHead=function(d){h.apply(this,arguments);null!=a.editor.fontCss&&
+(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var g=w.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{k=d.background;if(null==k||""==k||k==mxConstants.NONE)k="#ffffff";b.backgroundColor=k;b.autoOrigin=t;b.appendGraph(d,l,g,n,f,!0)}return b}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value=
+"100 %");var c=.75*c,e=w.value,g=m.value,n=!t.checked,l=null;n&&(n=e==k&&g==k);if(!n&&null!=a.pages&&a.pages.length){var r=0,n=a.pages.length-1;t.checked||(r=parseInt(e)-1,n=parseInt(g)-1);for(var h=r;h<=n;h++){var v=a.pages[h],e=v==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,r=!1,p=null,z=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(g=v.viewState.pageVisible,r=v.viewState.mathEnabled,p=v.viewState.background,
+z=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(r="0"!=v.mapping.diagramMap.get("mathEnabled"),p=v.mapping.diagramMap.get("background"),z=v.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);e.background=p;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;e.pageVisible=g;e.mathEnabled=r;var D=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?h+1:D.apply(this,arguments)};document.body.appendChild(e.container);
+a.updatePageRoot(v);e.model.setRoot(v.root)}l=b(e,l,h!=n);e!=f&&e.container.parentNode.removeChild(e.container)}}else l=b(f);l.mathEnabled&&(n=l.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),d&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));l.closeDocument();!l.mathEnabled&&d&&PrintDialog.printPreview(l)}
+var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var n=1,k=1,l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");
+t.setAttribute("name","pages-printdialog");l.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));l.appendChild(g);mxUtils.br(l);var h=t.cloneNode(!0);t.setAttribute("checked","checked");h.setAttribute("value","range");l.appendChild(h);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");l.appendChild(g);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type",
+"number");w.setAttribute("min","1");w.style.width="50px";l.appendChild(w);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));l.appendChild(g);var m=w.cloneNode(!0);l.appendChild(m);mxEvent.addListener(w,"focus",function(){h.checked=!0});mxEvent.addListener(m,"focus",function(){h.checked=!0});mxEvent.addListener(w,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){k=g+
+1;w.value=k;m.value=k;break}w.setAttribute("max",n);m.setAttribute("max",n);1<n&&e.appendChild(l);var v=document.createElement("div");v.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");v.appendChild(p);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));v.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";
+q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){p.checked=!0});e.appendChild(v);var l=l.cloneNode(!1),u=p.cloneNode(!0);u.setAttribute("value","fit");p.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(u);l.appendChild(g);v=document.createElement("table");v.style.display="inline-block";var Q=document.createElement("tbody"),
+M=document.createElement("tr"),J=M.cloneNode(!0),R=document.createElement("td"),L=R.cloneNode(!0),O=R.cloneNode(!0),X=R.cloneNode(!0),A=R.cloneNode(!0),V=R.cloneNode(!0);R.style.textAlign="right";X.style.textAlign="right";mxUtils.write(R,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";L.appendChild(N);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));O.appendChild(g);mxUtils.write(X,mxResources.get("fitToBy"));var Z=N.cloneNode(!0);A.appendChild(Z);mxEvent.addListener(N,"focus",function(){u.checked=!0});mxEvent.addListener(Z,"focus",function(){u.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));V.appendChild(g);M.appendChild(R);M.appendChild(L);M.appendChild(O);J.appendChild(X);J.appendChild(A);J.appendChild(V);Q.appendChild(M);Q.appendChild(J);v.appendChild(Q);
+l.appendChild(v);e.appendChild(l);l=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));l.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var aa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);l.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));l.appendChild(g);
+var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";l.appendChild(S);e.appendChild(l);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&g.appendChild(l);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+v.className="geBtn",g.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),v.className="geBtn",g.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});v.className="geBtn gePrimaryBtn";g.appendChild(v);a.editor.cancelFirst||g.appendChild(l);e.appendChild(g);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(w.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))}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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.sidebarFooterHeight=36;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.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"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
-!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&
-6<a.length}catch(g){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();
-EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,
-length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,e){var h=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color="white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",h.style.paddingLeft="10px",h.style.paddingRight=
-"10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),h.innerHTML=e+"...",c.appendChild(h),d.status=h,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/2))+"px",h.style.top=Math.round(Math.max(0,
-b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),h=!0);return h};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b,e)}function f(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var h=d(a,4);if(null!=b&&b(e-8,h,c))break;value=d(a,c);d(a,4);if("IEND"==h)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};
-var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(d),g=this.editor.extractGraphModel(m.documentElement,null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(w){}return b};EditorUi.prototype.validateFileData=
-function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");
-if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(c[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,g,0==e?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])),d.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(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,m,g,k,u,l,r){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;l=null!=l?l:!0;var d,f=null;null==c||
-c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":f=d=e;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(p);if(b.decompress(h)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,h);h=a.ownerDocument.createElement("mxfile");h.appendChild(p)}r?(h=h.cloneNode(!0),h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.setAttribute("userAgent",
-navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!g&&!m&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=c?c.getTitle():null,d,f);else if(g||!m&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,l,f);return a};EditorUi.prototype.getXmlFileData=
-function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var h=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=h&&h.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(h.graphModel),
-h.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[e].node,c),h.needsUpdate=!1);d.appendChild(this.pages[e].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,m,g,k,u,l){m=null!=m?m:!0;k=null!=k?k:this.getXmlFileData(m,null!=g?g:!1);l=null!=l?l:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());
-var d=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(k,g,l,window.location.href,a,b,c,e,m,u);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,m,g){g=null!=g?g:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=g?b.getGraphBounds():
-b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;g=Math.floor(d.x/h-b.view.translate.x);h=Math.floor(d.y/h-b.view.translate.y);d=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",h)}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!=e&&a.setAttribute("edit",e));null!=
-m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?
-'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,m){null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\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==m?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-m+'" target="_blank"><img border="0" src="https://www.draw.io/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;var d=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=
-d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,m,g){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();
-var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,m));this.saveData(f,a,h,"text/xml")}else if("html"==a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,
-function(d,b){try{var c=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var f=this.createDownloadRequest(d,a,e,b);this.editor.graph.pageVisible=c;return f}catch(L){this.handleError(L)}}));else{var p=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var l=this.editor.graph.background;
-l==mxConstants.NONE&&(l=null);var n=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?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 f=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(F){this.handleError(F)}};
-EditorUi.prototype.createDownloadRequest=function(a,b,c,e){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var h=0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){f="&from="+h;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+
-d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();
-this.editor.graph.model.clear();this.editor.undoManager.clear();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.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
-this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
-this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(m){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(m){}}catch(m){null!=
-window.console&&console.log("error in fileLoaded:",a,m);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=m&&null!=m.message?":err:"+encodeURIComponent(m.message):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}catch(g){}this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+
-(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(f){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,m,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".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 d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};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 d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=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:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=
-function(a){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&
-(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=
-0;c<d.length;c++){var e=d[c],h=e.data;if(null!=h){var h=this.convertDataUri(h),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+h,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(h=this.stringToCells(this.editor.graph.decompress(e.xml)),0<h.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(h,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
-b)for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));
-return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var l=k.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var r=document.createElement("div");r.style.position="absolute";r.style.right="0px";r.style.top=
-"5px";mxClient.IS_QUIRKS||8==document.documentMode||(r.style.backgroundColor="inherit");l.style.position="relative";var n=document.createElement("img");n.setAttribute("src",Dialog.prototype.closeImage);n.setAttribute("title",mxResources.get("close"));n.setAttribute("align","top");n.setAttribute("border","0");n.className="geButton";n.style.marginRight="1px";n.style.marginTop="-1px";r.appendChild(n);var q=null;mxEvent.addListener(n,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var x=this.editor.graph,t=null,y=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=n.cloneNode(!1),
-t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",r.insertBefore(t,r.firstChild),l.style.paddingRight=18*r.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),l.style.paddingRight=18*r.childNodes.length+"px")})):null==q&&(q=n.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",
-mxResources.get("save")),r.insertBefore(q,r.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*r.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(d)})),l.style.paddingRight=18*r.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,d,c,e){a=x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var h=
-0;h<a.length;h++){var g=x.getCellGeometry(a[h]);null!=g&&g.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);D(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),L=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),
-x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=x.getSelectionCells(),b=x.view.getBounds(d),c=x.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=x.view.translate.x;b.y-=x.view.translate.y;G(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility=
-"hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),
-k.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,L(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility=
-"visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";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.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,h,g,m,p,r,l,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,m,p),d)],d[0].vertex=!0,G(d,new mxRectangle(0,0,m,p),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&
-0<b.length&&(f.parentNode.removeChild(f),f=null);else{var n=!1,w=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var h=mxUtils.parseXml(d);if("mxlibrary"==h.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(h.documentElement));e(g,k);b=b.concat(g);D(a);this.spinner.stop();n=!0}catch(S){}else if("mxfile"==h.documentElement.nodeName)try{for(var m=h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var g=mxUtils.getTextContent(m[h]),p=this.stringToCells(this.editor.graph.decompress(g)),
-r=this.editor.graph.getBoundingBoxFromGeometry(p);G(p,new mxRectangle(0,0,r.width,r.height),a)}n=!0}catch(S){null!=window.console&&console.log("error in drop handler:",S)}}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r)||/(\.vsd)($|\?)/i.test(r))?this.importVisio(u,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border=
-"3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));n=n.cloneNode(!1);n.setAttribute("src",IMAGE_PATH+"/edit.gif");n.setAttribute("title",mxResources.get("edit"));r.insertBefore(n,r.firstChild);mxEvent.addListener(n,"click",y);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&y(a)});c=n.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));r.insertBefore(c,r.firstChild);mxEvent.addListener(c,"click",
-L);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),r.insertBefore(c,r.firstChild))}l.appendChild(r);l.style.paddingRight=18*r.childNodes.length+"px"}};"1"==urlParams.offline||
-EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));
-a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",
-Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor=
-"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!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(n){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=
+b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
+function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(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%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=
+Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
+d){var b=e;e+=d;return a.substring(b,e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,
+!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(t){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(d),l=this.editor.extractGraphModel(n.documentElement,
+null!=this.pages),b=null!=l?mxUtils.getXml(l):""}catch(w){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;
+d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(c[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,l,0==e?l: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])),d.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(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(a,b,c,e,n,l,h,k,m,r){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;m=null!=m?m:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var t=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(t);if(b.decompress(g)!=t)return t;t=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(t,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(t)}r?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!l&&!n&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(l||!n&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,m,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var g=
+this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=g&&g.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(g.graphModel),g.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[e].node,c),g.needsUpdate=!1);d.appendChild(this.pages[e].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,n,l,h,k,m){n=null!=n?n:!0;h=null!=h?h:this.getXmlFileData(n,null!=l?l:!1);m=null!=m?m:this.getCurrentFile();
+l=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){l=this.createTemporaryGraph(l.getStylesheet());var d=l.getGlobalVariable,f=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(f.root)}a=this.createFileData(h,l,m,window.location.href,a,b,c,e,n,k);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);
+return a};EditorUi.prototype.getHtml=function(a,b,c,e,n,l){l=null!=l?l:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",l);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!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==n?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,n){null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\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==n?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/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;var d=null!=a&&0<a.length?
+mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
+0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,n,l){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,n));this.saveData(f,a,g,"text/xml")}else if("html"==
+a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var f=this.createDownloadRequest(d,a,e,b);this.editor.graph.pageVisible=c;return f}catch(I){this.handleError(I)}}));else{var t=null,h=
+mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);var p=this.editor.graph.getSvg(m,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();h('<?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 f=d+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();h(a)}),e)}}catch(C){this.handleError(C)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=
+0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);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.updateUi();this.showSplash()});
+if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(n){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(n){}}catch(n){null!=window.console&&console.log("error in fileLoaded:",a,n);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=n&&null!=n.message?":err:"+encodeURIComponent(n.message):
+"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}catch(l){}this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var d=
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(f){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,n,l,h){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?
+this.getLocalData(".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 d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};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 d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=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:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
+function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign=
+"center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g=this.convertDataUri(g),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),
+0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",
+a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var h=k.parentNode.previousSibling;c=h.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=
+a.title&&h.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var r=document.createElement("div");r.style.position="absolute";r.style.right="0px";r.style.top="0px";r.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(r.style.backgroundColor="inherit");h.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.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)r.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var q=this.editor.graph,u=null,x=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),
+k,b,a,a.getMode());mxEvent.consume(d)}),y=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=m.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",r.insertBefore(u,r.firstChild),h.style.paddingRight=18*r.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=u&&null!=
+u.parentNode&&(u.parentNode.removeChild(u),h.style.paddingRight=18*r.childNodes.length+"px")})):null==p&&(p=m.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),r.insertBefore(p,r.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(h.style.paddingRight=18*r.childNodes.length+"px",p.parentNode.removeChild(p),
+p=null)});mxEvent.consume(d)})),h.style.paddingRight=18*r.childNodes.length+"px")}),B=mxUtils.bind(this,function(a,d,c,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var n=q.getCellGeometry(a[g]);null!=n&&n.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);
+y(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=q.getSelectionCells(),b=q.view.getBounds(d),c=q.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=q.view.translate.x;b.y-=q.view.translate.y;B(d,b)}mxEvent.consume(a)});
+k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility=
+"visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";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.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,n,l,t,r,h,m){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),
+d=[new mxCell("",new mxGeometry(0,0,l,t),d)],d[0].vertex=!0,B(d,new mxRectangle(0,0,l,t),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var w=!1,p=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(g.documentElement));e(n,k);b=b.concat(n);y(a);this.spinner.stop();
+w=!0}catch(S){}else if("mxfile"==g.documentElement.nodeName)try{for(var l=g.documentElement.getElementsByTagName("diagram"),g=0;g<l.length;g++){var n=mxUtils.getTextContent(l[g]),t=this.stringToCells(this.editor.graph.decompress(n)),r=this.editor.graph.getBoundingBoxFromGeometry(t);B(t,new mxRectangle(0,0,r.width,r.height),a)}w=!0}catch(S){null!=window.console&&console.log("error in drop handler:",S)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&
+null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=m&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r)||/(\.vsd)($|\?)/i.test(r))?this.importVisio(m,function(a){p(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?p(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):p(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));r.insertBefore(m,r.firstChild);mxEvent.addListener(m,
+"click",x);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&x(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));r.insertBefore(c,r.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,
+"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),r.insertBefore(c,r.firstChild))}h.appendChild(r);h.style.paddingRight=18*r.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=
+function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
+EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
+Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
+"0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,m){a=new ImageDialog(this,a,b,c,e,m);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){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=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,m){a=new LibraryDialog(this,a,b,c,e,m);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,n){a=new ImageDialog(this,a,b,c,e,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){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=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,n){a=new LibraryDialog(this,a,b,c,e,n);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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){var d=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),h=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
+this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=
-mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,h)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,m,g,k,l,n,r,q){a=new ErrorDialog(this,a,b,c,e,m,g,k,null,l,n);this.showDialog(a.container,r||340,q||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
-b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,m){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,m)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,n,l,h,k,m,r,p){a=new ErrorDialog(this,a,b,c,e,n,l,h,null,k,m);this.showDialog(a.container,r||340,p||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
+b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,n)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
-EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,m){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?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)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
-"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var h=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(h?parseInt(h[2],10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},
-0),d.click(),d.parentNode.removeChild(d)}catch(v){}}else this.createEchoRequest(a,b,c,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,m,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=m?"&format="+m:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),h=Array(e),
-k=0;k<e;++k){for(var l=1024*k,n=Math.min(l+1024,c),r=Array(n-l),q=0;l<n;++q,++l)r[q]=d[l].charCodeAt(0);h[k]=new Uint8Array(r)}return new Blob(h,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,m,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
-null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(A){this.handleError(A)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<m,4<m?3:4,a,c,e);this.showDialog(b.container,
-420,m==(mxClient.IS_IOS?0:1)?160:4<m?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:
+EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?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)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
+"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},
+0),d.click(),d.parentNode.removeChild(d)}catch(v){}}else this.createEchoRequest(a,b,c,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),g=Array(e),
+h=0;h<e;++h){for(var k=1024*h,m=Math.min(k+1024,c),r=Array(m-k),p=0;k<m;++p,++k)r[p]=d[k].charCodeAt(0);g[h]=new Uint8Array(r)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,n,l,h){l=null!=l?l:!1;h=null!=h?h:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
+null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(G){this.handleError(G)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,h,null,1<n,4<n?3:4,a,c,e);this.showDialog(b.container,
+420,n==(mxClient.IS_IOS?0:1)?160:4<n?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:
";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var d=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=d.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 f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();
+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 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.exportToCanvas(mxUtils.bind(this,function(a){e.stop();
this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",d);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(d.substring(d.indexOf(",")+
-1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));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,e,m){this.isLocalFileSave()?this.saveLocalFile(c,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
-d){return this.createEchoRequest(c,a,e,m,b,d)}),c,m,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,m,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,
-function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,d,c)}catch(x){this.handleError(x)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,d,c)}catch(x){this.handleError(x)}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,k,null,1<d,4<d?3:4,e,g,m);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,m,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,m,g,k,l,n){if(this.spinner.spin(document.body,
-mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,k,l,null,c);e&&this.editor.graph.addSvgShadow(f);var h=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?
-d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!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(h,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):p(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,m,g){g=null!=g?g:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled",
-"disabled");g&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),m||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(a))})));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&
-(e=window.location.href);var h=document.createElement("select");h.style.width="120px";h.style.marginLeft="8px";h.style.marginRight="10px";h.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));h.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");h.appendChild(c);a.appendChild(h);mxEvent.addListener(h,"change",mxUtils.bind(this,function(){if("custom"==
-h.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:h.value="blank"},mxResources.get("url"),null,null,null,null,function(){h.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===h.value?"_blank":e:null},getEditInput:function(){return d},
-getEditSelect:function(){return h}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=h&&h!=mxConstants.NONE?"border:1px solid black;background-color:"+h:"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=
+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));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,e,n){this.isLocalFileSave()?this.saveLocalFile(c,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
+d){return this.createEchoRequest(c,a,e,n,b,d)}),c,n,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,n,l,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,
+function(c){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,l,!0,d,c)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,l,!0,d,c)}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,h,null,1<d,4<d?3:4,e,l,n);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,n,l){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,n,l,h,k,m){if(this.spinner.spin(document.body,
+mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,h,k,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?
+d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!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(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,t,this.thumbImageCache)):t(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,n,l){l=null!=l?l:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled",
+"disabled");l&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),n||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(a))})));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&
+(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));g.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");g.appendChild(c);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==
+g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return d},
+getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(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 e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value",
-"frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var h="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(h||"none",function(a){h=a;d()});mxEvent.consume(a)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||
-mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return h},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,m,g,k,l){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),g&&
-f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(d=this.getCurrentFile(),l||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));
-a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,m,g,k,l,n,r,q){this.getBasenames();var d={};""!=m&&m!=mxConstants.NONE&&(d.highlight=m);"auto"!==e&&(d.target=e);n||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;
-c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];k&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),d.toolbar=c.join(" "));null!=r&&0<r.length&&(d.edit=r);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
-"copy");h.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(p);mxUtils.br(h);h.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));h.appendChild(p);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),
-h.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(h);var n=this.addLinkSection(d),q=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
-"12px";t.value="100%";d.appendChild(t);var F=this.addCheckbox(d,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(d,mxResources.get("allPages"),h,!h),D=this.addCheckbox(d,mxResources.get("layers"),!0),G=this.addCheckbox(d,mxResources.get("lightbox"),!0),L=this.addEditButton(d,G),C=L.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&G.checked?
-L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,q.checked,t.value,n.getTarget(),n.getColor(),F.checked,y.checked,D.checked,G.checked,L.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,m,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var h=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));k.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));p.style.marginTop="12px";p.className="geBtn";k.appendChild(p);d.appendChild(k);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check"));
-k.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(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 l=null,n=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),
-l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=e+"px",d.appendChild(n),mxUtils.br(d);var q=this.addLinkSection(d,g);c=null!=this.pages&&1<this.pages.length;var t=null;
-if(null==h||h.constructor!=window.DriveFile||b)t=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,D),L=G.getEditInput(),C=this.addCheckbox(d,mxResources.get("layers"),!0);C.style.marginLeft=L.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(C.removeAttribute("disabled"),L.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),L.setAttribute("disabled",
-"disabled"));L.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){m(q.getTarget(),q.getColor(),null==t?!0:t.checked,D.checked,G.getLink(),C.checked,null!=l?l.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
-document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(f);var h=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!h.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,m,g,k,l){k=null!=k?k:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,h="jpeg"==l?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-d.appendChild(p);mxUtils.write(d,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%";d.appendChild(n);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
-"0";d.appendChild(u);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=l),w=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");g&&(d.appendChild(t),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),
-h+=26,mxEvent.addListener(w,"change",function(){w.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked","checked"),t.defaultChecked=!0);var L=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(d.appendChild(C),mxUtils.write(d,
-mxResources.get("embedImages")),mxUtils.br(d),h+=26);var I=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),E=null!=this.pages&&1<this.pages.length,J=this.addCheckbox(d,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=l);J.style.marginLeft="24px";J.style.marginBottom="16px";E||(J.style.visibility="hidden");mxEvent.addListener(I,"change",function(){I.checked&&E?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});k&&E||J.setAttribute("disabled",
-"disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;m(n.value,q.checked,!w.checked,L.checked,I.checked,C.checked,u.value,t.checked,!J.checked)}),null,c,e);this.showDialog(a.container,340,h,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,m){var d=document.createElement("div");
-d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(h)}var k=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(d,c),n=this.addCheckbox(d,mxResources.get("lightbox"),!0),q=this.addEditButton(d,n),t=q.getEditInput(),y=1<f.model.getChildCount(f.model.getRoot()),
-D=this.addCheckbox(d,mxResources.get("layers"),y,!y);D.style.marginLeft=t.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(y&&D.removeAttribute("disabled"),t.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,
-function(){a(k.checked,p.checked,l.checked,n.checked,q.getLink(),D.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,m,g,k,l){function d(d){var b=" ",h="";e&&(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('https://www.draw.io/?client=1&lightbox=1"+
-(m?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+d+'"'+p+(""!=h?' style="'+h+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
-null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";c&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,e,m,g,k){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var p=f[h].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var l=" ",n="";e&&(l="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(m?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+l+"/>")}))}else n="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(m?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=n&&d.setAttribute("style",n),k(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+
+"frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;d()});mxEvent.consume(a)}));d();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||
+mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,n,l,h,k){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),l&&
+f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=h?c="#U"+encodeURIComponent(h):(d=this.getCurrentFile(),k||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));
+a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,n,l,h,k,m,r,p){this.getBasenames();var d={};""!=n&&n!=mxConstants.NONE&&(d.highlight=n);"auto"!==e&&(d.target=e);m||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;
+c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];h&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);k&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),d.toolbar=c.join(" "));null!=r&&0<r.length&&(d.edit=r);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!h);b='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";p(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var 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");f=k.cloneNode(!0);f.setAttribute("value",
+"copy");g.appendChild(f);var h=document.createElement("span");mxUtils.write(h,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(h);mxUtils.br(g);g.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("publicDiagramUrl"));g.appendChild(h);var r=this.getCurrentFile();null==c&&null!=r&&r.constructor==window.DriveFile&&(h=document.createElement("a"),h.style.paddingLeft="12px",h.style.color="gray",h.setAttribute("href","javascript:void(0);"),mxUtils.write(h,mxResources.get("share")),
+g.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(r.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(g);var t=this.addLinkSection(d),m=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");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="100%";d.appendChild(p);var q=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(d,mxResources.get("allPages"),g,!g),y=this.addCheckbox(d,mxResources.get("layers"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),I=this.addEditButton(d,B),z=I.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&B.checked?
+I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,m.checked,p.value,t.getTarget(),t.getColor(),q.checked,u.checked,y.checked,B.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,n,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var t=document.createElement("div");t.style.whiteSpace="normal";mxUtils.write(t,mxResources.get("linkAccountRequired"));h.appendChild(t);t=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));t.style.marginTop="12px";t.className="geBtn";h.appendChild(t);d.appendChild(h);t=document.createElement("a");t.style.paddingLeft="12px";t.style.color="gray";t.style.fontSize="11px";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("check"));
+h.appendChild(t);mxEvent.addListener(t,"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 m=null,p=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),m=document.createElement("input"),
+m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,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=e+"px",d.appendChild(p),mxUtils.br(d);var q=this.addLinkSection(d,l);c=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var y=this.addCheckbox(d,mxResources.get("lightbox"),!0),B=this.addEditButton(d,y),I=B.getEditInput(),z=this.addCheckbox(d,mxResources.get("layers"),!0);z.style.marginLeft=I.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(z.removeAttribute("disabled"),I.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),I.setAttribute("disabled",
+"disabled"));I.checked&&y.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){n(q.getTarget(),q.getColor(),null==u?!0:u.checked,y.checked,B.getLink(),z.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
+document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,n,l,h,k){h=null!=h?h:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==k?196:300,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+d.appendChild(t);mxUtils.write(d,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||
+"0";d.appendChild(p);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=k),w=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled","disabled");u.setAttribute("type","checkbox");l&&(d.appendChild(u),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),
+g+=26,mxEvent.addListener(w,"change",function(){w.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(d.appendChild(z),mxUtils.write(d,
+mxResources.get("embedImages")),mxUtils.br(d),g+=26);var F=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=k),D=null!=this.pages&&1<this.pages.length,K=this.addCheckbox(d,D?mxResources.get("allPages"):"",D,!D,null,"jpeg"!=k);K.style.marginLeft="24px";K.style.marginBottom="16px";D||(K.style.visibility="hidden");mxEvent.addListener(F,"change",function(){F.checked&&D?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});h&&D||K.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=m.value;n(m.value,q.checked,!w.checked,I.checked,F.checked,z.checked,p.value,u.checked,!K.checked)}),null,c,e);this.showDialog(a.container,340,g,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,n){var d=document.createElement("div");
+d.style.whiteSpace="nowrap";var f=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";d.appendChild(g)}var h=this.addCheckbox(d,mxResources.get("fit"),!0),r=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),t=this.addCheckbox(d,c),m=this.addCheckbox(d,mxResources.get("lightbox"),!0),p=this.addEditButton(d,m),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),
+y=this.addCheckbox(d,mxResources.get("layers"),u,!u);y.style.marginLeft=q.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(u&&y.removeAttribute("disabled"),q.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&m.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,
+function(){a(h.checked,r.checked,t.checked,m.checked,p.getLink(),y.checked)}),null,mxResources.get("embed"),n);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,n,l,h,k){function d(d){var b=" ",g="";e&&(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('https://www.draw.io/?client=1&lightbox=1"+
+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var k="";c&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');h('<img src="'+d+'"'+k+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){k({message:mxResources.get("unknownError")})}),
+null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?d("data:image/png;base64,"+m.getText()):k({message:mxResources.get("unknownError")})}))}else k({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,e,n,l,h){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var m=f[g].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var t=" ",p="";e&&(t="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('https://www.draw.io/?client=1&lightbox=1"+
+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+t+"/>")}))}else p="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),h(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+
" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==a.nodeName){var c=a.getElementsByTagName("diagram");if(0<
-c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
-e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(r){null!=b&&b(r)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,c,e,k,g,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?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(e?"":'<?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(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,g,l,n,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,c,n):null,q)}catch(A){"Invalid image"==A.message?this.downloadFile(q):this.handleError(A)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,g,l)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},g=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],h=1;h<b.length;h++){var g=
-b[h].indexOf(")");f.push('url("');f.push(e[d(b[h].substring(0,g))]);f.push('"'+b[h].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),n=null,r=b[k].indexOf("format(",l);0<r&&(n=d(b[k].substring(r+7,b[k].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))d=
-"application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))d="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(d){e[a]=d;c--;g()}),mxUtils.bind(this,
-function(a){c--;g()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[k].substring(0,l)),n)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,g,l,n,q,r,t,A,x,F){g=null!=g?g:!0;A=null!=A?A:this.editor.graph;x=null!=x?x:0;var d=q?null:A.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==q&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(A.getSvg(d,null,null,F,null,null!=l?l:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
-function(){try{var f=document.createElement("canvas"),h=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=g?Math.min(1,Math.min(3*b/(4*m),b/h)):b/h);h=Math.ceil(n*h)+2*x;m=Math.ceil(n*m)+2*x;f.setAttribute("width",h);f.setAttribute("height",m);var p=f.getContext("2d");null!=d&&(p.beginPath(),p.rect(0,0,h,m),p.fillStyle=d,p.fill());p.scale(n,n);p.drawImage(e,x/n,x/n);a(f)}catch(W){null!=k&&k(W)}});e.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(c);
-var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(A,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(C){null!=k&&k(C)}}),c,t)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
+c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
+e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(r){null!=b&&b(r)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,c,e,n,l,h){h=b.background;h==mxConstants.NONE&&(h=null);b=b.getSvg(h,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=n)this.convertImages(b,mxUtils.bind(this,function(a){n((e?"":'<?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(e?"":'<?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(b)};EditorUi.prototype.exportImage=function(a,b,c,e,n,l,h,k,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,c,k):null,m)}catch(G){"Invalid image"==G.message?this.downloadFile(m):this.handleError(G)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,l,h)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},l=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var k=
+b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,k))]);f.push('"'+b[g].substring(k))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var h=1;h<b.length;h++){var k=b[h].indexOf(")"),m=null,r=b[h].indexOf("format(",k);0<r&&(m=d(b[h].substring(r+7,b[h].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))d=
+"application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))d="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(d){e[a]=d;c--;l()}),mxUtils.bind(this,
+function(a){c--;l()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[h].substring(0,k)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,n,l,h,k,m,r,p,q,u,C){l=null!=l?l:!0;q=null!=q?q:this.editor.graph;u=null!=u?u:0;var d=m?null:q.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==m&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(q.getSvg(d,null,null,C,null,null!=h?h:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
+function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),h=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=l?Math.min(1,Math.min(3*b/(4*h),b/g)):b/g);g=Math.ceil(k*g)+2*u;h=Math.ceil(k*h)+2*u;f.setAttribute("width",g);f.setAttribute("height",h);var m=f.getContext("2d");null!=d&&(m.beginPath(),m.rect(0,0,g,h),m.fillStyle=d,m.fill());m.scale(k,k);m.drawImage(e,u/k,u/k);a(f)}catch(W){null!=n&&n(W)}});e.onerror=function(a){null!=n&&n(a)};try{r&&this.editor.graph.addSvgShadow(c);
+var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(q,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(z){null!=n&&n(z)}}),c,p)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,
-function(c,h){for(var g=a.getElementsByTagName(c),k=0;k<g.length;k++)mxUtils.bind(this,function(c){var g=e.convert(c.getAttribute(h));if(null!=g&&"data:"!=g.substring(0,5)){var k=f[g];null==k?(d++,this.convertImageToDataUri(g,function(e){null!=e&&(f[g]=e,c.setAttribute(h,e));d--;0==d&&b(a)})):c.setAttribute(h,k)}else null!=g&&c.setAttribute(h,g)})(g[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,k,g){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
-/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+this.base64Encode(e)}b(e)}}else null!=
-c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
+function(c,g){for(var k=a.getElementsByTagName(c),n=0;n<k.length;n++)mxUtils.bind(this,function(c){var k=e.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var n=f[k];null==n?(d++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,n)}else null!=k&&c.setAttribute(g,k)})(k[n])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,n,l){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
+/(\.gif)($|\?)/i.test(a);n=null!=n?n:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}l=null!=l?l:"data:image/png;base64,";e=l+this.base64Encode(e)}b(e)}}else null!=
+c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){n&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),
-e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),m=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");
-if(1==p.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){f.model.beginUpdate();try{for(a=0;a<p.length;a++){var l=this.updatePageRoot(new DiagramPage(p[a])),n=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[n+1]));f.model.execute(new ChangePage(this,l,l,n))}}finally{f.model.endUpdate()}}}null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,b,c,e))}}catch(x){throw k||this.handleError(x,mxResources.get("invalidOrMissingFile")),
-x;}return d};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,
-b,c)}catch(u){c(u)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(u){c(u)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
-this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(w){this.handleError(w)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",
-d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var d in k.Pages)a.push(k.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
-EditorUi.prototype.insertTextAt=function(a,b,c,e,k,g,l){g=null!=g?g:!0;l=null!=l?l:!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()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,c,g,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(f,b,c,g,!0),0<h.length)return h}catch(z){}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){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),h=Math.round(e.width*f);e=Math.round(e.height*f);d.setSelectionCell(d.insertVertex(null,
-null,"",d.snap(b),d.snap(c),h,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,g);else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value=a,d.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(k.value)&&
-d.setLinkForCell(k,k.value),k.geometry.width+=d.gridSize,k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,e,k,g,l,n,q,r,t){r=null!=r?r:!0;var d=!1,f=null,h=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):d=this.importXml(a,c,e,r);null!=n&&n(d)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,r),q=
-!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,r);null!=n&&n(a)})):null!=
-q&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l)||/(\.vsd)($|\?)/i.test(l))?(d=!0,this.importVisio(q,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=n&&n(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,r));d||null==n||n(f);
-return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,g,k;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}k=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return d};
-EditorUi.prototype.importFiles=function(a,b,c,e,k,g,l,n,q,r,t,A){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=t||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>m){h=!0;break}var u=mxUtils.bind(this,function(){var h=this.editor.graph,m=h.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,h,g,k,m){return null!=a&&"<mxlibrary"==a.substring(0,
-10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,e,f,h,g,k,m,d,A)});g=null!=g?g:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=n)n(u);else{var d=[];h.getModel().beginUpdate();try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{h.getModel().endUpdate()}}g(d)}}),
-v=0;v<p;v++)mxUtils.bind(this,function(d){var g=a[d],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var p=a.target.result,n=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(n+1)))),C=mxUtils.parseXml(q),q=C.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=A?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));
-null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(p.substring(0,n+1),null!=C){var a=C.getElementsByTagName("svg");if(0<a.length){var l=a[0],r=parseFloat(l.getAttribute("width")),q=parseFloat(l.getAttribute("height")),u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+r+" "+q);else if(isNaN(r)||isNaN(q)){var t=u.split(" ");3<t.length&&(r=parseFloat(t[2]),
-q=parseFloat(t[3]))}p=this.createSvgDataUri(mxUtils.getXml(l));var E=Math.min(1,Math.min(e/Math.max(1,r)),e/Math.max(1,q)),w=k(p,g.type,b+d*m,c+d*m,Math.max(1,Math.round(r*E)),Math.max(1,Math.round(q*E)),g.name,f);if(isNaN(r)||isNaN(q)){var v=new Image;v.onload=mxUtils.bind(this,function(){r=Math.max(1,v.width);q=Math.max(1,v.height);w[0].geometry.width=r;w[0].geometry.height=q;l.setAttribute("viewBox","0 0 "+r+" "+q);p=this.createSvgDataUri(mxUtils.getXml(l));var a=p.indexOf(";");0<a&&(p=p.substring(0,
-a)+p.substring(p.indexOf(",",a+1)));h.setCellStyles("image",p,[w[0]])});v.src=this.createSvgDataUri(mxUtils.getXml(l))}return w}}}catch(ra){}return null})):w(d,mxUtils.bind(this,function(){return k(u,"text/xml",b+d*m,c+d*m,0,0,g.name)}))}}else{q=!1;if("image/png"==g.type){var E=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var v=new Image;v.src=a.target.result;w(d,mxUtils.bind(this,function(){return k(E,"text/xml",b+d*m,c+d*m,v.width,v.height,g.name)}));q=!0}}q||(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(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,p,l){w(d,mxUtils.bind(this,function(){if(null!=h&&h.length<r){var n=f&&this.isResampleImage(a.target.result,t)?Math.min(1,
-Math.min(e/p,e/l)):1;return k(h,g.type,b+d*m,c+d*m,Math.round(p*n),Math.round(l*n),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,g.type,b+d*m,c+d*m,240,160,g.name,function(a){w(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)||/(\.vsd)($|\?)/i.test(g.name)?k(null,g.type,b+d*m,c+d*m,240,160,
-g.name,function(a){w(d,function(){return a})},g):"image"==g.type.substring(0,5)?p.readAsDataURL(g):p.readAsText(g)})(v)});h?this.confirmImageResize(function(a){f=a;u()},q):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||
+e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,n){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),h=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var m=h.getElementsByTagName("diagram");
+if(1==m.length)h=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(a=0;a<m.length;a++){var t=this.updatePageRoot(new DiagramPage(m[a])),p=this.pages.length;null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,t,t,p))}}finally{f.model.endUpdate()}}}null!=h&&"mxGraphModel"===h.nodeName&&(d=f.importGraphModel(h,b,c,e))}}catch(H){throw n||this.handleError(H,mxResources.get("invalidOrMissingFile")),
+H;}return d};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,
+b,c)}catch(k){c(k)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(k){c(k)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
+this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,n){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,n)}catch(w){this.handleError(w)}finally{null!=n&&n()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,n){n=JSON.parse(a);a=[];if(null!=n.state){n=JSON.parse(n.state);for(var d in n.Pages)a.push(n.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(n);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
+EditorUi.prototype.insertTextAt=function(a,b,c,e,n,l,h){l=null!=l?l:!0;h=null!=h?h:!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()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=
+this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,c,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,c,l,!0),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){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),h,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);d.setSelectionCell(d.insertVertex(null,
+null,"",d.snap(b),d.snap(c),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
+if(this.isCompatibleString(a))return this.importXml(a,b,c,l);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,l);else{d=this.editor.graph;n=null;d.getModel().beginUpdate();try{n=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[n])),n.value=a,d.updateCellSize(n),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(n.value)&&
+d.setLinkForCell(n,n.value),n.geometry.width+=d.gridSize,n.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,e,n,l,h,k,m,r,p){r=null!=r?r:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,h)):d=this.importXml(a,c,e,r);null!=k&&k(d)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=p?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,r),m=
+!0)),m||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,r);null!=k&&k(a)})):null!=
+m&&null!=h&&(/(\.vsdx)($|\?)/i.test(h)||/(\.vssx)($|\?)/i.test(h)||/(\.vsd)($|\?)/i.test(h))?(d=!0,this.importVisio(m,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(d=!0,this.parseFile(null!=m?m: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!=k&&k(null))}),h)):/(\.vsd)($|\?)/i.test(h)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,r));d||null==k||k(f);
+return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,l,h;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}l=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(l&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);d+="=";break}h=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(h&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return d};
+EditorUi.prototype.importFiles=function(a,b,c,e,n,l,h,k,m,r,p,q){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var t=p||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>t){g=!0;break}var w=mxUtils.bind(this,function(){var g=this.editor.graph,m=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,b,c,e,f,g,k,n,l){return null!=a&&"<mxlibrary"==a.substring(0,
+10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,f,g,k,n,l,d,q)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,u=t,w=[],v=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--u){this.spinner.stop();if(null!=k)k(w);else{var d=[];g.getModel().beginUpdate();try{for(var c=0;c<w.length;c++){var e=w[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}l(d)}}),
+E=0;E<t;E++)mxUtils.bind(this,function(d){var k=a[d],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,t=l.indexOf(","),z=decodeURIComponent(escape(atob(l.substring(t+1)))),D=mxUtils.parseXml(z),z=D.getElementsByTagName("svg");if(0<z.length){var z=z[0],u=q?null:z.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));
+null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(l.substring(0,t+1),null!=D){var a=D.getElementsByTagName("svg");if(0<a.length){var h=a[0],r=parseFloat(h.getAttribute("width")),p=parseFloat(h.getAttribute("height")),q=h.getAttribute("viewBox");if(null==q||0==q.length)h.setAttribute("viewBox","0 0 "+r+" "+p);else if(isNaN(r)||isNaN(p)){var z=q.split(" ");3<z.length&&(r=parseFloat(z[2]),
+p=parseFloat(z[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var u=Math.min(1,Math.min(e/Math.max(1,r)),e/Math.max(1,p)),F=n(l,k.type,b+d*m,c+d*m,Math.max(1,Math.round(r*u)),Math.max(1,Math.round(p*u)),k.name,f);if(isNaN(r)||isNaN(p)){var w=new Image;w.onload=mxUtils.bind(this,function(){r=Math.max(1,w.width);p=Math.max(1,w.height);F[0].geometry.width=r;F[0].geometry.height=p;h.setAttribute("viewBox","0 0 "+r+" "+p);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,
+a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[F[0]])});w.src=this.createSvgDataUri(mxUtils.getXml(h))}return F}}}catch(ra){}return null})):v(d,mxUtils.bind(this,function(){return n(u,"text/xml",b+d*m,c+d*m,0,0,k.name)}))}}else{z=!1;if("image/png"==k.type){var F=q?null:this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var w=new Image;w.src=a.target.result;v(d,mxUtils.bind(this,function(){return n(F,"text/xml",b+d*m,c+d*m,w.width,w.height,k.name)}));z=!0}}z||(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(g,l,h){v(d,mxUtils.bind(this,function(){if(null!=g&&g.length<r){var t=f&&this.isResampleImage(a.target.result,p)?Math.min(1,
+Math.min(e/l,e/h)):1;return n(g,k.type,b+d*m,c+d*m,Math.round(l*t),Math.round(h*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,p)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n(a.target.result,k.type,b+d*m,c+d*m,240,160,k.name,function(a){v(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)||/(\.vsd)($|\?)/i.test(k.name)?n(null,k.type,b+d*m,c+d*m,240,160,
+k.name,function(a){v(d,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(E)});g?this.confirmImageResize(function(a){f=a;w()},m):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||
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,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format",
-"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,g){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,g))try{var h=Math.max(d/k,f/k);if(1<h){var p=Math.round(d/h),m=Math.round(f/h),l=document.createElement("canvas");
-l.width=p;l.height=m;l.getContext("2d").drawImage(a,0,0,p,m);var n=l.toDataURL();if(n.length<b.length){var q=document.createElement("canvas");q.width=p;q.height=m;var t=q.toDataURL();n!==t&&(b=n,d=p,f=m)}}}catch(D){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
-function(a,b,c,e,k){function d(a,b){var d=p;p+=b;return a.substring(d,p)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(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 p=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,
-p);do{var l=f(a);if("IDAT"==d(a,4)){k=a.substring(0,p-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);k+=h(c.length)+b+c+h(e^4294967295);k+=a.substring(p-8,a.length);break}k+=a.substring(p-8,p-4+l);d(a,l);d(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&
-!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(m){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
-null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,
+"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,n,l){n=null!=n?n:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(d/n,f/n);if(1<g){var h=Math.round(d/g),m=Math.round(f/g),p=document.createElement("canvas");
+p.width=h;p.height=m;p.getContext("2d").drawImage(a,0,0,h,m);var t=p.toDataURL();if(t.length<b.length){var q=document.createElement("canvas");q.width=h;q.height=m;var u=q.toDataURL();t!==u&&(b=t,d=h,f=m)}}}catch(y){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,h=0;8>h;h++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
+function(a,b,c,e,n){function d(a,b){var d=h;h+=b;return a.substring(d,h)}function f(a){a=d(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 h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=n&&n();else if(d(a,4),"IHDR"!=d(a,4))null!=n&&n();else{d(a,17);n=a.substring(0,
+h);do{var m=f(a);if("IDAT"==d(a,4)){n=a.substring(0,h-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);n+=g(c.length)+b+c+g(e^4294967295);n+=a.substring(h-8,a.length);break}n+=a.substring(h-8,h-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(n):Base64.encode(n,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&
+!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(n){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
+null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var m=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,
d){a(d.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,
-arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
-360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:g.apply(this,arguments)};var n=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var h=d.indexOf(",");0<h&&(h=b.getPageById(d.substring(h+1)),e=null!=
-h?h.getName():mxResources.get("pageNotFound"))}h=n.call(this,d,e);f&&mxEvent.addListener(h,"click",function(b){a(d);mxEvent.consume(b)});return h};var q=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
-d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){z.innerHTML="&nbsp;";z.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);
+arguments)};var n=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};n.call(this,b,d,e)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
+360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:l.apply(this,arguments)};var h=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=
+g?g.getName():mxResources.get("pageNotFound"))}g=h.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var k=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))k.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
+d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){q.innerHTML="&nbsp;";q.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");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);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=a.clipboardData||a.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;
-for(index in f){var h=f[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,d,c,e,f,h){b.insertImage(a,f,h)},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([h.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(O){}}),!1);var z=document.createElement("div");z.style.position="absolute";z.style.whiteSpace=
-"nowrap";z.style.overflow="hidden";z.style.display="block";z.contentEditable=!0;mxUtils.setOpacity(z,0);z.style.width="1px";z.style.height="1px";z.innerHTML="&nbsp;";var A=!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 b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
-b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||A||(z.style.left=c.container.scrollLeft+10+"px",z.style.top=c.container.scrollTop+10+"px",c.container.appendChild(z),A=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){z.focus();document.execCommand("selectAll",!1,null)},0):(z.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!A||
-224!=b&&17!=b&&91!=b||(A=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),z.parentNode.removeChild(z))}),0)}));mxEvent.addListener(z,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(z),r())}));mxEvent.addListener(z,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(z,!0),r())}));mxEvent.addListener(z,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(z.innerHTML="&nbsp;",z.focus(),
-window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,z);z.innerHTML="&nbsp;"}),0))}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==z?!0:x.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
+for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,d,c,e,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]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(Q){}}),!1);var q=document.createElement("div");q.style.position="absolute";q.style.whiteSpace=
+"nowrap";q.style.overflow="hidden";q.style.display="block";q.contentEditable=!0;mxUtils.setOpacity(q,0);q.style.width="1px";q.style.height="1px";q.innerHTML="&nbsp;";var u=!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 b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
+b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||u||(q.style.left=c.container.scrollLeft+10+"px",q.style.top=c.container.scrollTop+10+"px",c.container.appendChild(q),u=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){q.focus();document.execCommand("selectAll",!1,null)},0):(q.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!u||
+224!=b&&17!=b&&91!=b||(u=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),q.parentNode.removeChild(q))}),0)}));mxEvent.addListener(q,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(q),r())}));mxEvent.addListener(q,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(q,!0),r())}));mxEvent.addListener(q,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(q.innerHTML="&nbsp;",q.focus(),
+window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,q);q.innerHTML="&nbsp;"}),0))}),!0);var H=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==q?!0:H.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,function(a,d,c,e,f,h){b.insertImage(a,f,h)},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 d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),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,
+0,0,this.maxImageSize,function(a,d,c,e,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]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),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.insertImage(decodeURIComponent(d),c*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()})))}));if("1"==urlParams.ruler&&"undefined"!==
-typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px";F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var y=document.createElement("div");y.style.position="absolute";y.style.top=
-"95px";y.style.left="220px";y.style.width="30px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);this.vRuler=new mxRuler(this.editor.graph,F,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.test){t=document.getElementById("geFooter");null!=t&&(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)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);
-this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),
-G=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=G&&(G.parentNode.removeChild(G),G=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,h=b.y/e-d.y;mxEvent.isAltDown(a)&&(h=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var l=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(k=b[0].getAttribute("href")));var p=!0,m=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,h,!0,l,null,p))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){p=
-a;m()},mxEvent.isControlDown(a)):m()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,h,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(g,
-f,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background="whiteSmoke";document.body.appendChild(p);var C=document.createElement("div");C.style.position="absolute";C.style.top="125px";C.style.left="220px";C.style.width="30px";C.style.height="1000px";C.style.background="whiteSmoke";document.body.appendChild(C);var x=document.createElement("div");x.style.position="absolute";x.style.top=
+"95px";x.style.left="220px";x.style.width="30px";x.style.height="30px";x.style.background="whiteSmoke";document.body.appendChild(x);this.vRuler=new mxRuler(this.editor.graph,C,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.test){p=document.getElementById("geFooter");null!=p&&(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)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);
+this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),
+B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var l=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=l;var n=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(l=b[0].getAttribute("href")));var h=!0,m=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(l,f,g,!0,n,null,h))});n&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){h=
+a;m()},mxEvent.isControlDown(a)):m()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,
+f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,
!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"===d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||
-8==document.documentMode?mxUtils.getTextContent(b):b.textContent),h=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var d=b.getElementsByTagName("span"),l=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(h=!0,e=l)}catch(v){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(h||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,
-d,d)):(h=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,h.x+d,h.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var h=e.lastIndexOf("%3E");0<=h&&h<e.length-3&&(e=e.substring(0,h+3))}catch(v){}try{var d=b.getElementsByTagName("span"),k=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(g=!0,e=k)}catch(v){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,
+d,d)):(g=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,g.x+d,g.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",
function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=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 d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,
"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?
(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var g=document.documentElement;c=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=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=b+"px";g.style.left=d+"px";g.style.width=
-Math.max(0,c-3)+"px";g.style.height=Math.max(0,e-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 b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=
+EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var l=document.documentElement;c=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=d+"px";l.style.width=
+Math.max(0,c-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=
function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){var c=d.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,
mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
this.spinner.stop()}));else if("<mxlibrary"==d.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(r){this.handleError(r,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,
function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.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(){this.confirm(mxResources.get("allChangesLost"),
null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};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=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,
-a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),h=0;h<e;h++)this.addBasenamesForCell(c.model.getChildAt(a,h),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=
+a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),g=0;g<e;g++)this.addBasenamesForCell(c.model.getChildAt(a,g),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.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};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,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,
-page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,g=mxUtils.bind(this,function(a,b){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(f){function h(a){if(null!=
-a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(J){}return a}if(f.source==(window.opener||window.parent)){var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(E){g=null}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("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);
-this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){l=null;l="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.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();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:g}),"*")}return}if("template"==
-g.action){this.spinner.stop();var l=1==g.enableRecent,n=1==g.enableSearch,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,
-g.errorMsg);else{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 p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):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 m=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(m);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(m))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,C=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);
-q.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(m)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
-g.xml&&0<g.xml.length&&this.setFileData(g.xml);p=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),p.xml=mxUtils.getXml(l),p.data=this.getFileData(null,null,!0,null,null,null,l),p.format=g.format;else if("html"==g.format)m=this.editor.getGraphXml(),p.data=this.getHtml(m,this.editor.graph),p.xml=mxUtils.getXml(m),p.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
-l==mxConstants.NONE&&(l=null);p.xml=this.getFileData(!0);p.format="svg";if(g.embedImages||null==g.embedImages){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),"xmlsvg"==g.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(l),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}l="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));p.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==g.action)c=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.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}g=h(g);d=!0;try{a(g,f)}catch(E){this.handleError(E)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var I=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=I();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=I();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
-b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";k.postMessage(g,"*")};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":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
+function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,
+scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,l=mxUtils.bind(this,function(a,b){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,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=
+a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(K){}return a}if(f.source==(window.opener||window.parent)){var k=f.data;if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(D){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=
+k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&h.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);
+this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==k.action){l=null;l="data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):g(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(D){h.postMessage(JSON.stringify({event:"draft",error:D.toString(),message:k}),"*")}return}if("template"==
+k.action){this.spinner.stop();var l=1==k.enableRecent,n=1==k.enableSearch,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=k.callback?h.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;h.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;h.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){h.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,
+k.errorMsg);else{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 p=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=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=encodeURIComponent(p);h.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,z=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);
+q.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
+k.xml&&0<k.xml.length&&this.setFileData(k.xml);m=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=this.getFileData(null,null,!0,null,null,null,l),m.format=k.format;else if("html"==k.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
+l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(k.embedImages||null==k.embedImages){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),"xmlsvg"==k.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);h.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));h.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}h.postMessage(JSON.stringify(m),"*")}return}if("load"==k.action)c=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.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.xml&&"data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):k.xml;else{h.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}}k=g(k);d=!0;try{a(k,f)}catch(D){this.handleError(D)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
+1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=F();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=F();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
+b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||h.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var h=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):
+urlParams.ready||"ready";h.postMessage(l,"*")};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":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";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.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,g=null,k="",l="auto",n="auto",q=null,t=null,A=40,x=40,F=0,y=this.editor.graph;
-y.getGraphBounds();for(var D=function(){y.setSelectionCells(S);y.scrollCellToVisible(y.getSelectionCell())},G=y.getFreeInsertPoint(),L=G.x,C=G.y,G=C,I=null,E="auto",J=[],W=null,Y=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var O=a.indexOf(":");if(0<O){var M=mxUtils.trim(a.substring(1,O)),H=mxUtils.trim(a.substring(O+1));"label"==M?I=y.sanitizeHtml(H):
-"style"==M?e=H:"identity"==M&&0<H.length&&"-"!=H?g=H:"namespace"==M&&0<H.length&&"-"!=H?k=H:"width"==M?l=H:"height"==M?n=H:"left"==M&&0<H.length?q=H:"top"==M&&0<H.length?t=H:"ignore"==M?Y=H.split(","):"connect"==M?J.push(JSON.parse(H)):"link"==M?W=H:"padding"==M?F=parseFloat(H):"edgespacing"==M?A=parseFloat(H):"nodespacing"==M?x=parseFloat(H):"layout"==M&&(E=H)}}}var R=this.editor.csvToArray(b[U]);a=null;if(null!=g)for(var K=0;K<R.length;K++)if(g==R[K]){a=K;break}null==I&&(I="%"+R[0]+"%");if(null!=
-J)for(var P=0;P<J.length;P++)null==c[J[P].to]&&(c[J[P].to]={});y.model.beginUpdate();try{for(K=U+1;K<b.length;K++){var X=this.editor.csvToArray(b[K]);if(X.length==R.length){var B=null,V=null!=a?k+X[a]:null;null!=V&&(B=y.model.getCell(V));null==B&&(B=new mxCell(I,new mxGeometry(L,G,0,0),e||"whiteSpace=wrap;html=1;"),B.vertex=!0,B.id=V);for(var N=0;N<X.length;N++)y.setAttributeForCell(B,R[N],X[N]);y.setAttributeForCell(B,"placeholders","1");B.style=y.replacePlaceholders(B,B.style);for(P=0;P<J.length;P++)c[J[P].to][B.getAttribute(J[P].to)]=
-B;null!=W&&"link"!=W&&(y.setLinkForCell(B,B.getAttribute(W)),y.setAttributeForCell(B,W,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[B]));var Z=this.editor.graph.getPreferredSizeForCell(B);B.vertex&&(null!=q&&null!=B.getAttribute(q)&&(B.geometry.x=L+parseFloat(B.getAttribute(q))),null!=t&&null!=B.getAttribute(t)&&(B.geometry.y=C+parseFloat(B.getAttribute(t))),"@"==l.charAt(0)&&null!=B.getAttribute(l.substring(1))?B.geometry.width=parseFloat(B.getAttribute(l.substring(1))):B.geometry.width=
-"auto"==l?Z.width+F:parseFloat(l),"@"==n.charAt(0)&&null!=B.getAttribute(n.substring(1))?B.geometry.height=parseFloat(B.getAttribute(n.substring(1))):B.geometry.height="auto"==n?Z.height+F:parseFloat(n),G+=B.geometry.height+x);d.push(y.addCell(B))}}for(var aa=d.slice(),S=d.slice(),P=0;P<J.length;P++)for(var T=J[P],K=0;K<d.length;K++){var B=d[K],da=B.getAttribute(T.from);if(null!=da){y.setAttributeForCell(B,T.from,null);for(var na=da.split(","),N=0;N<na.length;N++){var ba=c[T.to][na[N]];null!=ba&&
-(I=T.label,null!=T.fromlabel&&(I=(B.getAttribute(T.fromlabel)||"")+(I||"")),null!=T.tolabel&&(I=(I||"")+(ba.getAttribute(T.tolabel)||"")),S.push(y.insertEdge(null,null,I||"",T.invert?ba:B,T.invert?B:ba,T.style||y.createCurrentEdgeStyle())),mxUtils.remove(T.invert?B:ba,aa))}}}if(null!=Y)for(K=0;K<d.length;K++)for(B=d[K],N=0;N<Y.length;N++)y.setAttributeForCell(B,mxUtils.trim(Y[N]),null);var ea=new mxParallelEdgeLayout(y);ea.spacing=A;var qa=function(){ea.execute(y.getDefaultParent());for(var a=0;a<
-d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==l&&(b.width=Math.round(y.snap(b.width)));"auto"==n&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==E){var ga=new mxCircleLayout(y);ga.resetEdges=!1;var ra=ga.isVertexIgnored;ga.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ga.execute(y.getDefaultParent());qa()},!0,D);D=null}else if("horizontaltree"==E||"verticaltree"==
-E||"auto"==E&&S.length==2*d.length-1&&1==aa.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==E);ha.levelDistance=x;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<aa.length?aa[0]:null)},!0,D);D=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==aa.length){y.view.validate();var ia=new mxHierarchicalLayout(y,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=x;
-ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(y.getDefaultParent(),S);y.moveCells(S,L,C)},!0,D);D=null}else if("organic"==E||"auto"==E&&S.length>d.length){y.view.validate();var ca=new mxFastOrganicLayout(y);ca.forceConstant=3*x;ca.resetEdges=!1;var ja=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ea=new mxParallelEdgeLayout(y);ea.spacing=A;this.executeLayout(function(){ca.execute(y.getDefaultParent());qa()},!0,D);D=null}this.hideDialog()}finally{y.model.endUpdate()}null!=
-D&&D()}}catch(ka){this.handleError(ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}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 d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&
+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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,l=null,h="",k="auto",m="auto",p=null,q=null,u=40,H=40,C=0,x=this.editor.graph;
+x.getGraphBounds();for(var y=function(){x.setSelectionCells(S);x.scrollCellToVisible(x.getSelectionCell())},B=x.getFreeInsertPoint(),I=B.x,z=B.y,B=z,F=null,D="auto",K=[],W=null,Y=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var Q=a.indexOf(":");if(0<Q){var M=mxUtils.trim(a.substring(1,Q)),J=mxUtils.trim(a.substring(Q+1));"label"==M?F=x.sanitizeHtml(J):
+"style"==M?e=J:"identity"==M&&0<J.length&&"-"!=J?l=J:"namespace"==M&&0<J.length&&"-"!=J?h=J:"width"==M?k=J:"height"==M?m=J:"left"==M&&0<J.length?p=J:"top"==M&&0<J.length?q=J:"ignore"==M?Y=J.split(","):"connect"==M?K.push(JSON.parse(J)):"link"==M?W=J:"padding"==M?C=parseFloat(J):"edgespacing"==M?u=parseFloat(J):"nodespacing"==M?H=parseFloat(J):"layout"==M&&(D=J)}}}var R=this.editor.csvToArray(b[U]);a=null;if(null!=l)for(var L=0;L<R.length;L++)if(l==R[L]){a=L;break}null==F&&(F="%"+R[0]+"%");if(null!=
+K)for(var O=0;O<K.length;O++)null==c[K[O].to]&&(c[K[O].to]={});x.model.beginUpdate();try{for(L=U+1;L<b.length;L++){var X=this.editor.csvToArray(b[L]);if(X.length==R.length){var A=null,V=null!=a?h+X[a]:null;null!=V&&(A=x.model.getCell(V));null==A&&(A=new mxCell(F,new mxGeometry(I,B,0,0),e||"whiteSpace=wrap;html=1;"),A.vertex=!0,A.id=V);for(var N=0;N<X.length;N++)x.setAttributeForCell(A,R[N],X[N]);x.setAttributeForCell(A,"placeholders","1");A.style=x.replacePlaceholders(A,A.style);for(O=0;O<K.length;O++)c[K[O].to][A.getAttribute(K[O].to)]=
+A;null!=W&&"link"!=W&&(x.setLinkForCell(A,A.getAttribute(W)),x.setAttributeForCell(A,W,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[A]));var Z=this.editor.graph.getPreferredSizeForCell(A);A.vertex&&(null!=p&&null!=A.getAttribute(p)&&(A.geometry.x=I+parseFloat(A.getAttribute(p))),null!=q&&null!=A.getAttribute(q)&&(A.geometry.y=z+parseFloat(A.getAttribute(q))),"@"==k.charAt(0)&&null!=A.getAttribute(k.substring(1))?A.geometry.width=parseFloat(A.getAttribute(k.substring(1))):A.geometry.width=
+"auto"==k?Z.width+C:parseFloat(k),"@"==m.charAt(0)&&null!=A.getAttribute(m.substring(1))?A.geometry.height=parseFloat(A.getAttribute(m.substring(1))):A.geometry.height="auto"==m?Z.height+C:parseFloat(m),B+=A.geometry.height+H);d.push(x.addCell(A))}}for(var aa=d.slice(),S=d.slice(),O=0;O<K.length;O++)for(var T=K[O],L=0;L<d.length;L++){var A=d[L],da=A.getAttribute(T.from);if(null!=da){x.setAttributeForCell(A,T.from,null);for(var na=da.split(","),N=0;N<na.length;N++){var ba=c[T.to][na[N]];null!=ba&&
+(F=T.label,null!=T.fromlabel&&(F=(A.getAttribute(T.fromlabel)||"")+(F||"")),null!=T.tolabel&&(F=(F||"")+(ba.getAttribute(T.tolabel)||"")),S.push(x.insertEdge(null,null,F||"",T.invert?ba:A,T.invert?A:ba,T.style||x.createCurrentEdgeStyle())),mxUtils.remove(T.invert?A:ba,aa))}}}if(null!=Y)for(L=0;L<d.length;L++)for(A=d[L],N=0;N<Y.length;N++)x.setAttributeForCell(A,mxUtils.trim(Y[N]),null);var ea=new mxParallelEdgeLayout(x);ea.spacing=u;var qa=function(){ea.execute(x.getDefaultParent());for(var a=0;a<
+d.length;a++){var b=x.getCellGeometry(d[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==k&&(b.width=Math.round(x.snap(b.width)));"auto"==m&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==D){var ga=new mxCircleLayout(x);ga.resetEdges=!1;var ra=ga.isVertexIgnored;ga.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ga.execute(x.getDefaultParent());qa()},!0,y);y=null}else if("horizontaltree"==D||"verticaltree"==
+D||"auto"==D&&S.length==2*d.length-1&&1==aa.length){x.view.validate();var ha=new mxCompactTreeLayout(x,"horizontaltree"==D);ha.levelDistance=H;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(x.getDefaultParent(),0<aa.length?aa[0]:null)},!0,y);y=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==aa.length){x.view.validate();var ia=new mxHierarchicalLayout(x,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=H;
+ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(x.getDefaultParent(),S);x.moveCells(S,I,z)},!0,y);y=null}else if("organic"==D||"auto"==D&&S.length>d.length){x.view.validate();var ca=new mxFastOrganicLayout(x);ca.forceConstant=3*H;ca.resetEdges=!1;var ja=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ea=new mxParallelEdgeLayout(x);ea.spacing=u;this.executeLayout(function(){ca.execute(x.getDefaultParent());qa()},!0,y);y=null}this.hideDialog()}finally{x.model.endUpdate()}null!=
+y&&y()}}catch(ka){this.handleError(ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}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 d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&
null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/
-a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
+a,8/a)};var l=b.init;b.init=function(){l.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=0;null==this.drive&&"function"!==typeof window.DriveClient||
d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.trello&&"function"!==typeof window.TrelloClient||d++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&d++;mxClient.IS_IOS||d++;return d};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("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").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.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));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding=
-"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
+"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
-IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());
-a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,g){var d=a.editor.graph;if("xml"==
-c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,g)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=d.getGraphBounds(),l=Math.floor(h.width*k/d.view.scale),n=Math.floor(h.height*k/d.view.scale);f.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,h,l){var d=a.editor.graph;if("xml"==
+c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,h,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),n=Math.floor(g.width*h/d.view.scale),m=Math.floor(g.height*h/d.view.scale);f.length<=MAX_REQUEST_SIZE&&n*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+m+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}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){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
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,e=b.graph,c=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,c);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState);
-b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,c){SelectPage.call(this,a,e);this.relatedPage=b;this.index=c;this.previousIndex=null}
+b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,c){SelectPage.call(this,a,e);this.relatedPage=b;this.index=c;this.previousIndex=null}
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;SelectPage.prototype.execute.apply(this,arguments)};
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.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));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 c=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&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),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===
-typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;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.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
-selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,h=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(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),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=
+!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){h();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),h=a.getAttribute("pageHeight"),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;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:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=h?new mxRectangle(0,0,parseFloat(c),parseFloat(h)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
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}};
Graph.prototype.setViewState=function(a){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=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
@@ -3005,124 +3007,183 @@ EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled
EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,c=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),c=a.node.cloneNode(!1),c.removeAttribute("id"),c=new DiagramPage(c),c.root=e.cloneCells([e.model.root])[0],c.viewState=e.getViewState(),c.viewState.scale=1,c.viewState.scrollLeft=null,c.viewState.scrollRight=null,c.setName(b),c=this.insertPage(c,mxUtils.indexOf(this.pages,a)+1));return c};
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.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c,
-"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,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.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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+e)/this.pages.length)+1),h=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),h=d):mxEvent.consume(b)}));mxEvent.addListener(c,
+"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=h&&d!=h&&this.movePage(h,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
+c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.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 q=this.createControlTab(4,
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";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);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 e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.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 c=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b);
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.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 c=mxEvent.getClientX(a),h=mxEvent.getClientY(a);b.popup(c,h,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,e){e=this.createTab(e);var c=a.getName();e.setAttribute("title",c);mxUtils.write(e,c);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!c){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);n.popup(q,t,null,l);this.setCurrentMenu(n,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,h=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;h=a==this.currentPage;e.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&h||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){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 q=mxEvent.getClientX(m),u=mxEvent.getClientY(m);p.popup(q,u,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,c){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,c){c.setAttribute("page",e.page.getId());return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.page=a.ui.getPageById(e.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,c));return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage"));
-b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,c,e,q,t){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),h=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),l=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&h.push(b);a!=e[f]&&h.push(a);return a==e[f]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[f],
-a))}for(f=0;f<h.length;f++)this.model.setVisible(h[f],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=g.view.getState(a),g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function q(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.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 t(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=q(a),h=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);g.view.currentRoot!=c&&(e[1].geometry.x-=h.x,e[1].geometry.y-=h.y);var k=g.view.getState(a),l=g.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var m=g.getOutgoingEdges(g.model.getTerminal(d[0],
-!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=h=d=0;t<m.length;t++){var r=g.model.getTerminal(m[t],!1);if(f==q(r)){var u=g.view.getState(r);r!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}p?h=0:d=0;for(t=0;t<m.length;t++)if(r=g.model.getTerminal(m[t],
-!1),f==q(r)&&(u=g.view.getState(r),r!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var C=[];g.traverse(u.cell,!0,function(a,b){null!=b&&C.push(b);C.push(a);return!0});g.moveCells(C,(b?1:-1)*d,(b?1:-1)*h)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function d(a){g.model.beginUpdate();try{var b=q(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1);
-var e=g.model.getParent(a),f=e.geometry,h=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);g.moveCells(h,k,l);return g.addCells(d,e)}finally{g.model.endUpdate()}}function h(a){g.model.beginUpdate();try{var b=
-g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var h=0;h<c.length;h++){var k=g.model.getTerminal(c[h],!1);null!=k&&f.push(k)}var l=g.view.getBounds(f),n=q(a),m=g.view.translate,p=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/p-m.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function f(a,
-b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.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 p(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?m.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=f(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var m=this,g=m.editor.graph,w=g.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=m.menus.createPopupMenu;m.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&
-(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};m.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");m.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),
-a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");m.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");m.actions.addAction("selectDescendants",
-function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=g.removeCells;g.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var h=a[f];w.isEdge(h)&&c(h)&&(e.push(h),h=w.getTerminal(h,!1));b(h)?(g.traverse(h,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),h=g.getIncomingEdges(a[f]),a=a.concat(h)):e.push(a[f])}a=e;return v.apply(this,arguments)};m.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var r=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var h=g.getIncomingEdges(f.cell),f=0;f<h.length;f++)mxUtils.remove(h[f],
-a)}this.model.beginUpdate();try{var k=r.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=g.getIncomingEdges(k[e]),h=g.getIncomingEdges(a[e]);if(0==l.length&&0<h.length){var n=this.cloneCells([h[0]])[0];this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(h[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=g.moveCells;g.moveCells=function(a,c,d,e,f,h,k){var l=null;this.model.beginUpdate();try{var n=f,m=this.view.getState(f),p=null!=m?m.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||g.model.isEdge(a[q])&&null==g.model.getTerminal(a[q],!0)){f=g.model.getParent(a[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var t=g.getIncomingEdges(a[0]);if(0<t.length){var r=g.view.getState(g.model.getTerminal(t[0],!0));if(null!=r){var u=g.view.getState(n);null!=u&&(c=(u.getCenterX()-r.getCenterX())/g.view.scale,d=(u.getCenterY()-r.getCenterY())/g.view.scale)}}}}l=z.apply(this,arguments);
-if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(n)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],n,!0);else if(b(a[q])&&(t=g.getIncomingEdges(a[q]),0<t.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==g.getIncomingEdges(l[q]).length){m=n;if(null==m||m==g.model.getParent(a[q]))m=g.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,
-g.getDefaultParent(),m,l[q])}}finally{this.model.endUpdate()}return l};if(null!=m.sidebar){var A=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,h=null;f.beginUpdate();try{if(h=A.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(f.isEdge(h[k])&&null==f.getTerminal(h[k],!0)){f.setTerminal(h[k],a,!0);var l=g.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return h}}var x={88:m.actions.get("selectChildren"),
-84:m.actions.get("selectSubtree"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},F=m.onKeyDown;m.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&b(g.getSelectionCell())&&1==g.getSelectionCount()){var c=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(g.getSelectionCell()):h(g.getSelectionCell()):13==a.which&&(c=t(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(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]),null!=m.hoverIcons&&m.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=x[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(g.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var y=g.connectVertex;g.connectVertex=function(a,c,e,f,k,l){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=q(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?h(a):f==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&&
-c!=mxConstants.DIRECTION_WEST)):y.call(this,a,c,e,f,k,l)};g.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&g.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var m=b.getAttribute("id");null==a.lookup(m)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
+Graph.prototype.foldCells=function(a,c,e,q,u){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),g=[],f=0;f<e.length;f++){var h=this.view.getState(e[f]),n=null!=h?h.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[f]&&g.push(a);return a==e[f]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[f],
+a))}for(f=0;f<g.length;f++)this.model.setVisible(g[f],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=l.view.getState(a),l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function q(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.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 u(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var c=l.model.getParent(a),d=l.getIncomingEdges(a),e=l.cloneCells([d[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);l.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),h=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*h:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*h;var m=l.getOutgoingEdges(l.model.getTerminal(d[0],
+!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<m.length;r++){var t=l.model.getTerminal(m[r],!1);if(f==q(t)){var u=l.view.getState(t);t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/h),g=10+Math.max(g,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/h))}}p?g=0:d=0;for(r=0;r<m.length;r++)if(t=l.model.getTerminal(m[r],
+!1),f==q(t)&&(u=l.view.getState(t),t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var z=[];l.traverse(u.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});l.moveCells(z,(b?1:-1)*d,(b?1:-1)*g)}}}return l.addCells(e,c)}finally{l.model.endUpdate()}}function d(a){l.model.beginUpdate();try{var b=q(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);
+var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,h=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,h=-40):b==mxConstants.DIRECTION_WEST?(k=-40,h=0):b==mxConstants.DIRECTION_EAST&&(h=0);l.moveCells(g,k,h);return l.addCells(d,e)}finally{l.model.endUpdate()}}function g(a){l.model.beginUpdate();try{var b=
+l.model.getParent(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(d[0],a,!0);var c=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=l.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var h=l.view.getBounds(f),n=q(a),m=l.view.translate,p=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/p-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/p-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==h?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(h.y+h.height)/p-m.y+-e.y+10);return l.addCells(d,b)}finally{l.model.endUpdate()}}function f(a,
+b,d){a=l.getOutgoingEdges(a);d=l.view.getState(d);var c=[];if(null!=d&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,d.x+d.width)>=Math.max(f.x,d.x)||b&&Math.min(f.y+f.height,d.y+d.height)>=Math.max(f.y,d.y))&&c.push(f)}c.sort(function(a,d){return b?a.x+a.width-d.x-d.width:a.y+a.height-d.y-d.height})}return c}function t(a,b){var d=q(a),c=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||
+d==mxConstants.DIRECTION_WEST)==c&&d!=b?n.actions.get("selectParent").funct():d==b?(c=l.getOutgoingEdges(a),null!=c&&0<c.length&&l.setSelectionCell(l.model.getTerminal(c[0],!1))):(d=l.getIncomingEdges(a),null!=d&&0<d.length&&(c=f(l.model.getTerminal(d[0],!0),c,a),d=l.view.getState(a),null!=d&&(d=mxUtils.indexOf(c,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=c.length-1&&l.setSelectionCell(c[d].cell)))))}var n=this,l=n.editor.graph,w=l.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var k=n.menus.createPopupMenu;n.menus.createPopupMenu=function(a,d,c){k.apply(this,arguments);if(1==l.getSelectionCount()){d=l.getSelectionCell();var e=l.getOutgoingEdges(d);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,c),this.addMenuItems(a,["selectDescendants"],null,c));b(l.getSelectionCell())&&
+(a.addSeparator(),0<l.getIncomingEdges(d).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,c))}};n.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),
+a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",
+function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,d){null!=d&&b.push(d);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=l.removeCells;l.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(l.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=l.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,d,c){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,c))};var r=l.duplicateCells;l.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();for(var c=a.slice(0),e=0;e<c.length;e++){var f=l.view.getState(c[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var k=r.call(this,a,d);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var h=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(a[e]);if(0==h.length&&0<g.length){var n=this.cloneCells([g[0]])[0];this.addEdge(n,l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var E=l.moveCells;l.moveCells=function(a,d,c,e,f,g,k){var h=null;this.model.beginUpdate();try{var n=f,m=this.view.getState(f),p=null!=m?m.style:this.getCellStyle(f);
+if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||l.model.isEdge(a[q])&&null==l.model.getTerminal(a[q],!0)){f=l.model.getParent(a[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var r=l.getIncomingEdges(a[0]);if(0<r.length){var u=l.view.getState(l.model.getTerminal(r[0],!0));if(null!=u){var t=l.view.getState(n);null!=t&&(d=(t.getCenterX()-u.getCenterX())/l.view.scale,c=(t.getCenterY()-u.getCenterY())/l.view.scale)}}}}h=E.apply(this,arguments);
+if(null!=h&&null!=a&&h.length==a.length)for(q=0;q<h.length;q++)if(this.model.isEdge(h[q]))b(n)&&0>mxUtils.indexOf(h,this.model.getTerminal(h[q],!0))&&this.model.setTerminal(h[q],n,!0);else if(b(a[q])&&(r=l.getIncomingEdges(a[q]),0<r.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],n,!0);else if(0==l.getIncomingEdges(h[q]).length){m=n;if(null==m||m==l.model.getParent(a[q]))m=l.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,
+l.getDefaultParent(),m,h[q])}}finally{this.model.endUpdate()}return h};if(null!=n.sidebar){var G=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,d,c,e){var f=l.model,g=null;f.beginUpdate();try{if(g=G.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var h=l.getCellGeometry(g[k]);h.points=null;null!=h.getTerminalPoint(!0)&&h.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var H={88:n.actions.get("selectChildren"),
+84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},C=n.onKeyDown;n.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&&b(l.getSelectionCell())&&1==l.getSelectionCount()){var c=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(l.getSelectionCell()):g(l.getSelectionCell()):13==a.which&&(c=u(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&l.model.isEdge(c[0])?l.setSelectionCell(l.model.getTerminal(c[0],
+!1)):l.setSelectionCell(c[c.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=H[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(t(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(t(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(t(l.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(t(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(K){console.log("error",K)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var x=l.connectVertex;l.connectVertex=function(a,c,e,f,k,h){var n=l.getIncomingEdges(a);return b(a)&&0<n.length?(e=q(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?g(a):f==k?d(a):u(a,c!=mxConstants.DIRECTION_NORTH&&
+c!=mxConstants.DIRECTION_WEST)):x.call(this,a,c,e,f,k,h)};l.getSubtree=function(a){var d=[a];b(a)&&!e(a)&&l.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){y.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",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.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var L=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){L.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),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
+this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){I.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),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;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;container=1;recursiveResize=0;treeFolding=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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=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 e=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");g.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);g.insertEdge(w,!1);a.insert(d);a.insert(f);a.insert(l);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(g);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var h=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");h.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);h.insertEdge(n,!1);var l=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");l.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);l.insertEdge(m,!1);a.insert(d);a.insert(f);a.insert(n);a.insert(m);a.insert(b);a.insert(c);a.insert(e);a.insert(h);a.insert(l);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap 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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=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 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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=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;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.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;
-c.insertEdge(d,!0);e.insertEdge(d,!1);var h=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");h.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;c.insertEdge(f,!0);h.insertEdge(f,!1);a.insert(d);a.insert(f);a.insert(c);a.insert(e);a.insert(h);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(d,!0);e.insertEdge(d,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;c.insertEdge(f,!0);g.insertEdge(f,!1);a.insert(d);a.insert(f);a.insert(c);a.insert(e);a.insert(g);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;container=1;recursiveResize=0;");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;container=1;recursiveResize=0;treeFolding=1;");
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;container=1;recursiveResize=0;treeFolding=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;container=1;recursiveResize=0;treeFolding=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")})])}}})();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\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\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\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\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\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\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\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\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\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\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\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\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.\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.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\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 read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\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\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\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\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\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>.\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.\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 page refresh.\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\nmiddle=Middle\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\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\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\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\npaste=Paste\npasteHere=Paste here\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\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\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 by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\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\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\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\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\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 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\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\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\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\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=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="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><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="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></mxStylesheet>').documentElement;
+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){a.editor.graph.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new h(a,mxResources.get("format"),Math.max(0,a.diagramContainer.clientWidth-a.formatWidth-12),56,a.formatWidth,546,function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.minimumSize=
+new mxRectangle(0,0,a.formatWidth,80),a.formatWindow.window.setVisible(!0),a.formatWindow.window.fit(),a.fireEvent(new mxEventObject("sidebar"))):(a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible()),a.formatWindow.window.isVisible()&&a.formatWindow.window.fit());var b=mxUtils.getOffset(a.container);a.formatWindow.window.div.style.top=Math.max(parseInt(a.formatWindow.window.div.style.top),b.y)+"px"}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==
+a.sidebarWindow){var d=Math.min(b.container.clientWidth-10,300);a.sidebarWindow=new h(a,mxResources.get("shapes"),10,56,d-6,Math.min(600,b.container.clientHeight-30),function(b){function d(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;";g.className="geTitle";b.appendChild(g);return g}var c=document.createElement("div");
+c.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";c.className="geTitle";mxUtils.write(c,mxResources.get("moreShapes"));b.appendChild(c);mxEvent.addListener(c,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){c=document.createElement("div");c.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";
+c.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("newLibrary").funct);c=document.createElement("div");c.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";c.className="geTitle";f=document.createElement("span");
+f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("openLibrary").funct)}else c=d("newLibrary",mxResources.get("newLibrary")),c.style.left="0",c=d("openLibraryFrom",mxResources.get("openLibraryFrom")),c.style.borderLeft="1px solid lightgray",c.style.left="50%";else c.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",
+function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.sidebarWindow.window.fit();a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible()),a.sidebarWindow.window.isVisible()&&
+a.sidebarWindow.window.fit();b=mxUtils.getOffset(a.container);a.sidebarWindow.window.div.style.top=Math.max(parseInt(a.sidebarWindow.window.div.style.top),b.y)+"px"}var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: normal; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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:2px; 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 0 2px 0; 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); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}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:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { 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: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !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: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !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; }";
+document.getElementsByTagName("head")[0].appendChild(c)}catch(n){}var h=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};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="#ffffff"/>').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="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
+mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
+Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,36,'<path d="m 6 36 L 12 36 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleRight=Graph.createSvgImage(36,18,'<path d="m 1 6 L 24 6 L 24 1 L 36 9 L 24 18 L 24 12 L 1 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleDown=Graph.createSvgImage(18,36,'<path d="m 6 1 L 6 24 L 1 24 L 9 36 L 18 24 L 12 24 L 12 1 z" stroke="#fff" fill="#29b6f2"/>');
+HoverIcons.prototype.triangleLeft=Graph.createSvgImage(36,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
+Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);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.HIGHLIGHT_SIZE=5;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.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
+25;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var m=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){m.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):p.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var u=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){u.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="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};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="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
+b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";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="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var e=this.editorUi.editor.graph;a.smartSeparators=!0;d.apply(this,arguments);
+mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==e.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(a,e.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
+a)):e.isSelectionEmpty()&&e.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};var g=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
+function(a){a=g.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="0px";a.appendChild(d);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
+e.style.position="relative";e.style.top="4px";d.appendChild(e)}return a};var f=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);
+null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.actions.tagsWindow&&(this.actions.tagsWindow.window.setVisible(!1),this.actions.tagsWindow.window.destroy(),this.actions.tagsWindow=null);null!=this.actions.findWindow&&(this.actions.findWindow.window.setVisible(!1),this.actions.findWindow.window.destroy(),this.actions.findWindow=null);f.apply(this,arguments)};EditorUi.prototype.chromelessWindowResize=function(){};var t=EditorUi.prototype.init;
+EditorUi.prototype.init=function(){function c(a,b,c,d){var e=g.menus.get(a),f=x.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML="",mxUtils.setOpacity(f,d||40)):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function d(a,b,c,d,e,f){var g=document.createElement("a");g.setAttribute("href","javascript:void(0)");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";C.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,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b();mxEvent.consume(a)});
+null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.setOpacity(g,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),mxUtils.setOpacity(g,null!=f?40:100),g.style.cursor=""):(g.setAttribute("disabled","disabled"),mxUtils.setOpacity(g,null!=f?10:50),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign=
+"top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));C.appendChild(b);return b}t.apply(this,arguments);var g=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";m.style.bottom=
+"1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(m);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=
+mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
+g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){a(g)}));var p=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
+g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b,mxResources.get("open")),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,
+["-","close"])})));if(isLocalStorage){var m=g.menus.get("openFrom"),q=m.funct;m.funct=function(a,b){q.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,
+["-","revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"exportPng exportJpg exportSvg - exportPdf exportVsdx - exportHtml exportXml exportUrl -".split(" "),b);g.menus.addSubmenu("embed",a,b);g.menus.addSubmenu("publish",a,b)})));g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&
+g.menus.addSubmenu("theme",a,b);g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),
+b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var u="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
+g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<u.length;c++)"-"==u[c]?a.addSeparator(b):p(a,b,mxResources.get(u[c])+"...",u[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
+"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var x=new Menubar(g,C);(m=900>e)||c("diagram");f([m?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
+null,mxResources.get("shapes"),g.actions.get("image"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var y=c("insert",!0,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([y,d(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=e){var B=g.actions.get("undo"),m=g.actions.get("redo"),B=d("",B.funct,null,mxResources.get("undo")+" ("+B.shortcut+")",B,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),m=d("",m.funct,
+null,mxResources.get("redo")+" ("+m.shortcut+")",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([B,m]);560<=e&&f([d("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
+c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=e?d("",g.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=e?d("",g.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));g.setStatusText(g.editor.getStatus());C.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText=
+"position:absolute;right:40px;top:12px;white-space:nowrap;";C.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;480<=e&&(m=g.menus.get("language"),null!=m&&(y=x.addMenu("",m.funct),y.setAttribute("title",mxResources.get("language")),y.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundSize="24px 24px",y.style.position="absolute",y.style.height="24px",y.style.width="24px",y.style.zIndex="1",y.style.top="11px",y.style.right="14px",mxUtils.setOpacity(y,30),C.appendChild(y)));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+m=g.diagramContainer.parentNode;B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";var I=g.menus.get("viewZoom");if(null!=I){this.tabContainer.style.right="70px";y=x.addMenu("100%",I.funct);y.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");y.style.whiteSpace="nowrap";y.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+y.style.backgroundPosition="right 6px center";y.style.backgroundRepeat="no-repeat";y.style.paddingRight="10px";y.style.display="block";y.style.position="absolute";y.style.textDecoration="none";y.style.textDecoration="none";y.style.right="0px";y.style.bottom="0px";y.style.overflow="hidden";y.style.textAlign="center";y.style.color="#000";y.style.fontSize="12px";y.style.color="#707070";y.style.width="59px";y.style.borderTop="1px solid lightgray";y.style.borderLeft="1px solid lightgray";y.style.height=
+parseInt(g.tabContainer.style.height)-1+"px";y.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";B.appendChild(y);I=mxUtils.bind(this,function(){y.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,I);g.editor.addListener("resetGraphView",I);g.editor.addListener("pageSelected",I);var z=g.setGraphEnabled;g.setGraphEnabled=function(){z.apply(this,arguments);null!=this.tabContainer&&(y.style.visibility=this.tabContainer.style.visibility)}}B.appendChild(g.tabContainer);
+B.appendChild(C);B.appendChild(g.diagramContainer);m.appendChild(B);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.outlineWindow.fit();null!=g.actions.layersWindow&&g.outlineWindow.fit();null!=g.actions.tagsWindow&&g.tagsWindow.window.fit();null!=g.actions.findWindow&&g.findWindow.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)}})();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\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\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\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\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\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\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\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\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\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\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\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\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.\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.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\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 read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\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\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\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\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\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>.\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.\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 page refresh.\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\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\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\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\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\npaste=Paste\npasteHere=Paste here\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\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\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 by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\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\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\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\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\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 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\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\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\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\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=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="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><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="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></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="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,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;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.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;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);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};
-mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){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:k.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
-this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var h=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged",
-h);h();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
+mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var h=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:h.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
+this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged",
+g);g();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);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!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",
-this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),c())}));l.observe(k,{attributes:!0})}else c()}};
+this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var h=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),c())}));m.observe(h,{attributes:!0})}else c()}};
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){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.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),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})};
GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var c=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,
-top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.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"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!0,this.graph.maxFitScale=
-null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",c),this.graph.addListener("size",
-c)):new ResizeSensor(this.graph.container,c));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var n=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(n);l||(n=window.setTimeout(mxUtils.bind(this,
+top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.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"}e=!1}}),h=null,m=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==h||m||(m=!0,this.graph.maxFitScale=
+null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},h=c,window.setTimeout(function(){m=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",c),this.graph.addListener("size",
+c)):new ResizeSensor(this.graph.container,c));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=h=null,c=mxUtils.bind(this,function(){window.clearTimeout(p);m||(p=window.setTimeout(mxUtils.bind(this,
this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",c):new ResizeSensor(this.graph.container,c))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",c);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
-null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};
+null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),h=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();h=null;q()}};
GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),n=0;n<l;n++)k.setVisible(k.getChildAt(k.root,n),null!=b?c.isVisible(c.getChildAt(c.root,n)):!1);if(null==c)for(n=0;n<e.length;n++)k.setVisible(k.getChildAt(k.root,parseInt(e[n])),!0)}finally{k.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,h=a.getModel();h.beginUpdate();try{for(var m=h.getChildCount(h.root),p=0;p<m;p++)h.setVisible(h.getChildAt(h.root,p),null!=b?c.isVisible(c.getChildAt(c.root,p)):!1);if(null==c)for(p=0;p<e.length;p++)h.setVisible(h.getChildAt(h.root,parseInt(e[p])),!0)}finally{h.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){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=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(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);e.appendChild(f);h++;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 e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,l=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
-0);c=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),n=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(n(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){n(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){n(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||n(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():n(30))}})}for(var d=this.toolbarItems,h=0,f=null,p=null,m=0;m<d.length;m++){var g=d[m];if("pages"==g){p=b.ownerDocument.createElement("div");
-p.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(p,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(p);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";g=mxUtils.bind(this,function(){p.innerHTML="";mxUtils.write(p,this.currentPage+1+" / "+this.diagrams.length);p.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=p.style.display;u.style.display=p.style.display});this.addListener("graphChanged",g);g()}else if("zoom"==g)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"==g){if(this.layersEnabled){var v=this.graph.getModel(),r=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;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 e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,h=null,m=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
+0);c=null;h=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";h=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,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(e,mxClient.IS_POINTER?"pointermove":
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,u=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var d=this.toolbarItems,g=0,f=null,t=null,n=0;n<d.length;n++){var l=d[n];if("pages"==l){t=b.ownerDocument.createElement("div");
+t.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(t,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(t);var k=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");k.style.paddingLeft="0px";k.style.paddingRight="0px";l=mxUtils.bind(this,function(){t.innerHTML="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=t.style.display;k.style.display=t.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)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"==l){if(this.layersEnabled){var v=this.graph.getModel(),r=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=r.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
-"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==g?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(g=this.graphConfig["toolbar-buttons"][g],
-null!=g&&a(null==g.enabled||g.enabled?g.handler:function(){},g.image,g.title,g.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*h);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
-70),e.appendChild(d));this.minToolbarWidth=34*h;var z=b.style.border,d=mxUtils.bind(this,function(){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};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==z&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=f&&(f.parentNode.removeChild(f),
-f=null),b.style.border=z)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(c=k.getAttribute("href"))}null!=b?null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=c.indexOf(","),0<k&&(k=c.substring(k+
-1),this.selectPageById(k),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l],
+null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
+70),e.appendChild(d));this.minToolbarWidth=34*g;var E=b.style.border,d=mxUtils.bind(this,function(){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};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=f&&(f.parentNode.removeChild(f),
+f=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var h=mxEvent.getSource(e);"a"==h.nodeName.toLowerCase()&&(c=h.getAttribute("href"))}null!=b?null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(h=c.indexOf(","),0<h&&(h=c.substring(h+
+1),this.selectPageById(h),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,e){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;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.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,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev=
"1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){c.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;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;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&
-c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var n=c.editor.graph,q=n.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",k)):(b.style.display="none",e.style.display="none");
-var t=this;n.getImageFromBundles=function(a){return t.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(n.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
-(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(n,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
+10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};var h=mxUtils.bind(this,function(a){27==a.keyCode&&
+c.destroy()}),m=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",h);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=c.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",h)):(b.style.display="none",e.style.display="none");
+var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
+(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute",c.chromelessToolbar.style.bottom="",
-c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(n,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var k=c[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(c[e]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){k(a)}):k(c.xml)}};
+c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var h=c[e].className;null!=h&&0<h.length&&(h=h.split(" "),0<=mxUtils.indexOf(h,a)&&b.push(c[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),h=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){h(a)}):h(c.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,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.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(e,c){function k(){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 l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function n(b,c){if(!b.resizedAttached)b.resizedAttached=
-new k,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"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],h=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};h();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,x,F,y=function(){if((x=b.offsetWidth)!=q||(F=b.offsetHeight)!=t)n=!0,q=x,t=F;h()},D=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",y);D(f,"scroll",y)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},t=Object.prototype.toString.call(e),d="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var t=0,h=e.length;t<h;t++)n(e[t],q);else n(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function h(){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 h,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],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var p=!1,q=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(q))};a(q);var t,u,H,C,x=function(){if((H=b.offsetWidth)!=t||(C=b.offsetHeight)!=u)p=!0,t=H,u=C;g()},y=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};y(d,"scroll",x);y(f,"scroll",x)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},u=Object.prototype.toString.call(e),d="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var u=0,g=e.length;u<g;u++)p(e[u],q);else p(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index 3ceb9d57..65764fb7 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -103,7 +103,7 @@ window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Ba
ko:"한국어",ja:"日本語",zh:"中文(中国)","zh-tw":"中文(台灣)"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}return a}();
function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL="https://log.draw.io"))})();
-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");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";
+if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");"min"==uiTheme&&(urlParams.toolbar="0");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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.9.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
@@ -271,7 +271,7 @@ g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume
mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.buttons.appendChild(this.closeImg);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",a));this.destroyOnClose?this.destroy():
this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
mxWindow.prototype.isVisible=function(){return null!=this.div?"none"!=this.div.style.display:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
-mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||"none"==this.contentWrapper.style.display||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
mxForm.prototype.addText=function(a,b,c){var d=document.createElement("input");d.setAttribute("type",c||"text");d.value=b;return this.addField(a,d)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
@@ -281,22 +281,23 @@ function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=windo
mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}));mxEvent.addListener(a,"dragstart",function(a){mxEvent.consume(a)});this.eventConsumer=function(a,b){var c=b.getProperty("eventName"),d=b.getProperty("event");c!=mxEvent.MOUSE_DOWN&&d.consume()}}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;
mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;
-mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
+mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.checkEventSource=!0;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c,d){return a.getCellAt(b,c)};mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};mxDragSource.prototype.isActive=function(){return null!=this.mouseMoveHandler};
mxDragSource.prototype.reset=function(){null!=this.currentGraph&&(this.dragExit(this.currentGraph),this.currentGraph=null);this.removeDragElement();this.removeListeners();this.stopDrag()};
mxDragSource.prototype.mouseDown=function(a){this.enabled&&!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))};
-mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
-mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);this.checkEventSource&&mxClient.IS_SVG&&(this.dragElement.style.pointerEvents="none")};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
+mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.getElementForEvent=function(a){return mxEvent.isTouchEvent(a)||mxEvent.isPenEvent(a)?document.elementFromPoint(mxEvent.getClientX(a),mxEvent.getClientY(a)):mxEvent.getSource(a)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin(),g=this.getElementForEvent(b);if(this.checkEventSource)for(;null!=g&&g!=a.container;)g=g.parentNode;return null!=g&&c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null==b||this.graphContainsEvent(b,a)||(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility=
"hidden");else{var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}mxEvent.consume(a)};
mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)};
mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null};
-mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)};
-mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents="none");this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,
+this.eventConsumer)};mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x-a.panDx,c=mxEvent.getClientY(b)-c.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c,b),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==
this.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,
g=a.view.translate,k=a.gridSize/2,e=(a.snap(e/d-g.x-k)+g.x)*d,c=(a.snap(c/d-g.y-k)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};
-mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler.apply(this,arguments);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),k=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
g.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
@@ -1966,27 +1967,28 @@ Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCA
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAgVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9d3yJTAAAAKnRSTlMA+hzi3nRQWyXzkm0h2j3u54gzEgSXjlYoTBgJxL2loGpAOS3Jt7Wxm35Ga7gRAAAA6UlEQVQ4y63Q2XaCMBSF4Q0JBasoQ5DJqbXjfv8HbCK2BZNwo/8FXHx7rcMC7lQu0iX8qU/qtvAWCpoqH8dYzS0SwaV5eK/UAf8X9pd2CWKzuF5Jrftp1owXwnIGLUaL3PYndOHf4kNNXWrXK/m7CHunk7K8LE6YtBpcknwG9GKxnroY+ylBXcx4xKyx/u/EuXi509cP9V7OO1oyHnzrdFTcqLG/4ibBA5pIMr/4xvKzuQDkVy9wW8SgBFD6HDvuzMvrZcC9QlkfMzI7w64m+b4PqBMNHB05lH21PVxJo2/fBXxV4hB38PcD+5AkI4FuETsAAAAASUVORK5CYII=";
Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";Editor.nextLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFRJREFUOMvd0skRgCAQBVEFwQ0V7fxzNQP6wI05v6pZ/kyj1b7FNgik2gQzzLcAwiUAigHOTwDHK4A1CmB5BJANJG1hQ9qafYcqFlZP3IFc9eVGrR+iIgkDQRUXIAAAAABJRU5ErkJggg==";
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";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.init=function(){};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,c){var d=null!=c?"?title="+encodeURIComponent(c):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"))):
-this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,c){var d=new Graph(null,c,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.chromeless||"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=this.graph.defaultGraphBackground;this.graph.pageScale=
-mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.chromeless||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled="0"!=
-a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var c=a.getAttribute("pageScale");this.graph.pageScale=null!=c?c:mxGraph.prototype.pageScale;this.graph.lightbox?this.graph.pageVisible=!1:(c=a.getAttribute("page"),this.graph.pageVisible=null!=c?"0"!=c:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
+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.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,c){var d=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d+
+(0<d.length?"&":"?")+"client=1"))):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,c){var d=new Graph(null,c,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.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=this.graph.defaultGraphBackground;
+this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
+Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled=
+"0"!=a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var c=a.getAttribute("pageScale");this.graph.pageScale=null!=c?c:mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(c=a.getAttribute("page"),this.graph.pageVisible=null!=c?"0"!=c:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
this.graph.pageBreaksVisible;var c=a.getAttribute("pageWidth"),d=a.getAttribute("pageHeight");null!=c&&null!=d&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(c),parseFloat(d)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var c=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),c.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var d=c.document.createElement("mxGraphModel");d.appendChild(a);c.decode(d,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
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":"hidden",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,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),f=a.getModel(),g=[],k=0;k<d.length;k++)(f.isVertex(d[k])||f.isEdge(d[k]))&&null!=a.view.getState(d[k])&&
-g.push(d[k]);a.setSelectionCells(g)};c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),f=a.getModel(),g=[],h=0;h<d.length;h++)(f.isVertex(d[h])||f.isEdge(d[h]))&&null!=a.view.getState(d[h])&&
+g.push(d[h]);a.setSelectionCells(g)};c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};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,c,d,b,f,e,h,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);d+=k;b+=k;var l=d,m=b,p=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-d-64)/2)),q=Math.max(1,Math.round((p-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=Math.min(d,document.body.scrollWidth-64);b=Math.min(b,p-64);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=p+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";n+=t.x;q+=t.y;f&&document.body.appendChild(this.bg);var r=a.createDiv("geDialog");f=this.getPosition(n,q,
-d,b);n=f.x;q=f.y;r.style.width=d+"px";r.style.height=b+"px";r.style.left=n+"px";r.style.top=q+"px";r.style.zIndex=this.zIndex;r.appendChild(c);document.body.appendChild(r);!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=q+14+"px",e.style.left=n+d+38-k+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",
-mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){p=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=p+"px";n=Math.max(1,Math.round((document.body.clientWidth-d-64)/2));q=Math.max(1,Math.round((p-b-a.footerHeight)/3));d=Math.min(l,document.body.scrollWidth-64);b=
-Math.min(m,p-64);var e=this.getPosition(n,q,d,b);n=e.x;q=e.y;r.style.left=n+"px";r.style.top=q+"px";r.style.width=d+"px";r.style.height=b+"px";!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=q+14+"px",this.dialogImg.style.left=n+d+38-k+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+function Dialog(a,c,d,b,f,e,k,g){var h=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(h=80);d+=h;b+=h;var l=d,m=b,n=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-d-64)/2)),q=Math.max(1,Math.round((n-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=Math.min(d,document.body.scrollWidth-64);b=Math.min(b,n-64);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=n+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var r=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=r.x+"px";this.bg.style.top=r.y+"px";p+=r.x;q+=r.y;f&&document.body.appendChild(this.bg);var t=a.createDiv("geDialog");f=this.getPosition(p,q,
+d,b);p=f.x;q=f.y;t.style.width=d+"px";t.style.height=b+"px";t.style.left=p+"px";t.style.top=q+"px";t.style.zIndex=this.zIndex;t.appendChild(c);document.body.appendChild(t);!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=q+14+"px",e.style.left=p+d+38-h+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",
+mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){n=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=n+"px";p=Math.max(1,Math.round((document.body.clientWidth-d-64)/2));q=Math.max(1,Math.round((n-b-a.footerHeight)/3));d=Math.min(l,document.body.scrollWidth-64);b=
+Math.min(m,n-64);var e=this.getPosition(p,q,d,b);p=e.x;q=e.y;t.style.left=p+"px";t.style.top=q+"px";t.style.width=d+"px";t.style.height=b+"px";!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=q+14+"px",this.dialogImg.style.left=p+d+38-h+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
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";
@@ -1997,30 +1999,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
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,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),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 PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var h=g.checked?1:parseInt(m.value);isNaN(h)||(f=mxUtils.getScaleForPageCount(h,d,e))}d.getGraphBounds();var k=h=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),h-=c.x*e.width,k-=c.y*e.height):
-b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,h,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var h=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage"));
-f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(f);h.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");f.appendChild(k);mxEvent.addListener(k,
-"click",function(a){l.checked=!l.checked;g.checked=!l.checked;mxEvent.consume(a)});b.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");b.appendChild(f);h.appendChild(b);mxEvent.addListener(l,"change",
-function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!l.checked});b=b.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");b.appendChild(f);f=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";f.appendChild(p);b.appendChild(f);h.appendChild(b);b=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
-f.style.paddingTop="20px";f.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&f.appendChild(k);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});n.className="geBtn";f.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";f.appendChild(n);a.editor.cancelFirst||
-f.appendChild(k);b.appendChild(f);h.appendChild(b);e.appendChild(h);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
-PrintDialog.createPrintPreview=function(a,c,d,b,f,e,h){c=new mxPrintPreview(a,c,d,b,f,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=h;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.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 c};
+PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var k=g.checked?1:parseInt(m.value);isNaN(k)||(f=mxUtils.getScaleForPageCount(k,d,e))}d.getGraphBounds();var h=k=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),k-=c.x*e.width,h-=c.y*e.height):
+b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,k,h,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var h=document.createElement("span");mxUtils.write(h," "+mxResources.get("fitPage"));
+f.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(f);k.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);h=document.createElement("span");mxUtils.write(h," "+mxResources.get("posterPrint")+":");f.appendChild(h);mxEvent.addListener(h,
+"click",function(a){l.checked=!l.checked;g.checked=!l.checked;mxEvent.consume(a)});b.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");b.appendChild(f);k.appendChild(b);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!l.checked});b=b.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");b.appendChild(f);f=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";f.appendChild(n);b.appendChild(f);k.appendChild(b);b=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
+f.style.paddingTop="20px";f.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&f.appendChild(h);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});p.className="geBtn";f.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";f.appendChild(p);a.editor.cancelFirst||
+f.appendChild(h);b.appendChild(f);k.appendChild(b);e.appendChild(k);this.container=e};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}};
+PrintDialog.createPrintPreview=function(a,c,d,b,f,e,k){c=new mxPrintPreview(a,c,d,b,f,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.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 c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",q.src),n.style.fontSize="11px",n.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,h=document.createElement("table");h.style.width=
-"100%";h.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");
+var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",q.src),p.style.fontSize="11px",p.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,k=document.createElement("table");k.style.width=
+"100%";k.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var h=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");
mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="18px";l.style.height="18px";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";var m=b.background;c();mxEvent.addListener(l,"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)});
-e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=b.getGridSize();e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?b.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
-":");f.appendChild(e);e=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(n,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();e.appendChild(n);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var t=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);var r=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==p.value&&b.setGridSize(parseInt(p.value));var c=new ChangePageSetup(a,m,q,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||b.model.execute(c)});r.className="geBtn gePrimaryBtn";e.appendChild(r);a.editor.cancelFirst||e.appendChild(t);f.appendChild(e);g.appendChild(f);h.appendChild(g);this.container=h};
-PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||p!=document.activeElement&&n!=document.activeElement){a=!1;for(b=0;b<t.length;b++)c=t[b],u?"custom"==c.key&&(g.value=c.key,u=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
-d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(p.value=d.width/100,n.value=d.height/100,e.setAttribute("checked","checked"),
-g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
-k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");
-p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},t=PageSetupDialog.getFormats(),r=0;r<t.length;r++){var w=t[r];q[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);g.appendChild(v)}var u=!1;f();a.appendChild(g);mxUtils.br(a);
-a.appendChild(k);a.appendChild(m);var z=d,x=function(a,c){var e=q[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");isNaN(parseFloat(p.value))&&(p.value=d.width/100);isNaN(parseFloat(n.value))&&(n.value=d.height/100);e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,e.height,e.width));
-c&&u||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){u="custom"==g.value;x(a,!0)});x();
-return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:p,heightInput:n}};
+e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=b.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?b.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
+":");f.appendChild(e);e=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(p,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();e.appendChild(p);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var r=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&e.appendChild(r);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,h.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
+c.ignoreColor&&c.ignoreImage||b.model.execute(c)});t.className="geBtn gePrimaryBtn";e.appendChild(t);a.editor.cancelFirst||e.appendChild(r);f.appendChild(e);g.appendChild(f);k.appendChild(g);this.container=k};
+PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<r.length;b++)c=r[b],u?"custom"==c.key&&(g.value=c.key,u=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
+d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,a=k.checked=!0));a?(h.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,e.setAttribute("checked","checked"),
+g.value="custom",h.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",c);k.setAttribute("type","radio");k.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var h=document.createElement("div");h.style.marginLeft="4px";h.style.width="210px";
+h.style.height="24px";e.style.marginRight="6px";h.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));h.appendChild(c);k.style.marginLeft="10px";k.style.marginRight="6px";h.appendChild(k);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));h.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input");
+n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");h.style.display="none";m.style.display="none";for(var q={},r=PageSetupDialog.getFormats(),t=0;t<r.length;t++){var w=r[t];q[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);g.appendChild(v)}var u=!1;f();a.appendChild(g);mxUtils.br(a);
+a.appendChild(h);a.appendChild(m);var z=d,x=function(a,c){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",h.style.display=""):(h.style.display="none",m.style.display="");isNaN(parseFloat(n.value))&&(n.value=d.width/100);isNaN(parseFloat(p.value))&&(p.value=d.height/100);e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&k.checked&&(e=new mxRectangle(0,0,e.height,e.width));
+c&&u||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){k.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(k,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){u="custom"==g.value;x(a,!0)});x();
+return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:n,heightInput:p}};
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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{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:"custom",title:mxResources.get("custom"),format:null}]};
(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=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2028,35 +2030,35 @@ mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.styl
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()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",e="";if(a.isGridEnabled()){e=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",e=a.gridSize*this.scale*this.gridSteps):
d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-c,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-f,e))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=e,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
-b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'<svg width="'+
+b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var g=e*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" 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 d=
-this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
-new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,v=a?Math.ceil(b/k.width)-1:0,u=h.x+b,z=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
-new mxPoint(Math.round(u),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var f=this.graph.getCellGeometry(b[e]);if(null!=f&&f.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){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(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.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,b,c,d,e,h){var g=f.apply(this,arguments);null==h||h||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var e=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=e.apply(this,arguments),f=b.getParent(d);
-if(null==c||c!=d&&c!=f)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(f)&&b.isVertex(f)&&!this.graph.isContainer(f);)d=f,f=this.graph.getModel().getParent(d);return d};var h=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=h.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=
+this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,g=this.pageFormat,f=d*this.pageScale,k=this.view.getBackgroundPageBounds();b=k.width;c=k.height;var h=
+new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,v=a?Math.ceil(b/h.width)-1:0,u=k.x+b,z=k.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),Math.round(k.y+(c+1)*h.height)),
+new mxPoint(Math.round(u),Math.round(k.y+(c+1)*h.height))]:[new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var g=this.graph.getCellGeometry(b[e]);if(null!=g&&g.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){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(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),k=Math.floor(Math.min(0,
+c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+k*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-k)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.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,b,c,d,e,k){var g=f.apply(this,arguments);null==k||k||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var e=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=e.apply(this,arguments),f=b.getParent(d);
+if(null==c||c!=d&&c!=f)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(f)&&b.isVertex(f)&&!this.graph.isContainer(f);)d=f,f=this.graph.getModel().getParent(d);return d};var k=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=k.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,c,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var b=this.editor.graph;b.lightbox=d;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,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var f=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||b.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=f,this.menubarContainer.onmousedown=
f,this.toolbarContainer.onselectstart=f,this.toolbarContainer.onmousedown=f,this.diagramContainer.onselectstart=f,this.diagramContainer.onmousedown=f,this.sidebarContainer.onselectstart=f,this.sidebarContainer.onmousedown=f,this.formatContainer.onselectstart=f,this.formatContainer.onmousedown=f,this.footerContainer.onselectstart=f,this.footerContainer.onmousedown=f,null!=this.tabContainer&&(this.tabContainer.onselectstart=f));!this.editor.chromeless||this.editor.editable?(c=function(a){var b=mxEvent.getSource(a);
if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}return f(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(c=b.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
-mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,h=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return e||h.apply(this,arguments)};this.keydownHandler=
+mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,k=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return e||k.apply(this,arguments)};this.keydownHandler=
mxUtils.bind(this,function(a){32==a.which?(e=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=
-function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return k.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 l=!1,m=null,p=null,n=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var e=0;e<n.length;e++)this.toolbar.container.appendChild(n[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=
-p}l=b.cellEditor.isContentEditing();m=a;p=d;n=c}}),t=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);q();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=t.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
-d.substring(0,d.length-1));t.toolbar.setFontName(d);t.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){w.apply(this,arguments);q()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
+function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var h=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return h.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 l=!1,m=null,n=null,p=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=
+n}l=b.cellEditor.isContentEditing();m=a;n=d;p=c}}),r=this,t=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){t.apply(this,arguments);q();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=r.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
+d.substring(0,d.length-1));r.toolbar.setFontName(d);r.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){w.apply(this,arguments);q()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(B){}var v=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],h=0;h<g.length;h++){var k=g[h],
-l=k.indexOf("=");0<=l&&(f=k.substring(0,l),k=k.substring(l+1),null!=a[f]&&"none"==k&&(d.push(k),e.push(f)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=
-["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)u.push(A[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(u,z[a])&&u.push(z[a]);var D=function(a,c){var d=b.getModel();d.beginUpdate();
-try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],G=u.slice(),g=0;g<m.length;g++){var n=m[g],y=n.indexOf("=");if(0<=y){var p=n.substring(0,y),R=mxUtils.indexOf(G,p);0<=R&&G.splice(R,1);for(var t=0;t<A.length;t++){var q=A[t];if(0<=mxUtils.indexOf(q,p))for(var r=0;r<q.length;r++){var B=
-mxUtils.indexOf(G,q[r]);0<=B&&G.splice(B,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,C=d.getStyle(k),g=0;g<G.length;g++){var p=G[g],w=f[p];null==w||"shape"==p&&!e||e&&!(0>mxUtils.indexOf(z,p))||(C=mxUtils.setStyle(C,p,w))}d.setStyle(k,C)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=
-[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));D(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(z,
-d[g]))f||0<=mxUtils.indexOf(C,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(u,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(u,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(C,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
+this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var h=g[k],
+l=h.indexOf("=");0<=l&&(f=h.substring(0,l),h=h.substring(l+1),null!=a[f]&&"none"==h&&(d.push(h),e.push(f)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=
+["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)u.push(A[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(u,z[a])&&u.push(z[a]);var D=function(a,c){var d=b.getModel();
+d.beginUpdate();try{if(c)for(var e=d.isEdge(h),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var k=f[e[g]];null!=k&&b.setCellStyles(e[g],k,a)}else for(k=0;k<a.length;k++){for(var h=a[k],l=d.getStyle(h),m=null!=l?l.split(";"):[],G=u.slice(),g=0;g<m.length;g++){var p=m[g],y=p.indexOf("=");if(0<=y){var n=p.substring(0,y),R=mxUtils.indexOf(G,n);0<=R&&G.splice(R,1);for(var r=0;r<A.length;r++){var q=A[r];if(0<=mxUtils.indexOf(q,n))for(var t=0;t<
+q.length;t++){var B=mxUtils.indexOf(G,q[t]);0<=B&&G.splice(B,1)}}}}for(var f=(e=d.isEdge(h))?b.currentEdgeStyle:b.currentVertexStyle,C=d.getStyle(h),g=0;g<G.length;g++){var n=G[g],w=f[n];null==w||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(z,n))||(C=mxUtils.setStyle(C,n,w))}d.setStyle(h,C)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));D(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),k=c.getProperty("values"),g=0;g<d.length;g++){var h=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=k[g]&&"none"!=
+k[g])if(0<=mxUtils.indexOf(z,d[g]))f||0<=mxUtils.indexOf(C,d[g])?null==k[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=k[g]:e&&0<=mxUtils.indexOf(u,d[g])&&(null==k[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=k[g]);else if(0<=mxUtils.indexOf(u,d[g])){if(e||h)null==k[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=k[g];if(f||h||0<=mxUtils.indexOf(C,d[g]))null==k[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2078,23 +2080,23 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=
EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):d.apply(this,arguments);a.updatePasteActionStates()};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=null;c.cellEditor.isContentEditing()?document.execCommand("paste",
!1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){e.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,
-this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(f);
-l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var t=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),t=Math.max(t,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b,
-Math.floor(c-l.x),Math.floor(t-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),k=a.view.translate,h=a.view.scale,l=mxRectangle.fromRectangle(f);
+l.x=l.x/h-k.x;l.y=l.y/h-k.y;l.width/=h;l.height/=h;var k=a.container.scrollTop,m=a.container.scrollLeft,p=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/l.width)):h;c=(n-b*l.width)/2/b;var r=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),r=Math.max(r,0));if(g||f.width<n||f.height<p)a.view.scaleAndTranslate(b,
+Math.floor(c-l.x),Math.floor(r-l.y)),a.container.scrollTop=k*b/h,a.container.scrollLeft=m*b/h;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/h),Math.floor(f.y+e/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){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="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var f=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",f);f();var e=0,f=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);
-return d}),h=f(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
-l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});h.style.paddingLeft="0px";h.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",h.style.display="",g.style.display="inline-block"):(k.style.display="none",h.style.display=
-"none",g.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(b){a.lightbox?(1==a.view.scale?
-this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var p=null,n=null,q=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n=
-null}),600)}),a||200)}),t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=f(mxUtils.bind(this,function(b){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 c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){r.style.display=1<w.getChildCount(w.root)?
+return d}),k=f(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var h=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
+l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});k.style.paddingLeft="0px";k.style.paddingRight="4px";h.style.paddingLeft="4px";h.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(h.style.display="",k.style.display="",g.style.display="inline-block"):(h.style.display="none",k.style.display=
+"none",g.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?
+this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var n=null,p=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=
+null}),600)}),a||200)}),r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var t=f(mxUtils.bind(this,function(b){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 c=t.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){t.style.display=1<w.getChildCount(w.root)?
"":"none"})}this.addChromelessToolbarItems(f);null!=this.editor.editButtonLink&&f(mxUtils.bind(this,function(b){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||f(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
-mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||t(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():t(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||t(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
-c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?q():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var u=
+mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||r(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():r(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
+c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?q():r(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var u=
a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}u.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*
d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),
this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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=
@@ -2104,7 +2106,7 @@ mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClien
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"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 c=urlParams.border,d=60;null!=c&&(d=parseInt(c));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.chromeless)return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
+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,c){try{var d=mxUtils.parseXml(a);this.editor.setGraphXml(d.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=c&&(this.editor.setFilename(c),this.updateDocumentTitle())}catch(b){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+b.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,c){this.currentMenuElt=c;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){}};
@@ -2112,10 +2114,10 @@ EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing())
EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0,d;for(d in urlParams)a=0==c?a+"?":a+"&",a+=d+"="+urlParams[d],c++;return a};
EditorUi.prototype.setScrollbars=function(a){var c=this.editor.graph,d=c.container.style.overflow;c.scrollbars=a;this.editor.updateGraphComponents();d!=c.container.style.overflow&&("hidden"==c.container.style.overflow?(a=c.view.translate,c.view.setTranslate(a.x-c.container.scrollLeft/c.view.scale,a.y-c.container.scrollTop/c.view.scale),c.container.scrollLeft=0,c.container.scrollTop=0,c.minimumGraphSize=null,c.sizeDidChange()):(a=c.view.translate.x,d=c.view.translate.y,c.view.translate.x=0,c.view.translate.y=
0,c.sizeDidChange(),c.container.scrollLeft-=Math.round(a*c.view.scale),c.container.scrollTop-=Math.round(d*c.view.scale)));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.chromeless)if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var c=a.getPagePadding();a.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing);a.container.scrollLeft=Math.floor(Math.min(c.x,(a.container.scrollWidth-a.container.clientWidth)/2));c=a.getGraphBounds();
-0<c.width&&0<c.height&&(c.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{var c=a.getGraphBounds(),d=Math.max(c.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-Math.max(c.height,a.scrollTileSize.height*
-a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth-d)/2)))}else a.pageVisible?(c=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x),Math.floor(Math.max(0,(a.container.clientHeight-c.height)/2)-c.y))):(c=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-c.width)/2)-c.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-c.height)/
-4))-c.y)))};
+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 c=a.getPagePadding();a.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing);a.container.scrollLeft=Math.floor(Math.min(c.x,(a.container.scrollWidth-a.container.clientWidth)/2));c=
+a.getGraphBounds();0<c.width&&0<c.height&&(c.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{var c=a.getGraphBounds(),d=Math.max(c.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-Math.max(c.height,
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth-d)/2)))}else a.pageVisible?(c=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x),Math.floor(Math.max(0,(a.container.clientHeight-c.height)/2)-c.y))):(c=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-c.width)/2)-c.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
+c.height)/4))-c.y)))};
EditorUi.prototype.setPageVisible=function(a){var c=this.editor.graph,d=mxUtils.hasScrollbars(c.container),b=0,f=0;d&&(b=c.view.translate.x*c.view.scale-c.container.scrollLeft,f=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=a;c.pageBreaksVisible=a;c.preferPageSize=a;c.view.validateBackground();d&&(a=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(a));c.sizeDidChange();d&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-b,c.container.scrollTop=c.view.translate.y*
c.view.scale-f);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,c,d,b){this.ui=a;this.previousColor=this.color=c;this.previousImage=this.image=d;this.previousFormat=this.format=b;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}this.ignoreImage||(this.image=this.previousImage,c=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=c);null!=this.previousFormat&&(this.format=this.previousFormat,c=a.pageFormat,this.previousFormat.width!=c.width||this.previousFormat.height!=c.height)&&(this.ui.setPageFormat(this.previousFormat),
@@ -2125,18 +2127,18 @@ EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this
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"),c=this.actions.get("redo"),d=this.editor.undoManager,b=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,b);d.addListener(mxEvent.UNDO,b);d.addListener(mxEvent.REDO,b);d.addListener(mxEvent.CLEAR,b);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);b()};var e=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,c){e.apply(this,arguments);b()};b()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),d=!1,b=!1,f=a.getSelectionCells();if(null!=f)for(var e=0;e<f.length;e++){var h=f[e];a.getModel().isEdge(h)&&(b=!0);a.getModel().isVertex(h)&&(d=!0);if(b&&d)break}f="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(e=
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),d=!1,b=!1,f=a.getSelectionCells();if(null!=f)for(var e=0;e<f.length;e++){var k=f[e];a.getModel().isEdge(k)&&(b=!0);a.getModel().isVertex(k)&&(d=!0);if(b&&d)break}f="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(e=
0;e<f.length;e++)this.actions.get(f[e]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(b);this.actions.get("rotation").setEnabled(d);this.actions.get("wordWrap").setEnabled(d);this.actions.get("autosize").setEnabled(d);b=d&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
b&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||b&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(b&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(c||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(d&&(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()));c=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(c);this.actions.get("collapse").setEnabled(c);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());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);c=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(c);this.menus.get("insert").setEnabled(c);this.menus.get("direction").setEnabled(c&&d);this.menus.get("align").setEnabled(c&&d&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(c&&d&&1<a.getSelectionCount());
this.actions.get("selectVertices").setEnabled(c);this.actions.get("selectEdges").setEnabled(c);this.actions.get("selectAll").setEnabled(c);this.actions.get("selectNone").setEnabled(c);this.updatePasteActionStates()};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var c=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),d=this.container.clientWidth,b=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,b=c?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var f=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(f=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var e=Math.max(0,Math.min(this.hsplitPosition,d-this.splitSize-20)),h=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",h+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",h+=this.toolbarHeight);0<h&&!mxClient.IS_QUIRKS&&(h+=1);var g=0;if(null!=this.sidebarFooterContainer){var k=
-this.footerHeight+f,g=Math.max(0,Math.min(b-h-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=e+"px";this.sidebarFooterContainer.style.height=g+"px";this.sidebarFooterContainer.style.bottom=k+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=h+"px";this.sidebarContainer.style.width=e+"px";this.formatContainer.style.top=h+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(f=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var e=Math.max(0,Math.min(this.hsplitPosition,d-this.splitSize-20)),k=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",k+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",k+=this.toolbarHeight);0<k&&!mxClient.IS_QUIRKS&&(k+=1);var g=0;if(null!=this.sidebarFooterContainer){var h=
+this.footerHeight+f,g=Math.max(0,Math.min(b-k-h,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=e+"px";this.sidebarFooterContainer.style.height=g+"px";this.sidebarFooterContainer.style.bottom=h+"px"}h=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=k+"px";this.sidebarContainer.style.width=e+"px";this.formatContainer.style.top=k+"px";this.formatContainer.style.width=h+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?e+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+f+"px";this.hsplit.style.left=e+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);c?(this.menubarContainer.style.width=d+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-c=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-g+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,d-e-this.splitSize-k)+"px":d+"px",this.footerContainer.style.width=this.menubarContainer.style.width,g=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+f+"px",g-=this.tabContainer.clientHeight),this.diagramContainer.style.height=g+"px",this.hsplit.style.height=g+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=f+"px"),this.diagramContainer.style.right=k+"px",d=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+f+"px",this.tabContainer.style.right=this.diagramContainer.style.right,d=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+g+f+"px",this.formatContainer.style.bottom=
+c=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-g+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,d-e-this.splitSize-h)+"px":d+"px",this.footerContainer.style.width=this.menubarContainer.style.width,g=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
+this.footerHeight+f+"px",g-=this.tabContainer.clientHeight),this.diagramContainer.style.height=g+"px",this.hsplit.style.height=g+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=f+"px"),this.diagramContainer.style.right=h+"px",d=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+f+"px",this.tabContainer.style.right=this.diagramContainer.style.right,d=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+g+f+"px",this.formatContainer.style.bottom=
this.footerHeight+f+"px",this.diagramContainer.style.bottom=this.footerHeight+f+d+"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=
@@ -2146,8 +2148,8 @@ 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";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");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 c=document.createElement("div");c.className=a;return c};
-EditorUi.prototype.addSplitHandler=function(a,c,d,b){function f(a){if(null!=h){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,g+(c?e.x-h.x:h.y-e.y)-d));mxEvent.consume(a);g!=m()&&(k=!0,l=null)}}function e(a){f(a);h=g=null}var h=null,g=null,k=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){h=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));g=m();k=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!k){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,f,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,e)})};EditorUi.prototype.showDialog=function(a,c,d,b,f,e,h){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,f,e,h);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,c,d,b){function f(a){if(null!=k){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,g+(c?e.x-k.x:k.y-e.y)-d));mxEvent.consume(a);g!=m()&&(h=!0,l=null)}}function e(a){f(a);k=g=null}var k=null,g=null,h=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){k=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));g=m();h=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!h){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,f,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,e)})};EditorUi.prototype.showDialog=function(a,c,d,b,f,e,k){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,f,e,k);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
EditorUi.prototype.pickColor=function(a,c){var d=this.editor.graph,b=d.cellEditor.saveSelection(),f=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(b);c(a)},function(){d.cellEditor.restoreSelection(b)});this.showDialog(f.container,230,430,!0,!1);f.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})};
@@ -2157,17 +2159,17 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,d=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);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,c,d){var b=this.editor.graph;if(b.isEnabled()){b.getModel().beginUpdate();try{a()}catch(f){throw f;}finally{this.allowAnimation&&c&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(b),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){b.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(b.getModel().endUpdate(),null!=d&&d())}}};
-EditorUi.prototype.showImageDialog=function(a,c,d,b){b=this.editor.graph.cellEditor;var f=b.saveSelection(),e=mxUtils.prompt(a,c);b.restoreSelection(f);if(null!=e&&0<e.length){var h=new Image;h.onload=function(){d(e,h.width,h.height)};h.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};h.src=e}else d(null)};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,c,d,b){b=this.editor.graph.cellEditor;var f=b.saveSelection(),e=mxUtils.prompt(a,c);b.restoreSelection(f);if(null!=e&&0<e.length){var k=new Image;k.onload=function(){d(e,k.width,k.height)};k.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=e}else d(null)};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showBackgroundImageDialog=function(a){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 c=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=c&&0<c.length){var d=new Image;d.onload=function(){a(new mxImage(c,d.width,d.height))};d.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};d.src=c}else 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,c,d){mxUtils.confirm(a)?null!=c&&c():null!=d&&d()};
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};
-EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),f=0;f<e.length;f++)if(b.getModel().isVertex(e[f])&&b.isCellResizable(e[f])){var g=b.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),b.getModel().setGeometry(e[f],g))}}finally{b.getModel().endUpdate()}}else e=
+EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){k.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),f=0;f<e.length;f++)if(b.getModel().isVertex(e[f])&&b.isCellResizable(e[f])){var g=b.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),b.getModel().setGeometry(e[f],g))}}finally{b.getModel().endUpdate()}}else e=
b.getSelectionCell(),f=b.model.getParent(e),g=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(g=b.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(e),37==a||38==a?b.model.add(f,e,Math.max(0,g-1)):39!=a&&40!=a||b.model.add(f,e,Math.min(b.model.getChildCount(f),g+1))):(f=e=0,37==a?e=-c:38==a?f=-c:39==a?e=c:40==a&&(f=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,f))});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0<
-h.length){b.getModel().beginUpdate();try{for(var a=0;a<h.length;a++)h[a]();h=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return(!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)&&e.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var h=[],g=null,k={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction,m={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
-80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var e=m[a.keyCode];if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=k[a.keyCode]&&!b.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=
-b.connectVertex(b.getSelectionCell(),k[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return l.apply(this,
-arguments)};f.bindAction=mxUtils.bind(this,function(a,b,c,d){var e=this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?f.bindControlShiftKey(a,c):f.bindControlKey(a,c):d?f.bindShiftKey(a,c):f.bindKey(a,c))});var p=f.escape;f.escape=function(a){p.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){b.exitGroup()});f.bindControlShiftKey(35,function(){b.enterGroup()});f.bindKey(36,function(){b.home()});f.bindKey(35,function(){b.refresh()});f.bindAction(107,
+k.length){b.getModel().beginUpdate();try{for(var a=0;a<k.length;a++)k[a]();k=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return(!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)&&e.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var k=[],g=null,h={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction,m={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
+80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var e=m[a.keyCode];if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=h[a.keyCode]&&!b.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=
+b.connectVertex(b.getSelectionCell(),h[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return l.apply(this,
+arguments)};f.bindAction=mxUtils.bind(this,function(a,b,c,d){var e=this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?f.bindControlShiftKey(a,c):f.bindControlKey(a,c):d?f.bindShiftKey(a,c):f.bindKey(a,c))});var n=f.escape;f.escape=function(a){n.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){b.exitGroup()});f.bindControlShiftKey(35,function(){b.enterGroup()});f.bindKey(36,function(){b.home()});f.bindKey(35,function(){b.refresh()});f.bindAction(107,
!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);f.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),f.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),f.bindControlKey(13,function(){b.isEnabled()&&b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),!1))}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(46,!1,
"delete"),f.bindAction(46,!0,"deleteAll"),f.bindAction(72,!0,"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",
@@ -2186,26 +2188,26 @@ Sidebar.prototype.expandedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhD
Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEaSURBVHjabNGxS5VxFIfxz71XaWuQUJCG/gCHhgTD9VpEETg4aMOlQRp0EoezObgcd220KQiXmpretTAHQRBdojlQEJyukPdt+b1ywfvAGc7wnHP4nlZd1yKijQW8xzNc4Su+ZOYfQ3T6/f4YNvEJYzjELXp4VVXVz263+7cR2niBxAFeZ2YPi3iHR/gYERPDwhpOsd6sz8x/mfkNG3iOlWFhFj8y89J9KvzGXER0GuEaD42mgwHqUtoljbcRsTBCeINpfM/MgZLKPpaxFxGbOCqDXmILN7hoJrTKH+axhxmcYRxP0MIDnOBDZv5q1XUNIuJxifJp+UNV7t7BFM6xeic0RMQ4Bpl5W/ol7GISx/eEUUTECrbx+f8A8xhiZht9zsgAAAAASUVORK5CYII=":IMAGE_PATH+
"/search.png";Sidebar.prototype.dragPreviewBorder="1px dashed black";Sidebar.prototype.enableTooltips=!0;Sidebar.prototype.tooltipBorder=16;Sidebar.prototype.tooltipDelay=300;Sidebar.prototype.dropTargetDelay=200;Sidebar.prototype.gearImage=STENCIL_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.thumbWidth=36;Sidebar.prototype.thumbHeight=36;Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1;Sidebar.prototype.thumbBorder=2;Sidebar.prototype.sidebarTitleSize=9;
Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.getTooltipOffset=function(){return new mxPoint(0,0)};
-Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),this.tooltipImage=mxUtils.createImage(this.tooltipImage),this.tooltipImage.className="geSidebarTooltipImage",this.tooltipImage.style.zIndex=mxPopupMenu.prototype.zIndex-1,this.tooltipImage.style.position="absolute",this.tooltipImage.style.width=
"14px",this.tooltipImage.style.height="27px",document.body.appendChild(this.tooltipImage));this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=d>this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);
-mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=f&&0<f.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",
+mxClient.NO_FO=g;var k=this.graph2.getGraphBounds(),l=k.width+2*this.tooltipBorder+4,g=k.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=f&&0<f.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",
this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,f),l=this.tooltipTitle.offsetHeight+10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&
-null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,p=document.documentElement,n=this.getTooltipOffset(),q=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+n.x,m=Math.min(Math.max(m.clientHeight||0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-
-g/2+16))+n.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=q+"px";this.tooltip.style.top=m+"px";this.tooltipImage.style.left=q-13+"px";this.tooltipImage.style.top=m+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=
-window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))};
+null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(k.x-this.tooltipBorder),k=-Math.round(k.y-this.tooltipBorder),m=document.body,n=document.documentElement,p=this.getTooltipOffset(),q=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+p.x,m=Math.min(Math.max(m.clientHeight||0,n.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-
+g/2+16))+p.y;mxClient.IS_SVG?0!=l||0!=k?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+k+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=k+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=q+"px";this.tooltip.style.top=m+"px";this.tooltipImage.style.left=q-13+"px";this.tooltipImage.style.top=m+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=
+window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))};
Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length)for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),b=mxUtils.bind(this,function(a){if(1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[],dict:new mxDictionary},this.taglist[a]=b);null==b.dict.get(c)&&(b.dict.put(c,c),b.entries.push(c))}}),f=0;f<d.length;f++){b(d[f]);var e=d[f].replace(/\.*\d*$/,"");e!=d[f]&&b(e)}return c};
-Sidebar.prototype.searchEntries=function(a,c,d,b,f){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");f=new mxDictionary;var h=(d+1)*c;a=[];for(var g=0,k=0;k<e.length;k++)if(0<e[k].length){var l=this.taglist[e[k]],m=new mxDictionary;if(null!=l){var p=l.entries;a=[];for(var n=0;n<p.length;n++)if(l=p[n],0==g==(null==f.get(l))&&(m.put(l,l),a.push(l),k==e.length-1&&a.length==h)){b(a.slice(d*c,h),h,!0,e);return}}else a=[];f=m;g++}f=a.length;b(a.slice(d*c,(d+1)*c),f,!1,e)}else b([],null,
+Sidebar.prototype.searchEntries=function(a,c,d,b,f){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");f=new mxDictionary;var k=(d+1)*c;a=[];for(var g=0,h=0;h<e.length;h++)if(0<e[h].length){var l=this.taglist[e[h]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==g==(null==f.get(l))&&(m.put(l,l),a.push(l),h==e.length-1&&a.length==k)){b(a.slice(d*c,k),k,!0,e);return}}else a=[];f=m;g++}f=a.length;b(a.slice(d*c,(d+1)*c),f,!1,e)}else b([],null,
null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var c=[],d={},b=0;b<a.length;b++)null==d[a[b]]&&(d[a[b]]="1",c.push(a[b]));return c.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,c){var d=a.clone();null!=c&&(d.value=c);return d};
Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var d=document.createElement("div");d.className="geSidebar";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.width="100%";d.style.padding="8px";d.style.paddingTop="14px";d.style.paddingBottom="0px";a||(d.style.display="none");var b=document.createElement("div");b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.paddingBottom="8px";
b.style.cursor="default";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("searchShapes"));f.setAttribute("type","text");f.style.fontSize="12px";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.border="solid 1px #d5d5d5";f.style.borderRadius="4px";f.style.width="100%";f.style.outline="none";f.style.padding="6px";b.appendChild(f);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",mxResources.get("search"));
-e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var h;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),k=mxUtils.button(mxResources.get("moreResults"),function(){h()});k.style.display="none";k.style.lineHeight="normal";k.style.marginTop="4px";k.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom="8px";g.appendChild(k);
-d.appendChild(g);var l="",m=!1,p=!1,n=0,q={},t=12,r=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",r());f.focus()});h=mxUtils.bind(this,function(){t=4*Math.max(1,
-Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(r(),l=f.value,q={},p=!1,n=0),!m&&!p)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,t,n,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;n++;g.parentNode.removeChild(g);this.insertSearchHint(d,l,t,n,b,c,e,
-f);for(c=0;c<b.length;c++)f=b[c](),null==q[f.innerHTML]&&(q[f.innerHTML]="1",d.appendChild(b[c]()));e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",p=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else r(),l=f.value="",q={},k.style.display="none",p=!1,f.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));
-mxEvent.addListener(f,"focus",function(){f.style.paddingRight=""});mxEvent.addListener(f,"blur",function(){f.style.paddingRight="20px"});f.style.paddingRight="20px";mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(p=!0,k.style.display="none"):f.value!=l?(k.style.display=
-"none",p=!1):m||(k.style.display=p?"none":"")}));mxEvent.addListener(f,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
-Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,h,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
+e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var k;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),h=mxUtils.button(mxResources.get("moreResults"),function(){k()});h.style.display="none";h.style.lineHeight="normal";h.style.marginTop="4px";h.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom="8px";g.appendChild(h);
+d.appendChild(g);var l="",m=!1,n=!1,p=0,q={},r=12,t=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),h.style.display="none",l=f.value="",t());f.focus()});k=mxUtils.bind(this,function(){r=4*Math.max(1,
+Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(t(),l=f.value,q={},n=!1,p=0),!m&&!n)){h.setAttribute("disabled","true");h.style.display="";h.style.cursor="wait";h.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,r,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;g.parentNode.removeChild(g);this.insertSearchHint(d,l,r,p,b,c,e,
+f);for(c=0;c<b.length;c++)f=b[c](),null==q[f.innerHTML]&&(q[f.innerHTML]="1",d.appendChild(b[c]()));e?(h.removeAttribute("disabled"),h.innerHTML=mxResources.get("moreResults")):(h.innerHTML=mxResources.get("reset"),h.style.display="none",n=!0);h.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){h.style.cursor=""}))}}else t(),l=f.value="",q={},h.style.display="none",n=!1,f.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(k(),mxEvent.consume(a))}));
+mxEvent.addListener(f,"focus",function(){f.style.paddingRight=""});mxEvent.addListener(f,"blur",function(){f.style.paddingRight="20px"});f.style.paddingRight="20px";mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(n=!0,h.style.display="none"):f.value!=l?(h.style.display=
+"none",n=!1):m||(h.style.display=n?"none":"")}));mxEvent.addListener(f,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
+Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,k,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
Sidebar.prototype.addGeneralPalette=function(a){var c=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",40,20,"Text","Text",null,null,"text textbox textarea label"),
this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;",
@@ -2287,114 +2289,116 @@ a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new
160,0,"","Terminate",null,"terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,f)};
Sidebar.prototype.addBpmnPalette=function(a,c){var d=this,b=[this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;",120,80,"Task","Process",null,null,"bpmn task process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;double=1;",120,80,"Transaction","Transaction",null,null,"bpmn transaction"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;dashed=1;dashPattern=1 4;",120,80,"Event\nSub-Process","Event Sub-Process",null,null,
-"bpmn event subprocess sub process sub-process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;strokeWidth=3;",120,80,"Call Activity","Call Activity",null,null,"bpmn call activity"),this.addEntry("bpmn subprocess sub process sub-process",function(){var a=new mxCell("Sub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
-new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Process")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","loop","subprocess sub process sub-process looped").join(" "),function(){var a=new mxCell("Looped\nSub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=mxgraph.bpmn.loop;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
-new mxPoint(-15,-14);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(1,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Looped Sub-Process")}),this.addEntry("bpmn receive task",function(){var a=new mxCell("Receive",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"html=1;shape=message;");
-b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(7,7);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Receive Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","user_task").join(" "),function(){var a=new mxCell("User",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,14,14),"html=1;shape=mxgraph.bpmn.user_task;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
-new mxPoint(7,7);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"User Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(1,
-1,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-40,-15);a.insert(b);return d.createVertexTemplateFromCells([a],120,95,"Attached Timer Event 1")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");
-a.vertex=!0;var b=new mxCell("",new mxGeometry(1,0,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-15,10);a.insert(b);return d.createVertexTemplateFromCells([a],135,80,"Attached Timer Event 2")}),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;startSize=20;",320,240,"Pool","Pool",null,null,"bpmn pool"),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;",
-300,120,"Lane","Lane",null,null,"bpmn lane"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;",60,50,"","Conversation",null,null,"bpmn conversation"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4",60,50,"","Call Conversation",null,null,"bpmn call conversation"),this.addEntry("bpmn subconversation sub conversation sub-conversation",function(){var a=new mxCell("",new mxGeometry(0,0,60,50),
-"shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Conversation")}),this.addEntry("bpmn data object",function(){var a=new mxCell("",new mxGeometry(0,0,40,60),"shape=note;whiteSpace=wrap;size=16;html=1;");a.vertex=!0;var b=new mxCell("",
-new mxGeometry(0,0,14,14),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(2,2);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;whiteSpace=wrap;shape=parallelMarker;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Data Object")}),this.createVertexTemplateEntry("shape=datastore;whiteSpace=wrap;html=1;",
-60,60,"","Data Store",null,null,"bpmn data store"),this.createVertexTemplateEntry("shape=plus;html=1;",14,14,"","Sub-Process Marker",null,null,"bpmn subprocess sub process sub-process marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.loop;html=1;",14,14,"","Loop Marker",null,null,"bpmn loop marker"),this.createVertexTemplateEntry("shape=parallelMarker;html=1;",14,14,"","Parallel MI Marker",null,null,"bpmn parallel mi marker"),this.createVertexTemplateEntry("shape=parallelMarker;direction=south;html=1;",
-14,14,"","Sequential MI Marker",null,null,"bpmn sequential mi marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;",14,14,"","Ad Hoc Marker",null,null,"bpmn ad hoc marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.compensation;html=1;",14,14,"","Compensation Marker",null,null,"bpmn compensation marker"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;",40,30,"","Send Task",null,
-null,"bpmn send task"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;",40,30,"","Receive Task",null,null,"bpmn receive task"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.user_task;html=1;",14,14,"","User Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.manual_task;html=1;",14,14,"","Manual Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.business_rule_task;html=1;",
-14,14,"","Business Rule Task",null,null,this.getTagsForStencil("mxgraph.bpmn","business_rule_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.service_task;html=1;",14,14,"","Service Task",null,null,this.getTagsForStencil("mxgraph.bpmn","service_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.script_task;html=1;",14,14,"","Script Task",null,null,this.getTagsForStencil("mxgraph.bpmn","script_task").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.flowchart.annotation_2;align=left;",
-50,100,"","Annotation",null,null,this.getTagsForStencil("bpmn","annotation_1","bpmn business process model ").join(" ")),this.createVertexTemplateEntry("rounded=1;arcSize=10;dashed=1;strokeColor=#000000;fillColor=none;gradientColor=none;dashPattern=8 3 1 3;strokeWidth=2;",200,200,"","Group",null,null,this.getTagsForStencil("bpmn","group","bpmn business process model ").join(" ")),this.createEdgeTemplateEntry("endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Sequence Flow",null,"bpmn sequence flow"),
-this.createEdgeTemplateEntry("startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Default Flow",null,"bpmn default flow"),this.createEdgeTemplateEntry("startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Conditional Flow",null,"bpmn conditional flow"),this.createEdgeTemplateEntry("startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;",100,0,"","Message Flow 1",null,"bpmn message flow"),
-this.addEntry("bpmn message flow",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;b.geometry.offset=new mxPoint(-10,-7);a.insert(b);return d.createEdgeTemplateFromCells([a],
-100,0,"Message Flow 2")}),this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"bpmn link")];this.addPaletteFunctions("bpmn","BPMN "+mxResources.get("general"),!1,b)};Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c};
-Sidebar.prototype.createThumb=function(a,c,d,b,f,e,h,g,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();g=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((c-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));if(this.graph.dialect!=mxConstants.DIALECT_SVG||
+"bpmn event subprocess sub process sub-process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;strokeWidth=3;",120,80,"Call Activity","Call Activity",null,null,"bpmn call activity"),this.addEntry("bpmn subprocess sub process sub-process",function(){var a=new mxCell("Sub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;outlineConnect=0;");b.vertex=!0;b.geometry.relative=
+!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Process")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","loop","subprocess sub process sub-process looped").join(" "),function(){var a=new mxCell("Looped\nSub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=mxgraph.bpmn.loop;outlineConnect=0;");b.vertex=!0;b.geometry.relative=
+!0;b.geometry.offset=new mxPoint(-15,-14);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(1,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Looped Sub-Process")}),this.addEntry("bpmn receive task",function(){var a=new mxCell("Receive",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"html=1;shape=message;outlineConnect=0;");
+b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(7,7);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Receive Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","user_task").join(" "),function(){var a=new mxCell("User",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,14,14),"html=1;shape=mxgraph.bpmn.user_task;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;
+b.geometry.offset=new mxPoint(7,7);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"User Task")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=
+!0;var b=new mxCell("",new mxGeometry(1,1,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-40,-15);a.insert(b);return d.createVertexTemplateFromCells([a],120,95,"Attached Timer Event 1")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","timer_start","attached").join(" "),function(){var a=new mxCell("Process",
+new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(1,0,30,30),"shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-15,10);a.insert(b);return d.createVertexTemplateFromCells([a],135,80,"Attached Timer Event 2")}),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;startSize=20;",
+320,240,"Pool","Pool",null,null,"bpmn pool"),this.createVertexTemplateEntry("swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;",300,120,"Lane","Lane",null,null,"bpmn lane"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;rounded=0;",60,50,"","Conversation",null,null,"bpmn conversation"),this.createVertexTemplateEntry("shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4;rounded=0;",60,50,"","Call Conversation",
+null,null,"bpmn call conversation"),this.addEntry("bpmn subconversation sub conversation sub-conversation",function(){var a=new mxCell("",new mxGeometry(0,0,60,50),"shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;rounded=0;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Conversation")}),
+this.addEntry("bpmn data object",function(){var a=new mxCell("",new mxGeometry(0,0,40,60),"shape=note;whiteSpace=wrap;size=16;html=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,14,14),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(2,2);a.insert(b);b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;whiteSpace=wrap;shape=parallelMarker;outlineConnect=0;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=
+new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Data Object")}),this.createVertexTemplateEntry("shape=datastore;whiteSpace=wrap;html=1;",60,60,"","Data Store",null,null,"bpmn data store"),this.createVertexTemplateEntry("shape=plus;html=1;outlineConnect=0;",14,14,"","Sub-Process Marker",null,null,"bpmn subprocess sub process sub-process marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.loop;html=1;outlineConnect=0;",14,14,"",
+"Loop Marker",null,null,"bpmn loop marker"),this.createVertexTemplateEntry("shape=parallelMarker;html=1;outlineConnect=0;",14,14,"","Parallel MI Marker",null,null,"bpmn parallel mi marker"),this.createVertexTemplateEntry("shape=parallelMarker;direction=south;html=1;outlineConnect=0;",14,14,"","Sequential MI Marker",null,null,"bpmn sequential mi marker"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;outlineConnect=0;",14,14,"","Ad Hoc Marker",null,null,"bpmn ad hoc marker"),
+this.createVertexTemplateEntry("shape=mxgraph.bpmn.compensation;html=1;outlineConnect=0;",14,14,"","Compensation Marker",null,null,"bpmn compensation marker"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;outlineConnect=0;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;",40,30,"","Send Task",null,null,"bpmn send task"),this.createVertexTemplateEntry("shape=message;whiteSpace=wrap;html=1;outlineConnect=0;",40,30,"","Receive Task",null,null,"bpmn receive task"),this.createVertexTemplateEntry("shape=mxgraph.bpmn.user_task;html=1;outlineConnect=0;",
+14,14,"","User Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.manual_task;html=1;outlineConnect=0;",14,14,"","Manual Task",null,null,this.getTagsForStencil("mxgraph.bpmn","user_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.business_rule_task;html=1;outlineConnect=0;",14,14,"","Business Rule Task",null,null,this.getTagsForStencil("mxgraph.bpmn","business_rule_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.service_task;html=1;outlineConnect=0;",
+14,14,"","Service Task",null,null,this.getTagsForStencil("mxgraph.bpmn","service_task").join(" ")),this.createVertexTemplateEntry("shape=mxgraph.bpmn.script_task;html=1;outlineConnect=0;",14,14,"","Script Task",null,null,this.getTagsForStencil("mxgraph.bpmn","script_task").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.flowchart.annotation_2;align=left;",50,100,"","Annotation",null,null,this.getTagsForStencil("bpmn","annotation_1","bpmn business process model ").join(" ")),this.createVertexTemplateEntry("rounded=1;arcSize=10;dashed=1;strokeColor=#000000;fillColor=none;gradientColor=none;dashPattern=8 3 1 3;strokeWidth=2;",
+200,200,"","Group",null,null,this.getTagsForStencil("bpmn","group","bpmn business process model ").join(" ")),this.createEdgeTemplateEntry("endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Sequence Flow",null,"bpmn sequence flow"),this.createEdgeTemplateEntry("startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Default Flow",null,"bpmn default flow"),this.createEdgeTemplateEntry("startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6;html=1;",
+100,0,"","Conditional Flow",null,"bpmn conditional flow"),this.createEdgeTemplateEntry("startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;",100,0,"","Message Flow 1",null,"bpmn message flow"),this.addEntry("bpmn message flow",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,
+0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");b.geometry.relative=!0;b.vertex=!0;b.geometry.offset=new mxPoint(-10,-7);a.insert(b);return d.createEdgeTemplateFromCells([a],100,0,"Message Flow 2")}),this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"bpmn link")];this.addPaletteFunctions("bpmn","BPMN "+mxResources.get("general"),!1,b)};
+Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c};
+Sidebar.prototype.createThumb=function(a,c,d,b,f,e,k,g,h){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();g=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((c-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));if(this.graph.dialect!=mxConstants.DIALECT_SVG||
mxClient.NO_FO){if(g=this.graph.container.cloneNode(!1),g.innerHTML=this.graph.container.innerHTML,mxClient.IS_QUIRKS||8==document.documentMode)g.firstChild.style.overflow="visible"}else g=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;mxClient.IS_IE6&&(b.style.backgroundImage="url("+this.editorUi.editor.transparentImage+")");g.style.position="relative";g.style.overflow="hidden";g.style.cursor="move";g.style.left=this.thumbBorder+"px";g.style.top=
-this.thumbBorder+"px";g.style.width=c+"px";g.style.height=d+"px";g.style.visibility="";g.style.minWidth="";g.style.minHeight="";b.appendChild(g);this.sidebarTitles&&null!=f&&0!=h&&(b.style.height=this.thumbHeight+(mxClient.IS_QUIRKS?2*this.thumbPadding+2:0)+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=this.sidebarTitleSize+12+"px"),
+this.thumbBorder+"px";g.style.width=c+"px";g.style.height=d+"px";g.style.visibility="";g.style.minWidth="";g.style.minHeight="";b.appendChild(g);this.sidebarTitles&&null!=f&&0!=k&&(b.style.height=this.thumbHeight+(mxClient.IS_QUIRKS?2*this.thumbPadding+2:0)+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=this.sidebarTitleSize+12+"px"),
c.style.paddingTop="4px",mxUtils.write(c,f),b.appendChild(c));return a};
-Sidebar.prototype.createItem=function(a,c,d,b,f,e,h){var g=document.createElement("a");g.setAttribute("href","javascript:void(0);");g.className="geItem";g.style.overflow="hidden";var k=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;g.style.width=this.thumbWidth+k+"px";g.style.height=this.thumbHeight+k+"px";g.style.padding=this.thumbPadding+"px";mxClient.IS_IE6&&(g.style.border="none");mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});this.createThumb(a,this.thumbWidth,this.thumbHeight,
-g,c,d,b,f,e);var l=new mxRectangle(0,0,f,e);1<a.length||a[0].vertex?(b=this.createDragSource(g,this.createDropHandler(a,!0,h,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a),b.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(b=this.createDragSource(g,this.createDropHandler(a,!1,h,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a));mxClient.IS_IOS||mxEvent.addGestureListeners(g,null,mxUtils.bind(this,
+Sidebar.prototype.createItem=function(a,c,d,b,f,e,k){var g=document.createElement("a");g.setAttribute("href","javascript:void(0);");g.className="geItem";g.style.overflow="hidden";var h=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;g.style.width=this.thumbWidth+h+"px";g.style.height=this.thumbHeight+h+"px";g.style.padding=this.thumbPadding+"px";mxClient.IS_IE6&&(g.style.border="none");mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});this.createThumb(a,this.thumbWidth,this.thumbHeight,
+g,c,d,b,f,e);var l=new mxRectangle(0,0,f,e);1<a.length||a[0].vertex?(b=this.createDragSource(g,this.createDropHandler(a,!0,k,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a),b.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(b=this.createDragSource(g,this.createDropHandler(a,!1,k,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a));mxClient.IS_IOS||mxEvent.addGestureListeners(g,null,mxUtils.bind(this,
function(b){mxEvent.isMouseEvent(b)&&this.showTooltip(g,a,l.width,l.height,c,d)}));return g};
-Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=d.getCellStyle(a),f=[];d.model.beginUpdate();try{for(var e=d.getModel().getStyle(a),h="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable".split(" "),g=0;g<c.length;g++){var k=c[g];if(d.getModel().isVertex(k)==d.getModel().isVertex(a)||
-d.getModel().isEdge(k)==d.getModel().isEdge(a)){var l=d.view.getState(k),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(k,e);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var p=d.model.getChildCount(k);0<=p;p--)d.model.remove(d.model.getChildAt(k,p));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k])),
-p=0;p<h.length;p++){var n=m[h[p]];null!=n&&d.setCellStyles(h[p],n,[k])}f.push(k)}}}finally{d.model.endUpdate()}return f};
-Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(f,e,h,g,k){if(f.isEnabled()){a=f.getImportableCells(a);if(0<a.length){f.stopEditing();var l=null==h||mxEvent.isAltDown(e)?!1:f.isValidDropTarget(h,a,e),m=null;null==h||l||(h=null);if(!f.isCellLocked(h||f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var p=f.cloneCells(a);f.splitEdge(h,p,null,g-b.width/2,k-b.height/2);m=p}else 0<a.length&&
-(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var n=f.layoutManager.getLayout(h);if(null!=n){var q=f.view.scale,t=f.view.translate,r=(g+t.x)*q,w=(k+t.y)*q;for(h=0;h<m.length;h++)n.moveCell(m[h],r,w)}}d&&f.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{f.model.endUpdate()}null!=m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m))}}mxEvent.consume(e)}})};
-Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
-Sidebar.prototype.dropAndConnect=function(a,c,d,b){var f=this.getDropAndConnectGeometry(a,c[b],d,c),e=[];if(null!=f){var h=this.editorUi.editor.graph;h.model.beginUpdate();try{var g=h.getCellGeometry(a),k=h.getCellGeometry(c[b]),l=h.model.getParent(a),m=!0;if(null!=h.layoutManager){var p=h.layoutManager.getLayout(l);if(null!=p&&p.constructor==mxStackLayout&&(m=!1,e=h.view.getState(l),null!=e)){var n=new mxPoint(e.x/h.view.scale-h.view.translate.x,e.y/h.view.scale-h.view.translate.y);f.x+=n.x;f.y+=
-n.y;var q=f.getTerminalPoint(!1);null!=q&&(q.x+=n.x,q.y+=n.y)}}var t=k.x,r=k.y;h.model.isEdge(c[b])&&(r=t=0);var w=h.model.isEdge(a)||null!=g&&!g.relative&&m,e=c=h.importCells(c,f.x-(w?t:0),f.y-(w?r:0),w?l:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[b])){h.model.setTerminal(c[b],a,!0);var v=h.getCellGeometry(c[b]);v.points=null;if(null!=v.getTerminalPoint(!1))v.setTerminalPoint(f.getTerminalPoint(!1),!1);else if(w&&h.model.isVertex(l)){var u=
-h.view.getState(l),n=u.cell!=h.view.currentRoot?new mxPoint(u.x/h.view.scale-h.view.translate.x,u.y/h.view.scale-h.view.translate.y):new mxPoint(0,0);h.cellsMoved(c,n.x,n.y,null,null,!0)}}else k=h.getCellGeometry(c[b]),t=f.x-Math.round(k.x),r=f.y-Math.round(k.y),f.x=Math.round(k.x),f.y=Math.round(k.y),h.model.setGeometry(c[b],f),h.cellsMoved(c,t,r,null,null,!0),e=c.slice(),c.push(h.insertEdge(null,null,"",a,c[b],h.createCurrentEdgeStyle()));h.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{h.model.endUpdate()}}return e};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
+Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=d.getCellStyle(a),f=[];d.model.beginUpdate();try{for(var e=d.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable".split(" "),g=0;g<c.length;g++){var h=c[g];if(d.getModel().isVertex(h)==d.getModel().isVertex(a)||
+d.getModel().isEdge(h)==d.getModel().isEdge(a)){var l=d.view.getState(h),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(h,e);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var n=d.model.getChildCount(h);0<=n;n--)d.model.remove(d.model.getChildAt(h,n));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[h]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[h])),
+n=0;n<k.length;n++){var p=m[k[n]];null!=p&&d.setCellStyles(k[n],p,[h])}f.push(h)}}}finally{d.model.endUpdate()}return f};
+Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(f,e,k,g,h,l){for(l=l?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&f.isEnabled()){a=f.getImportableCells(a);if(0<a.length){f.stopEditing();l=null==k||mxEvent.isAltDown(e)?!1:f.isValidDropTarget(k,a,e);var m=null;null==k||l||(k=null);if(!f.isCellLocked(k||
+f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);h=Math.round(h);if(c&&f.isSplitTarget(k,a,e)){var n=f.cloneCells(a);f.splitEdge(k,n,null,g-b.width/2,h-b.height/2);m=n}else 0<a.length&&(m=f.importCells(a,g,h,k));if(null!=f.layoutManager){var p=f.layoutManager.getLayout(k);if(null!=p){var q=f.view.scale,r=f.view.translate,t=(g+r.x)*q,w=(h+r.y)*q;for(k=0;k<m.length;k++)p.moveCell(m[k],t,w)}}d&&f.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{f.model.endUpdate()}null!=
+m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
+Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),k=[];if(null!=e){var g=this.editorUi.editor.graph,h=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),n=g.model.getParent(a),p=!0;if(null!=g.layoutManager){var q=g.layoutManager.getLayout(n);if(null!=q&&q.constructor==mxStackLayout&&(p=!1,k=g.view.getState(n),null!=k)){var r=new mxPoint(k.x/g.view.scale-g.view.translate.x,k.y/g.view.scale-g.view.translate.y);e.x+=
+r.x;e.y+=r.y;var t=e.getTerminalPoint(!1);null!=t&&(t.x+=r.x,t.y+=r.y)}}var w=m.x,v=m.y;g.model.isEdge(c[b])&&(v=w=0);var u=g.model.isEdge(a)||null!=l&&!l.relative&&p,k=c=g.importCells(c,e.x-(u?w:0),e.y-(u?v:0),u?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var z=g.getCellGeometry(c[b]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(u&&g.model.isVertex(n)){var x=
+g.view.getState(n),r=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,r.x,r.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),w=e.x-Math.round(m.x),v=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,w,v,null,null,!0),k=c.slice(),h=1==k.length?k[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted",
+"cells",c))}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=h&&window.setTimeout(function(){g.startEditing(h)},0)}return k};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,k=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
-b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!h&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+
+b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!k&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+
b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-e),f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=f.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/
2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};
Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])?
-m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=v&&E==D){var h=a.isCellSelected(v.cell)?a.getSelectionCells():[v.cell],h=this.updateShapes(a.model.isEdge(v.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=E&&null!=
-r&&E!=D?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,I,h))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var t=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),t.apply(this,
-arguments))};var r=null,w=null,v=null,u=!1,z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),B=null,L=e(this.roundDrop),K=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,E=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
+"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function k(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,h=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
+m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=v&&E==D){var k=a.isCellSelected(v.cell)?a.getSelectionCells():[v.cell],k=this.updateShapes(a.model.isEdge(v.cell)?b[0]:b[m],k);a.setSelectionCells(k)}else null!=b&&null!=E&&null!=
+t&&E!=D?(k=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,I,k,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var r=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(h.stopEditing(),r.apply(this,
+arguments))};var t=null,w=null,v=null,u=!1,z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),B=null,L=e(this.roundDrop),K=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,E=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var N=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");N.apply(this,arguments)};var Q=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=
-a.view;if(null!=v&&E==D)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=r&&null!=E){var e=a.model.isEdge(r.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(r.cell,b[e],I,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),y=a.model.getParent(r.cell),G=d.translate.x*
-d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(y)&&y!=d.currentRoot&&(H=d.getState(y),G=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+G+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
-(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var O=(new Date).getTime(),F=0,G=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
-c,d,e){var f=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=f&&!this.graph.isCellConnectable(f)){var g=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var k=a.view.getState(f),g=E=null;G!=k?(G=k,O=(new Date).getTime(),F=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(G=k,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+
-10))):F=(new Date).getTime()-O;if(2500>F&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||
-1500<F||a.model.isEdge(k.cell))&&F>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){v=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==B&&(a.container.appendChild(D),B=D.parentNode);h(c,d,l,D)}else null==
-v||!mxUtils.contains(v,c,d)||1500<F&&!mxEvent.isShiftDown(e)?(v=null,null!=B&&(D.parentNode.removeChild(D),B=null)):null!=v&&null!=B&&(l=a.model.isEdge(v.cell)?a.view.getPoint(v):new mxPoint(v.getCenterX(),v.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,D));if(u&&null!=r&&!mxEvent.isAltDown(e)&&null==E){g=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var y=r.absolutePoints;null!=
-L.parentNode&&(l=y[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)));null!=K.parentNode&&(y=y[y.length-1],g.add(h(c,d,new mxRectangle(y.x-this.roundDrop.width/2,y.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
-y=this.graph.selectionCellsHandler.getHandler(r.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),g.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),
-z)),g.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),g.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),C)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=g&&g.grow(10)}I=mxConstants.DIRECTION_NORTH;E==x?I=mxConstants.DIRECTION_EAST:
-E==C||E==K?I=mxConstants.DIRECTION_SOUTH:E==A&&(I=mxConstants.DIRECTION_WEST);null!=v&&E==D&&(k=v);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=r&&5E3<=F||r!=k&&(null==g||!mxUtils.contains(g,c,d)||500<F&&null==E&&l))if(u=!1,r=5E3>F&&F>this.dropTargetDelay||a.model.isEdge(f)?k:null,null!=r&&l){g=[L,K,z,x,C,A];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(y=k.absolutePoints,
-null!=y&&(l=y[0],y=y[y.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),L.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",K.style.left=Math.floor(y.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(y.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(L),null==a.model.getTerminal(f,!1)&&a.container.appendChild(K))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&
-(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),y=this.graph.selectionCellsHandler.getHandler(k.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),
-z.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",C.style.left=z.style.left,C.style.top=Math.floor(l.y+l.height)+"px",A.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(C)),a.container.appendChild(x),
-a.container.appendChild(A));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&&w.setHandlesVisible(!1));u=!0}else for(g=[L,K,z,x,C,A],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);u||null==w||w.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=v&&E==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=E||!a.isSplitTarget(f,b,e))){for(;null!=f&&!a.isValidDropTarget(f,
-b,e)&&g.isVertex(g.getParent(f));)f=g.getParent(f);if(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||g.isEdge(f))f=null}return f});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[L,K,D,z,x,C,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=w&&w.reset();E=B=v=r=w=null};return q};
-Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
-c)),b.scrollCellToVisible(b.getSelectionCell()))}}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=b.getFreeInsertPoint(),c.drop(b,d,null,a.x,a.y),null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell())))};
-Sidebar.prototype.addClickHandler=function(a,c,d){var b=this.editorUi.editor.graph,f=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(a){e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))});c.mouseUp=mxUtils.bind(this,function(h){if(!mxEvent.isPopupTrigger(h)&&null==this.currentGraph&&null!=e){var g=b.tolerance;Math.abs(e.x-mxEvent.getClientX(h))<=g&&Math.abs(e.y-mxEvent.getClientY(h))<=g&&this.itemClicked(d,c,h,a)}f.apply(c,arguments);e=null;this.currentElt=a})};
-Sidebar.prototype.createVertexTemplateEntry=function(a,c,d,b,f,e,h,g){g=null!=g&&0<g.length?g:f.toLowerCase();return this.addEntry(g,mxUtils.bind(this,function(){return this.createVertexTemplate(a,c,d,b,f,e,h)}))};Sidebar.prototype.createVertexTemplate=function(a,c,d,b,f,e,h,g){a=[new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,c,d,f,e,h,g)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,c,d,b,f,e,h){a=mxUtils.parseXml(this.graph.decompress(a));var g=new mxCodec(a),k=new mxGraphModel;g.decode(a.documentElement,k);a=this.graph.cloneCells(k.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,d,b,f,e,h)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,d,b,f,e,h){return this.createItem(a,b,f,e,c,d,h)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,c,d,b,f,e,h,g){h=null!=h&&0<h.length?h:f.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,d,b,f,e,g)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,c,d,b,f,e,h){a=new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a);a.geometry.setTerminalPoint(new mxPoint(0,d),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,d,f,e,h)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,d,b,f,e){return this.createItem(a,b,f,!0,c,d,e)};
+a.view;if(null!=v&&E==D)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=t&&null!=E){var e=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[e],I,b),k=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),h=a.getCellGeometry(b[e]),y=a.model.getParent(t.cell),G=d.translate.x*
+d.scale,H=d.translate.y*d.scale;null!=k&&!k.relative&&a.model.isVertex(y)&&y!=d.currentRoot&&(H=d.getState(y),G=H.x,H=H.y);k=h.x;h=h.y;a.model.isEdge(b[e])&&(h=k=0);this.previewElement.style.left=(g.x-k)*d.scale+G+"px";this.previewElement.style.top=(g.y-h)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
+(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),F=0,G=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
+c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var h=a.view.getState(g),f=E=null;G!=h?(G=h,P=(new Date).getTime(),F=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=h&&(this.updateThread=window.setTimeout(function(){null==E&&(G=h,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+
+10))):F=(new Date).getTime()-P;if(2500>F&&null!=h&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||
+1500<F||a.model.isEdge(h.cell))&&F>this.dropTargetDelay&&(a.model.isVertex(h.cell)&&null!=m||a.model.isEdge(h.cell)&&a.model.isEdge(b[0]))){v=h;var l=a.model.isEdge(h.cell)?a.view.getPoint(h):new mxPoint(h.getCenterX(),h.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==B&&(a.container.appendChild(D),B=D.parentNode);k(c,d,l,D)}else null==
+v||!mxUtils.contains(v,c,d)||1500<F&&!mxEvent.isShiftDown(e)?(v=null,null!=B&&(D.parentNode.removeChild(D),B=null)):null!=v&&null!=B&&(l=a.model.isEdge(v.cell)?a.view.getPoint(v):new mxPoint(v.getCenterX(),v.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(c,d,l,D));if(u&&null!=t&&!mxEvent.isAltDown(e)&&null==E){f=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var y=t.absolutePoints;null!=
+L.parentNode&&(l=y[0],f.add(k(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)));null!=K.parentNode&&(y=y[y.length-1],f.add(k(c,d,new mxRectangle(y.x-this.roundDrop.width/2,y.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
+y=this.graph.selectionCellsHandler.getHandler(t.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),f.add(k(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),
+z)),f.add(k(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),f.add(k(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),C)),f.add(k(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;E==x?I=mxConstants.DIRECTION_EAST:
+E==C||E==K?I=mxConstants.DIRECTION_SOUTH:E==A&&(I=mxConstants.DIRECTION_WEST);null!=v&&E==D&&(h=v);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=t&&5E3<=F||t!=h&&(null==f||!mxUtils.contains(f,c,d)||500<F&&null==E&&l))if(u=!1,t=5E3>F&&F>this.dropTargetDelay||a.model.isEdge(g)?h:null,null!=t&&l){f=[L,K,z,x,C,A];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(y=h.absolutePoints,
+null!=y&&(l=y[0],y=y[y.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),L.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",K.style.left=Math.floor(y.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(y.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(L),null==a.model.getTerminal(g,!1)&&a.container.appendChild(K))):(l=mxRectangle.fromRectangle(h),null!=h.shape&&null!=h.shape.boundingBox&&
+(l=mxRectangle.fromRectangle(h.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),y=this.graph.selectionCellsHandler.getHandler(h.cell),null!=y&&(l.x-=y.horizontalOffset/2,l.y-=y.verticalOffset/2,l.width+=y.horizontalOffset,l.height+=y.verticalOffset,null!=y.rotationShape&&null!=y.rotationShape.node&&"hidden"!=y.rotationShape.node.style.visibility&&"none"!=y.rotationShape.node.style.display&&null!=y.rotationShape.boundingBox&&l.add(y.rotationShape.boundingBox)),
+z.style.left=Math.floor(h.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=Math.floor(h.getCenterY()-this.triangleRight.height/2)+"px",C.style.left=z.style.left,C.style.top=Math.floor(l.y+l.height)+"px",A.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=h.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(C)),a.container.appendChild(x),
+a.container.appendChild(A));null!=h&&(w=a.selectionCellsHandler.getHandler(h.cell),null!=w&&null!=w.setHandlesVisible&&w.setHandlesVisible(!1));u=!0}else for(f=[L,K,z,x,C,A],l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);u||null==w||w.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=v&&E==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=E||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,
+b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=null}return g});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[L,K,D,z,x,C,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=w&&w.reset();E=B=v=t=w=null};return q};
+Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
+mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=b.getFreeInsertPoint(),c.drop(b,d,null,a.x,a.y,!0),null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell())))};
+Sidebar.prototype.addClickHandler=function(a,c,d){var b=this.editorUi.editor.graph,f=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(a){e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))});c.mouseUp=mxUtils.bind(this,function(k){if(!mxEvent.isPopupTrigger(k)&&null==this.currentGraph&&null!=e){var g=b.tolerance;Math.abs(e.x-mxEvent.getClientX(k))<=g&&Math.abs(e.y-mxEvent.getClientY(k))<=g&&this.itemClicked(d,c,k,a)}f.apply(c,arguments);e=null;this.currentElt=a})};
+Sidebar.prototype.createVertexTemplateEntry=function(a,c,d,b,f,e,k,g){g=null!=g&&0<g.length?g:f.toLowerCase();return this.addEntry(g,mxUtils.bind(this,function(){return this.createVertexTemplate(a,c,d,b,f,e,k)}))};Sidebar.prototype.createVertexTemplate=function(a,c,d,b,f,e,k,g){a=[new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,c,d,f,e,k,g)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,c,d,b,f,e,k){a=mxUtils.parseXml(this.graph.decompress(a));var g=new mxCodec(a),h=new mxGraphModel;g.decode(a.documentElement,h);a=this.graph.cloneCells(h.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,d,b,f,e,k)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,d,b,f,e,k){return this.createItem(a,b,f,e,c,d,k)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,c,d,b,f,e,k,g){k=null!=k&&0<k.length?k:f.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,d,b,f,e,g)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,c,d,b,f,e,k){a=new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a);a.geometry.setTerminalPoint(new mxPoint(0,d),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,d,f,e,k)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,d,b,f,e){return this.createItem(a,b,f,!0,c,d,e)};
Sidebar.prototype.addPaletteFunctions=function(a,c,d,b){this.addPalette(a,c,d,mxUtils.bind(this,function(a){for(var c=0;c<b.length;c++)a.appendChild(b[c](a))}))};
Sidebar.prototype.addPalette=function(a,c,d,b){c=this.createTitle(c);this.container.appendChild(c);var f=document.createElement("div");f.className="geSidebar";mxClient.IS_POINTER&&(f.style.touchAction="none");d?(b(f),b=null):f.style.display="none";this.addFoldingHandler(c,f,b);d=document.createElement("div");d.appendChild(f);this.container.appendChild(d);null!=a&&(this.palettes[a]=[c,d]);return f};
Sidebar.prototype.addFoldingHandler=function(a,c,d){var b=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==c.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(f){if("none"==c.style.display){if(b)c.style.display="block";else if(b=!0,null!=d){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
"...";window.setTimeout(function(){var b=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;d(c);mxClient.NO_FO=b;c.style.display="block";a.style.cursor="";a.innerHTML=e},0)}else c.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",c.style.display="none";mxEvent.consume(f)}))};
Sidebar.prototype.removePalette=function(a){var c=this.palettes[a];if(null!=c){this.palettes[a]=null;for(a=0;a<c.length;a++)this.container.removeChild(c[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,c,d,b,f,e,h){for(var g=[],k=0;k<f.length;k++)mxUtils.bind(this,function(a,c,e){if(null==e){e=a.lastIndexOf("/");var f=a.lastIndexOf(".");e=a.substring(0<=e?e+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}g.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+d+a+b,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(e)))})(f[k],null!=e?e[k]:null,null!=h?h[f[k]]:null);this.addPaletteFunctions(a,c,
+Sidebar.prototype.addImagePalette=function(a,c,d,b,f,e,k){for(var g=[],h=0;h<f.length;h++)mxUtils.bind(this,function(a,c,e){if(null==e){e=a.lastIndexOf("/");var f=a.lastIndexOf(".");e=a.substring(0<=e?e+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}g.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+d+a+b,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(e)))})(f[h],null!=e?e[h]:null,null!=k?k[f[h]]:null);this.addPaletteFunctions(a,c,
!1,g)};Sidebar.prototype.getTagsForStencil=function(a,c,d){a=a.split(".");for(var b=1;b<a.length;b++)a[b]=a[b].replace(/_/g," ");a.push(c.replace(/_/g," "));null!=d&&a.push(d);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,c,d,b,f,e,h,g,k){h=null!=h?h:1;if(this.addStencilsToIndex){var l=[];if(null!=k)for(var m=0;m<k.length;m++)l.push(k[m]);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(a,c,d,e,k){if(null==f||0>mxUtils.indexOf(f,c)){d=this.getTagsForStencil(a,c);var m=null!=g?g[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(e*h),Math.round(k*h),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=e&&e.call(this,a);if(null!=k)for(var c=0;c<k.length;c++)k[c](a);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(c,d,e,g,k){(null==f||0>mxUtils.indexOf(f,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(g*h),Math.round(k*h),"",d.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,c,d,b,f,e,k,g,h){k=null!=k?k:1;if(this.addStencilsToIndex){var l=[];if(null!=h)for(var m=0;m<h.length;m++)l.push(h[m]);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(a,c,d,e,h){if(null==f||0>mxUtils.indexOf(f,c)){d=this.getTagsForStencil(a,c);var m=null!=g?g[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(e*k),Math.round(h*k),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=e&&e.call(this,a);if(null!=h)for(var c=0;c<h.length;c++)h[c](a);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(c,d,e,g,h){(null==f||0>mxUtils.indexOf(f,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(g*k),Math.round(h*k),"",d.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);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(c){}})();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.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
Graph=function(a,c,d,b,f){mxGraph.call(this,a,c,d,b);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var e=null,h=null,g=null,k=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var d=c.getState();null!=d&&this.model.isEdge(d.cell)&&(e=new mxPoint(c.getGraphX(),c.getGraphY()),l=this.isCellSelected(d.cell),g=d,h=c,null!=
-d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY())?k=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(k=d.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,b){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=e&&null!=g&&null!=h){if(c=g,Math.abs(e.x-b.getGraphX())>d||Math.abs(e.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var f=this.selectionCellsHandler.getHandler(c.cell);if(null!=f&&null!=f.bends&&0<f.bends.length){var m=f.getHandleForEvent(h),p=this.view.getEdgeStyle(c);d=p==mxEdgeStyle.EntityRelation;l||k!=mxEvent.LABEL_HANDLE||(m=k);if(d&&0!=m&&m!=f.bends.length-1&&m!=mxEvent.LABEL_HANDLE)!d||
-null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(m==mxEvent.LABEL_HANDLE||0==m||null!=c.visibleSourceState||m==f.bends.length-1||null!=c.visibleTargetState)d||m==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==p&&null==m||p==mxEdgeStyle.OrthConnector)&&(m=k,null==m&&(m=new mxRectangle(e.x,e.y),m.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(m,d[0].x,d[0].y)?m=0:mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y)?
-m=f.bends.length-1:null!=p&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?m=2:(m=mxUtils.findNearestSegment(c,e.x,e.y),m=null==p?mxEvent.VIRTUAL_HANDLE-m:m+1))),null==m&&(m=mxEvent.VIRTUAL_HANDLE)),f.start(b.getGraphX(),b.getGraphX(),m),k=e=h=g=null,l=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){f=null;d=c.absolutePoints;if(null!=d)if(m=new mxRectangle(b.getGraphX(),
-b.getGraphY()),m.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))f="move";else if(mxUtils.contains(m,d[0].x,d[0].y)||mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y))f="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)p=this.view.getEdgeStyle(c),f="crosshair",p!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(p=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
-p<d.length-1&&0<=p&&(f=0==Math.round(d[p].x-d[p+1].x)?"col-resize":"row-resize"));null!=f&&c.setCursor(f)}}),mouseUp:mxUtils.bind(this,function(a,b){k=e=h=g=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var e=null,k=null,g=null,h=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var d=c.getState();null!=d&&this.model.isEdge(d.cell)&&(e=new mxPoint(c.getGraphX(),c.getGraphY()),l=this.isCellSelected(d.cell),g=d,k=c,null!=
+d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY())?h=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(h=d.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,b){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=e&&null!=g&&null!=k){if(c=g,Math.abs(e.x-b.getGraphX())>d||Math.abs(e.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var f=this.selectionCellsHandler.getHandler(c.cell);if(null!=f&&null!=f.bends&&0<f.bends.length){var m=f.getHandleForEvent(k),n=this.view.getEdgeStyle(c);d=n==mxEdgeStyle.EntityRelation;l||h!=mxEvent.LABEL_HANDLE||(m=h);if(d&&0!=m&&m!=f.bends.length-1&&m!=mxEvent.LABEL_HANDLE)!d||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(m==mxEvent.LABEL_HANDLE||0==m||null!=c.visibleSourceState||m==f.bends.length-1||null!=c.visibleTargetState)d||m==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==n&&null==m||n==mxEdgeStyle.OrthConnector)&&(m=h,null==m&&(m=new mxRectangle(e.x,e.y),m.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(m,d[0].x,d[0].y)?m=0:mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y)?
+m=f.bends.length-1:null!=n&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?m=2:(m=mxUtils.findNearestSegment(c,e.x,e.y),m=null==n?mxEvent.VIRTUAL_HANDLE-m:m+1))),null==m&&(m=mxEvent.VIRTUAL_HANDLE)),f.start(b.getGraphX(),b.getGraphX(),m),h=e=k=g=null,l=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){f=null;d=c.absolutePoints;if(null!=d)if(m=new mxRectangle(b.getGraphX(),
+b.getGraphY()),m.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))f="move";else if(mxUtils.contains(m,d[0].x,d[0].y)||mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y))f="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)n=this.view.getEdgeStyle(c),f="crosshair",n!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(n=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
+n<d.length-1&&0<=n&&(f=0==Math.round(d[n].x-d[n+1].x)?"col-resize":"row-resize"));null!=f&&c.setCursor(f)}}),mouseUp:mxUtils.bind(this,function(a,b){h=e=k=g=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};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,b){return!1};this.alternateEdgeStyle="vertical";null==b&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)b.push(new mxRectangle(((g.x+k)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(k=0;k<g.height;k++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+k)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),h=0;h<g.width;h++)b.push(new mxRectangle(((g.x+h)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(h=0;h<g.height;h++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+h)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,b){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)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);
-"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
-this.getRubberband=function(){return p};var n=(new Date).getTime(),q=0,t=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),q=0):q=(new Date).getTime()-n};var r=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&r.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var u=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);
+this.getRubberband=function(){return n};var p=(new Date).getTime(),q=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),q=0):q=(new Date).getTime()-p};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&t.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var u=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
(u=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=u)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return z.apply(this,
arguments);b=b?a.sourceState.cell:a.getCell();if(null!=b){var c=this.getLinkForCell(b);null!=c&&(this.isPageLink(c)?this.pageLinkClicked(b,c):this.openLink(c))}};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var x=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
-this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,h=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var H=g.getChildAt(e,m),
-y=this.view.getState(H);if(null!=y&&this.isCellVisible(H)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var p=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(y=mxUtils.getBoundingBox(y,p));(g.isEdge(H)||g.isVertex(H))&&y.x>=a&&y.y+y.height<=h&&y.y>=b&&y.x+y.width<=k&&f.push(H);this.getAllCells(a,b,c,d,H,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:C.apply(this,
+this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var H=g.getChildAt(e,m),
+y=this.view.getState(H);if(null!=y&&this.isCellVisible(H)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var n=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(y=mxUtils.getBoundingBox(y,n));(g.isEdge(H)||g.isVertex(H))&&y.x>=a&&y.y+y.height<=k&&y.y>=b&&y.x+y.width<=h&&f.push(H);this.getAllCells(a,b,c,d,H,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:C.apply(this,
arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();A=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);A=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);A=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
function(a,b){return b&&a.view.graph.isCellSelected(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 D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
null);return a}}};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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,c,d){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="'+c+'px" version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
-Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,c=!0,e=null,h=mxUtils.bind(this,function(a){c=!0;e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),g=mxUtils.bind(this,function(a){c=c&&null!=e&&Math.abs(e.x-mxEvent.getClientX(a))<b&&Math.abs(e.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
-e&&e!=d.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(d.node,h,g,k);mxEvent.addListener(d.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,c=!0,e=null,k=mxUtils.bind(this,function(a){c=!0;e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),g=mxUtils.bind(this,function(a){c=c&&null!=e&&Math.abs(e.x-mxEvent.getClientX(a))<b&&Math.abs(e.y-mxEvent.getClientY(a))<b}),h=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
+e&&e!=d.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(d.node,k,g,h);mxEvent.addListener(d.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,c,d){c=c.getAttribute("href");if(null!=c&&!this.isPageLink(c)&&mxEvent.isLeftMouseButton(d)&&!mxEvent.isPopupTrigger(d)||mxEvent.isTouchEvent(d)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),a);mxEvent.consume(d)}};
Graph.prototype.openLink=function(a,c){var d=window;if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var b=a.split("#")[1];window.location.hash=="#"+b&&(window.location.hash="");window.location.hash=b}else d=window.open(a,c);return d};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,c){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",c))};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)};
@@ -2410,29 +2414,29 @@ Graph.prototype.isSplitTarget=function(a,c,d){return!this.model.isEdge(c[0])&&!m
Graph.prototype.isLabelMovable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(c,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,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 b=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),p=a[g+"FullYear"](),n=a[g+"Hours"](),q=a[g+"Minutes"](),t=a[g+"Seconds"](),g=a[g+"Milliseconds"](),r=d?0:a.getTimezoneOffset(),w={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:n%12||12,hh:h(n%12||12),H:n,HH:h(n),M:q,MM:h(q),s:t,ss:h(t),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<r?"-":"+")+h(100*Math.floor(Math.abs(r)/60)+Math.abs(r)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,k=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",h=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),t=d?0:a.getTimezoneOffset(),w={d:h,dd:k(h),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:k(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:k(p%12||12),H:p,HH:k(p),M:q,MM:k(q),s:r,ss:k(r),l:k(g,3),L:k(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<t?"-":"+")+k(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<h%10?0:(10!=h%100-h%10)*h%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)(function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var f=document.createElement("input");f.style.display="inline-block";f.setAttribute("type","checkbox");c.isVisible(b)&&(f.setAttribute("checked","checked"),f.defaultChecked=
!0);d.appendChild(f);var g=b.value||mxResources.get("background")||"Background";d.setAttribute("title",g);mxUtils.write(d,g);a.appendChild(d);mxEvent.addListener(f,"click",function(){null!=f.getAttribute("checked")?f.removeAttribute("checked"):f.setAttribute("checked","checked");c.setVisible(b,f.checked)})})(c.getChildAt(c.root,b));return a};
-Graph.prototype.replacePlaceholders=function(a,c){var d=[];if(null!=c){for(var b=0;match=this.placeholderPattern.exec(c);){var f=match[0];if(2<f.length&&"%label%"!=f&&"%tooltip%"!=f){var e=null;if(match.index>b&&"%"==c.charAt(match.index-1))e=f.substring(1);else{var h=f.substring(1,f.length-1);if(0>h.indexOf("{"))for(var g=a;null==e&&null!=g;)null!=g.value&&"object"==typeof g.value&&(e=g.hasAttribute(h)?null!=g.getAttribute(h)?g.getAttribute(h):"":null),g=this.model.getParent(g);null==e&&(e=this.getGlobalVariable(h))}d.push(c.substring(b,
+Graph.prototype.replacePlaceholders=function(a,c){var d=[];if(null!=c){for(var b=0;match=this.placeholderPattern.exec(c);){var f=match[0];if(2<f.length&&"%label%"!=f&&"%tooltip%"!=f){var e=null;if(match.index>b&&"%"==c.charAt(match.index-1))e=f.substring(1);else{var k=f.substring(1,f.length-1);if(0>k.indexOf("{"))for(var g=a;null==e&&null!=g;)null!=g.value&&"object"==typeof g.value&&(e=g.hasAttribute(k)?null!=g.getAttribute(k)?g.getAttribute(k):"":null),g=this.model.getParent(g);null==e&&(e=this.getGlobalVariable(k))}d.push(c.substring(b,
match.index)+(null!=e?e:f));b=match.index+f.length}}d.push(c.substring(b))}return d.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,c,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=d&&(mxEvent.isTouchEvent(c)?d.update(d.getState(this.view.getState(a[1]))):d.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,c,d,b,f,e){e=e?e:!1;var h=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(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(h.x+=a.geometry.width/2,h.y-=d):c==mxConstants.DIRECTION_SOUTH?(h.x+=a.geometry.width/2,h.y+=a.geometry.height+d):(h.x=c==mxConstants.DIRECTION_WEST?h.x-d:h.x+(a.geometry.width+d),h.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));
-var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(d.cell)&&(l=d.x,k=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(h.x+=a.parent.geometry.x,h.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!f?null:this.getCellAt(l+h.x*g,k+h.y*g);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a),g=this.view.getState(e),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(e=
-null));if(f=!mxEvent.isShiftDown(b)||f)c==mxConstants.DIRECTION_NORTH?h.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?h.y+=a.geometry.height/2:h.x=c==mxConstants.DIRECTION_WEST?h.x-a.geometry.width/2:h.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[];this.model.beginUpdate();try{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=
-m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var p=this.view.getState(l),n=null!=p?p.style:this.getCellStyle(l);if(mxUtils.getValue(n,"part",!1)){var q=this.model.getParent(l);this.model.isVertex(q)&&(l=q)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=h.x-m.width/2,m.y=h.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var t=mxEvent.isControlDown(b)&&f||null==e&&null!=m&&m.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=t&&this.connectionHandler.insertBeforeSource){var r=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=t.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==t.parent&&(r=b.parent.getIndex(b),this.model.add(b.parent,t,r))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(r=a.parent.getIndex(a),this.model.add(a.parent,
-g,r));null!=t&&d.push(t);null==e&&null!=g&&d.push(g);null==g&&null!=t&&t.geometry.setTerminalPoint(h,!1);null!=t&&this.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{this.model.endUpdate()}return d};
+Graph.prototype.connectVertex=function(a,c,d,b,f,e){e=e?e:!1;var k=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(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(k.x+=a.geometry.width/2,k.y-=d):c==mxConstants.DIRECTION_SOUTH?(k.x+=a.geometry.width/2,k.y+=a.geometry.height+d):(k.x=c==mxConstants.DIRECTION_WEST?k.x-d:k.x+(a.geometry.width+d),k.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));
+var g=this.view.scale,h=this.view.translate,l=h.x*g,h=h.y*g;this.model.isVertex(d.cell)&&(l=d.x,h=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(k.x+=a.parent.geometry.x,k.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!f?null:this.getCellAt(l+k.x*g,h+k.y*g);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a),g=this.view.getState(e),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(e=
+null));if(f=!mxEvent.isShiftDown(b)||f)c==mxConstants.DIRECTION_NORTH?k.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?k.y+=a.geometry.height/2:k.x=c==mxConstants.DIRECTION_WEST?k.x-a.geometry.width/2:k.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[];this.model.beginUpdate();try{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=
+m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var n=this.view.getState(l),p=null!=n?n.style:this.getCellStyle(l);if(mxUtils.getValue(p,"part",!1)){var q=this.model.getParent(l);this.model.isVertex(q)&&(l=q)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=k.x-m.width/2,m.y=k.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(b)&&f||null==e&&null!=m&&m.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var t=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=r.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==r.parent&&(t=b.parent.getIndex(b),this.model.add(b.parent,r,t))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(t=a.parent.getIndex(a),this.model.add(a.parent,
+g,t));null!=r&&d.push(r);null==e&&null!=g&&d.push(g);null==g&&null!=r&&r.geometry.setTerminalPoint(k,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return d};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],d,b;for(b in this.model.cells)if(d=this.model.cells[b],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=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&&c.push(d);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),d=a,b=null;null==b&&null!=d;)null!=d.value&&"object"==typeof d.value&&(b=d.hasAttribute(c)?null!=d.getAttribute(c)?d.getAttribute(c):"":null),d=this.model.getParent(d);return b||""}return a.value.getAttribute("label")}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.getCellStyle=function(a){var c=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&&(c[mxConstants.STYLE_HORIZONTAL]=!d.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(a,c,d){if(null!=a&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var b=this.layoutManager.getLayout(this.model.getParent(a));null!=b&&b.constructor==mxStackLayout&&(b.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,c,d,b,f){c=null!=c?c:!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 e=0;e<d.length;e++){var h=this.view.getState(d[e]),g=this.getCellGeometry(d[e]);if(null!=h&&null!=g){var k=Math.round(g.width-h.width/this.view.scale),l=Math.round(g.height-h.height/this.view.scale);if(0!=l||0!=k){var m=this.model.getParent(d[e]),p=this.layoutManager.getLayout(m);
-null==p?null!=f&&this.isMoveCellsEvent(f)&&this.moveSiblings(h,m,k,l):null!=f&&mxEvent.isAltDown(f)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,k,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
-Graph.prototype.moveSiblings=function(a,c,d,b){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<f.length;c++)if(f[c]!=a.cell){var e=this.view.getState(f[c]),h=this.getCellGeometry(f[c]);null!=e&&null!=h&&(h=h.clone(),h.translate(Math.round(d*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(f[c],h))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,c,d,b){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var f=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==f&&!c.resizeLast;){var e=this.getCellGeometry(a),h=this.view.getState(a);null!=h&&null!=e&&(e=e.clone(),c.horizontal?e.width+=d+Math.min(0,h.width/this.view.scale-e.width):e.height+=b+Math.min(0,h.height/this.view.scale-e.height),this.model.setGeometry(a,
+Graph.prototype.foldCells=function(a,c,d,b,f){c=null!=c?c:!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 e=0;e<d.length;e++){var k=this.view.getState(d[e]),g=this.getCellGeometry(d[e]);if(null!=k&&null!=g){var h=Math.round(g.width-k.width/this.view.scale),l=Math.round(g.height-k.height/this.view.scale);if(0!=l||0!=h){var m=this.model.getParent(d[e]),n=this.layoutManager.getLayout(m);
+null==n?null!=f&&this.isMoveCellsEvent(f)&&this.moveSiblings(k,m,h,l):null!=f&&mxEvent.isAltDown(f)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(m,n,h,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
+Graph.prototype.moveSiblings=function(a,c,d,b){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<f.length;c++)if(f[c]!=a.cell){var e=this.view.getState(f[c]),k=this.getCellGeometry(f[c]);null!=e&&null!=k&&(k=k.clone(),k.translate(Math.round(d*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(f[c],k))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,c,d,b){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var f=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==f&&!c.resizeLast;){var e=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=e&&(e=e.clone(),c.horizontal?e.width+=d+Math.min(0,k.width/this.view.scale-e.width):e.height+=b+Math.min(0,k.height/this.view.scale-e.height),this.model.setGeometry(a,
e));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.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,c,d){d=d||this.getDefaultParent();this.isCellLocked(d)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,c,d){d=d||this.getDefaultParent();return this.isCellLocked(d)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=c.collapsible||!this.isContainer(a)&&"1"==c.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
@@ -2475,23 +2479,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activa
this.reset())}else 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};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var k=b[g+1],h=b[g],v=[],u=b[g+2];g<
-b.length-2&&mxUtils.ptSegDistSq(h.x,h.y,u.x,u.y,k.x,k.y)<1*this.scale*this.scale;)k=u,g++,u=b[g+2];for(var c=e(0,h.x,h.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<C.length-1;x++){for(var A=C[x+1],D=C[x],u=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(D.x,D.y,u.x,u.y,A.x,A.y)<1*this.scale*this.scale;)A=u,x++,u=C[x+2];u=mxUtils.intersection(h.x,h.y,k.x,k.y,D.x,D.y,A.x,A.y);if(null!=u&&(Math.abs(u.x-
-D.x)>f||Math.abs(u.y-D.y)>f)&&(Math.abs(u.x-A.x)>f||Math.abs(u.y-A.y)>f)){A=u.x-h.x;D=u.y-h.y;u={distSq:A*A+D*D,x:u.x,y:u.y};for(A=0;A<v.length;A++)if(v[A].distSq>u.distSq){v.splice(A,0,u);u=null;break}null==u||0!=v.length&&v[v.length-1].x===u.x&&v[v.length-1].y===u.y||v.push(u)}}}for(x=0;x<v.length;x++)c=e(1,v[x].x,v[x].y)||c}u=b[b.length-1];c=e(0,u.x,u.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h=b[f+1],k=b[f],v=[],u=b[f+2];f<
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,u.x,u.y,h.x,h.y)<1*this.scale*this.scale;)h=u,f++,u=b[f+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<C.length-1;x++){for(var A=C[x+1],D=C[x],u=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(D.x,D.y,u.x,u.y,A.x,A.y)<1*this.scale*this.scale;)A=u,x++,u=C[x+2];u=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,A.x,A.y);if(null!=u&&(Math.abs(u.x-
+D.x)>g||Math.abs(u.y-D.y)>g)&&(Math.abs(u.x-A.x)>g||Math.abs(u.y-A.y)>g)){A=u.x-k.x;D=u.y-k.y;u={distSq:A*A+D*D,x:u.x,y:u.y};for(A=0;A<v.length;A++)if(v[A].distSq>u.distSq){v.splice(A,0,u);u=null;break}null==u||0!=v.length&&v[v.length-1].x===u.x&&v[v.length-1].y===u.y||v.push(u)}}}for(x=0;x<v.length;x++)c=e(1,v[x].x,v[x].y)||c}u=b[b.length-1];c=e(0,u.x,u.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){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)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var u=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var x=
this.state.routedPoints[z],C=new mxPoint(x.x/this.scale,x.y/this.scale);0==z?C=b[0]:z==this.state.routedPoints.length-1&&(C=b[b.length-1]);var A=!1;if(null!=l&&1==x.type){var D=this.state.routedPoints[z+1],x=D.x/this.scale-C.x,D=D.y/this.scale-C.y,x=x*x+D*D;null==u&&(u=new mxPoint(C.x-l.x,C.y-l.y),m=Math.sqrt(u.x*u.x+u.y*u.y),u.x=u.x*e/m,u.y=u.y*e/m);x>e*e&&0<m&&(x=l.x-C.x,D=l.y-C.y,x=x*x+D*D,x>e*e&&(A=new mxPoint(C.x-u.x,C.y-u.y),x=new mxPoint(C.x+u.x,C.y+u.y),h.push(A),this.addPoints(a,h,c,d,!1,
null,k),h=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(A.x-u.y*h,A.y+u.x*h),a.lineTo(x.x-u.y*h,x.y+u.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(A.x-u.y*h,A.y+u.x*h,x.x-u.y*h,x.y+u.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],A=!0))}else u=null;A||(h.push(C),l=C)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==
a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var f=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),f=mxUtils.getRotatedPoint(f,l,m,k);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);f=this.getPerimeterPoint(b,f,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),f=mxUtils.getRotatedPoint(f,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
-return new mxShape(new mxStencil(d.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+0);f=this.getPerimeterPoint(b,f,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),f=mxUtils.getRotatedPoint(f,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var k=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=k.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
+return new mxShape(new mxStencil(d.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){c=mxStencilRegistry.libraries[d];if(null!=c){if(null==mxStencilRegistry.packages[d]){for(var b=0;b<c.length;b++){var f=c[b];if(".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 e=
-mxUtils.load(f);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",f,h)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
+mxUtils.load(f);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",f,k)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
mxStencilRegistry.getBasenameForStencil=function(a){var c=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var c=a[1],d=2;d<a.length-1;d++)c+="/"+a[d];return c};
-mxStencilRegistry.loadStencilSet=function(a,c,d,b){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var e=!1;if(null==f)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,e=!0,mxStencilRegistry.parseStencilSet(b.documentElement,c,e))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;e=!0}catch(h){null!=window.console&&console.log("error in loadStencilSet:",a,h)}null!=f&&null!=
+mxStencilRegistry.loadStencilSet=function(a,c,d,b){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var e=!1;if(null==f)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,e=!0,mxStencilRegistry.parseStencilSet(b.documentElement,c,e))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;e=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=f&&null!=
f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,c,e)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,c,d){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,c,d),b=b.nextSibling;else{d=null!=d?d:!0;var b=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var f=f.toLowerCase(),e=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+e.toLowerCase(),new mxStencil(b));if(null!=c){var h=b.getAttribute("w"),
-g=b.getAttribute("h"),h=null==h?80:parseInt(h,10),g=null==g?80:parseInt(g,10);c(f,e,a,h,g)}}b=b.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(a,c,d){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,c,d),b=b.nextSibling;else{d=null!=d?d:!0;var b=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var f=f.toLowerCase(),e=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+e.toLowerCase(),new mxStencil(b));if(null!=c){var k=b.getAttribute("w"),
+g=b.getAttribute("h"),k=null==k?80:parseInt(k,10),g=null==g?80:parseInt(g,10);c(f,e,a,k,g)}}b=b.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}mxConstants.HANDLE_FILLCOLOR="#99ccff";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=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var c=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
c.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));
@@ -2505,8 +2509,8 @@ a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stenci
Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget",
"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,
arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,g,!0);b.setTerminal(e,f,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);
-h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),G=this.view.getState(f),p=this.view.getState(g);if(null!=m){var n=null!=G?this.getConnectionConstraint(m,G,!0):null,q=null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,!1,n)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var t=h.width;h.width=h.height;
-h.height=t;b.setGeometry(e,h);var r=this.view.getState(e);if(null!=r){var x=r.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);
+h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),G=this.view.getState(f),n=this.view.getState(g);if(null!=m){var p=null!=G?this.getConnectionConstraint(m,G,!0):null,q=null!=n?this.getConnectionConstraint(m,n,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var r=h.width;h.width=h.height;
+h.height=r;b.setGeometry(e,h);var t=this.view.getState(e);if(null!=t){var x=t.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);
if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=
0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f=this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),
e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||
@@ -2516,7 +2520,7 @@ arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0
for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?
this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,
a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,
-b.x/a.scale-a.translate.x+(0==b.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+(0==b.height?1:2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
+b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-
e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};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.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
@@ -2532,9 +2536,9 @@ m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Mat
this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});
return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,h){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;d=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==d)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument(),m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=m.style?m.style.backgroundColor=a:m.setAttribute("style","background-color:"+
a));null==l.createElementNS?(m.setAttribute("xmlns",mxConstants.NS_SVG),m.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):m.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;m.setAttribute("width",Math.max(1,Math.ceil(d.width*a)+2*c)+"px");m.setAttribute("height",Math.max(1,Math.ceil(d.height*a)+2*c)+"px");m.setAttribute("version","1.1");var y=m;e&&(y=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),y.setAttribute("transform",
-"translate(0.5,0.5)"),m.appendChild(y));l.appendChild(m);l=this.createSvgCanvas(y);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-d.x)/k),Math.floor((c/b-d.y)/k));var p=document.createElement("textarea"),n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,y,G){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",
-Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration",
-"underline");try{return p.innerHTML=f,t.textContent=p.value,t}catch(Ea){return n.apply(this,arguments)}}else return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(d,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var G=h.drawCellState;h.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&G.apply(this,arguments)};
+"translate(0.5,0.5)"),m.appendChild(y));l.appendChild(m);l=this.createSvgCanvas(y);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-d.x)/k),Math.floor((c/b-d.y)/k));var n=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,y,G){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",
+Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration",
+"underline");try{return n.innerHTML=f,r.textContent=n.value,r}catch(Ea){return p.apply(this,arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(d,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var G=h.drawCellState;h.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&G.apply(this,arguments)};
h.drawState(this.getView().getState(this.model.root),l);return m};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;
a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),
e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=
@@ -2544,7 +2548,7 @@ var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arg
this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&
(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}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=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var h=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){h.apply(this,
+"1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,
arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||
mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=
a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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"),
@@ -2554,17 +2558,17 @@ mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxCo
this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"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.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=c;this.resize()};var k=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
+this.switchSelectionState=c;this.resize()};var h=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,
-"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};
+"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",h.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(G){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=
-function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/
+function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/
d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!mxEvent.isControlDown(b.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,b){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(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};
-var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
+var p=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=p.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(b=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/b)+" x "+this.roundLength(this.bounds.height/b)),b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==b&&(b=this.bounds),this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=b.y+b.height+12+"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="")};mxEdgeHandler.prototype.updateHint=function(b,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,f=this.roundLength(c.x/e-d.x),d=this.roundLength(c.y/e-d.y);this.hint.innerHTML=f+", "+d;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(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),c.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
@@ -2584,8 +2588,8 @@ this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)
this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),
this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-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)),b.consume()}};var t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,
-arguments)};var r=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(r=(new Date).getTime(),w=0):w=(new Date).getTime()-r;this.currentTerminalState=c};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<w||(null==this.currentTerminalState||
+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)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,
+arguments)};var t=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),w=0):w=(new Date).getTime()-t;this.currentTerminalState=c};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<w||(null==this.currentTerminalState||
"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&u.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),
e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?
HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,
@@ -2604,8 +2608,8 @@ this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.grap
if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,
b.y+b.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(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(){N.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;
-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.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+6+this.state.view.graph.tolerance)+"px"}};var O=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var F=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.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+6+this.state.view.graph.tolerance)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
+function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var F=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#d7d7d7";
Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));
this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c};
@@ -2621,34 +2625,35 @@ Format.prototype.isAutoSizeState=function(a){return"1"==mxUtils.getValue(a.style
Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,c=a.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.color="rgb(112, 112, 112)";d.style.textAlign="left";d.style.cursor="default";var b=document.createElement("div");b.style.border="1px solid #c0c0c0";b.style.borderWidth="0px 0px 1px 0px";b.style.textAlign="center";b.style.fontWeight="bold";b.style.overflow="hidden";b.style.display=mxClient.IS_QUIRKS?"inline":
"inline-block";b.style.paddingTop="8px";b.style.height=mxClient.IS_QUIRKS?"34px":"25px";b.style.width="100%";this.container.appendChild(d);if(c.isSelectionEmpty())mxUtils.write(b,mxResources.get("diagram")),this.showCloseButton&&(c=document.createElement("img"),c.setAttribute("border","0"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("hide")),c.style.position="absolute",c.style.display="block",c.style.right="0px",c.style.top="8px",c.style.cursor="pointer",
-c.style.marginTop="1px",c.style.marginRight="17px",c.style.border="1px solid transparent",c.style.padding="1px",c.style.opacity=.5,b.appendChild(c),mxEvent.addListener(c,"click",function(){a.actions.get("formatPanel").funct()})),d.appendChild(b),this.panels.push(new DiagramFormatPanel(this,a,d));else if(c.isEditing())mxUtils.write(b,mxResources.get("text")),d.appendChild(b),this.panels.push(new TextFormatPanel(this,a,d));else{var f=this.getSelectionState().containsLabel,e=null,h=null,c=mxUtils.bind(this,
-function(a,b,c){var d=mxUtils.bind(this,function(d){e!=a&&(f?this.labelIndex=c:this.currentIndex=c,null!=e&&(e.style.backgroundColor=this.inactiveTabBackgroundColor,e.style.borderBottomWidth="1px"),e=a,e.style.backgroundColor="",e.style.borderBottomWidth="0px",h!=b&&(null!=h&&(h.style.display="none"),h=b,h.style.display=""))});mxEvent.addListener(a,"click",d);c==(f?this.labelIndex:this.currentIndex)&&d()}),g=0;b.style.backgroundColor=this.inactiveTabBackgroundColor;b.style.borderLeftWidth="1px";b.style.width=
-f?"50%":"33.3%";b.style.width=f?"50%":"33.3%";var k=b.cloneNode(!1),l=k.cloneNode(!1);k.style.backgroundColor=this.inactiveTabBackgroundColor;l.style.backgroundColor=this.inactiveTabBackgroundColor;if(f)k.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,g++)}mxUtils.write(k,mxResources.get("text"));
-d.appendChild(k);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
+c.style.marginTop="1px",c.style.marginRight="17px",c.style.border="1px solid transparent",c.style.padding="1px",c.style.opacity=.5,b.appendChild(c),mxEvent.addListener(c,"click",function(){a.actions.get("formatPanel").funct()})),d.appendChild(b),this.panels.push(new DiagramFormatPanel(this,a,d));else if(c.isEditing())mxUtils.write(b,mxResources.get("text")),d.appendChild(b),this.panels.push(new TextFormatPanel(this,a,d));else{var f=this.getSelectionState().containsLabel,e=null,k=null,c=mxUtils.bind(this,
+function(a,b,c){var d=mxUtils.bind(this,function(d){e!=a&&(f?this.labelIndex=c:this.currentIndex=c,null!=e&&(e.style.backgroundColor=this.inactiveTabBackgroundColor,e.style.borderBottomWidth="1px"),e=a,e.style.backgroundColor="",e.style.borderBottomWidth="0px",k!=b&&(null!=k&&(k.style.display="none"),k=b,k.style.display=""))});mxEvent.addListener(a,"click",d);c==(f?this.labelIndex:this.currentIndex)&&d()}),g=0;b.style.backgroundColor=this.inactiveTabBackgroundColor;b.style.borderLeftWidth="1px";b.style.width=
+f?"50%":"33.3%";b.style.width=f?"50%":"33.3%";var h=b.cloneNode(!1),l=h.cloneNode(!1);h.style.backgroundColor=this.inactiveTabBackgroundColor;l.style.backgroundColor=this.inactiveTabBackgroundColor;if(f)h.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,g++)}mxUtils.write(h,mxResources.get("text"));
+d.appendChild(h);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(h,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var f=a.view.getState(c[b]);if(null!=f&&(f=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null),null!=f))if(null==d)d=f;else if(d!=f)return null}return d};
-BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,h,g){e=null!=e?e:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,p=!1,n=mxUtils.bind(this,function(n){var q=g?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(f,Math.max(b,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&h)p||(p=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(q),a.value=q+e,
-p=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{l.setCellStyles(c,q,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=q+"px";a.removeAttribute("size")}),k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}a.value=q+e;mxEvent.consume(n)});h&&l.cellEditor.isContentEditing()&&
-(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",n);mxEvent.addListener(a,"blur",n);return n};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.style.padding="12px 0px 12px 18px";a.style.borderBottom="1px solid #c0c0c0";return a};
+BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,k,g){e=null!=e?e:"";g=null!=g?g:!1;var h=this.editorUi,l=h.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var r=g?parseFloat(a.value):parseInt(a.value);isNaN(r)||c!=mxConstants.STYLE_ROTATION||(r=mxUtils.mod(Math.round(100*r),36E3)/100);r=Math.min(f,Math.max(b,isNaN(r)?d:r));if(l.cellEditor.isContentEditing()&&k)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),k(r),a.value=r+e,
+n=!1);else if(r!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{l.setCellStyles(c,r,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=r+"px";a.removeAttribute("size")}),h.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[r],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}a.value=r+e;mxEvent.consume(p)});k&&l.cellEditor.isContentEditing()&&
+(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.style.padding="12px 0px 12px 18px";a.style.borderBottom="1px solid #c0c0c0";return a};
BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
-BaseFormatPanel.prototype.createStepper=function(a,c,d,b,f,e){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className=
-"geBtnUp";h.appendChild(g);var k=g.cloneNode(!1);k.style.border="none";k.style.height=b+"px";k.className="geBtnDown";h.appendChild(k);mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"2");var f=parseInt(a.value);isNaN(f)||(a.value=f-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(g,"click",function(b){""==a.value&&(a.value=e||"0");var f=parseInt(a.value);isNaN(f)||(a.value=f+d,null!=c&&c(b));mxEvent.consume(b)});if(f){var l=null;mxEvent.addGestureListeners(h,function(a){if(mxClient.IS_QUIRKS||
-8==document.documentMode)l=document.selection.createRange();mxEvent.consume(a)},null,function(a){if(null!=l){try{l.select()}catch(p){}l=null;mxEvent.consume(a)}})}return h};
-BaseFormatPanel.prototype.createOption=function(a,c,d,b){var f=document.createElement("div");f.style.padding="6px 0px 1px 0px";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.width="200px";f.style.height=mxClient.IS_QUIRKS?"27px":"18px";var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.margin="0px 6px 0px 0px";f.appendChild(e);var h=document.createElement("span");mxUtils.write(h,a);f.appendChild(h);var g=!1,k=c(),l=function(a){g||(g=!0,a?(e.setAttribute("checked",
-"checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),k!=a&&(k=a,c()!=k&&d(k)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)e.checked=!e.checked;l(e.checked)}});l(k);null!=b&&(b.install(l),this.listeners.push(b));return f};
-BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,f,e,h,g){b=null!=b?"null"==b?null:b:"1";f=null!=f?"null"==f?null:f:"0";var k=this.editorUi,l=k.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=f:null},function(a){g&&l.stopEditing();if(null!=h)h.funct();else{l.getModel().beginUpdate();try{a=a?b:f,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),k.fireEvent(new mxEventObject("styleChanged",
+BaseFormatPanel.prototype.createStepper=function(a,c,d,b,f,e){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var k=document.createElement("div");mxUtils.setPrefixedStyle(k.style,"borderRadius","3px");k.style.border="1px solid rgb(192, 192, 192)";k.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className=
+"geBtnUp";k.appendChild(g);var h=g.cloneNode(!1);h.style.border="none";h.style.height=b+"px";h.className="geBtnDown";k.appendChild(h);mxEvent.addListener(h,"click",function(b){""==a.value&&(a.value=e||"2");var f=parseInt(a.value);isNaN(f)||(a.value=f-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(g,"click",function(b){""==a.value&&(a.value=e||"0");var f=parseInt(a.value);isNaN(f)||(a.value=f+d,null!=c&&c(b));mxEvent.consume(b)});if(f){var l=null;mxEvent.addGestureListeners(k,function(a){if(mxClient.IS_QUIRKS||
+8==document.documentMode)l=document.selection.createRange();mxEvent.consume(a)},null,function(a){if(null!=l){try{l.select()}catch(n){}l=null;mxEvent.consume(a)}})}return k};
+BaseFormatPanel.prototype.createOption=function(a,c,d,b){var f=document.createElement("div");f.style.padding="6px 0px 1px 0px";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.width="200px";f.style.height=mxClient.IS_QUIRKS?"27px":"18px";var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.margin="0px 6px 0px 0px";f.appendChild(e);var k=document.createElement("span");mxUtils.write(k,a);f.appendChild(k);var g=!1,h=c(),l=function(a){g||(g=!0,a?(e.setAttribute("checked",
+"checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),h!=a&&(h=a,c()!=h&&d(h)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==k)e.checked=!e.checked;l(e.checked)}});l(h);null!=b&&(b.install(l),this.listeners.push(b));return f};
+BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,f,e,k,g){b=null!=b?"null"==b?null:b:"1";f=null!=f?"null"==f?null:f:"0";var h=this.editorUi,l=h.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=f:null},function(a){g&&l.stopEditing();if(null!=k)k.funct();else{l.getModel().beginUpdate();try{a=a?b:f,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),h.fireEvent(new mxEventObject("styleChanged",
"keys",[c],"values",[a],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}},{install:function(a){this.listener=function(){var b=l.view.getState(l.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,d)!=f)};l.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){l.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||g.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=!1,p=c(),n=null,q=function(a,f,g){if(!m){m=
-!0;n.innerHTML='<div style="width:'+(mxClient.IS_QUIRKS?"30":"36")+"px;height:12px;margin:3px;border:1px solid black;background-color:"+(null!=a&&a!=mxConstants.NONE?a:b)+';"></div>';if(mxClient.IS_QUIRKS||8==document.documentMode)n.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1);n.style.display=k.checked||h?"":"none";null!=e&&e(a);f||(p=a,(g||h||c()!=p)&&
-d(p));m=!1}},n=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(p,function(a){q(a,null,!0)});mxEvent.consume(a)}));n.style.position="absolute";n.style.marginTop="-4px";n.style.right=mxClient.IS_QUIRKS?"0px":"20px";n.style.height="22px";n.className="geColorBtn";n.style.display=k.checked||h?"":"none";g.appendChild(n);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked=!k.checked),k.checked||null==p||p==mxConstants.NONE||
-b==mxConstants.NONE||(b=p),q(k.checked?b:mxConstants.NONE)});q(p,!0);null!=f&&(f.install(q),this.listeners.push(f));return g};
-BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,f){var e=this.editorUi,h=e.editor.graph;return this.createColorOption(a,function(){var a=h.view.getState(h.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){h.getModel().beginUpdate();try{null!=f&&f(a),h.setCellStyles(c,a,h.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}},d||mxConstants.NONE,
-{install:function(a){this.listener=function(){var b=h.view.getState(h.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},b)};
+BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,k){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.style.margin="0px 6px 0px 0px";k||g.appendChild(h);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=!1,n=c(),p=null,q=function(a,f,g){if(!m){m=
+!0;p.innerHTML='<div style="width:'+(mxClient.IS_QUIRKS?"30":"36")+"px;height:12px;margin:3px;border:1px solid black;background-color:"+(null!=a&&a!=mxConstants.NONE?a:b)+';"></div>';if(mxClient.IS_QUIRKS||8==document.documentMode)p.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1);p.style.display=h.checked||k?"":"none";null!=e&&e(a);f||(n=a,(g||k||c()!=n)&&
+d(n));m=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(n,function(a){q(a,null,!0)});mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=h.checked||k?"":"none";g.appendChild(p);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==h||"INPUT"!=a.nodeName)a!=h&&(h.checked=!h.checked),h.checked||null==n||n==mxConstants.NONE||
+b==mxConstants.NONE||(b=n),q(h.checked?b:mxConstants.NONE)});q(n,!0);null!=f&&(f.install(q),this.listeners.push(f));return g};
+BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,f){var e=this.editorUi,k=e.editor.graph;return this.createColorOption(a,function(){var a=k.view.getState(k.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){k.getModel().beginUpdate();try{null!=f&&f(a),k.setCellStyles(c,a,k.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}},d||mxConstants.NONE,
+{install:function(a){this.listener=function(){var b=k.view.getState(k.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};k.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){k.getModel().removeListener(this.listener)}},b)};
BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.padding="6px";d.style.paddingRight="4px";var b=10-c;2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px";d.style.height=c+"px";d.style.borderLeft="1px solid #a0a0a0";d.innerHTML='<img border="0" src="'+(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUeNpidHB2ZyAGsACxDRBPIKCuA6TwCBB/h2rABu4A8SYmKCcXiP/iUFgAxL9gCi8A8SwsirZCMQMTkmANEH9E4v+CmsaArvAdyNFI/FlQ92EoBIE+qCRIUz168DBgsU4OqhinQpgHMABAgAEALY4XLIsJ20oAAAAASUVORK5CYII=":
IMAGE_PATH+"/dropdown.png")+'" style="margin-bottom:4px;">';mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,
-"borderRadius","3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,f,e,h,g){h=null!=h?h:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,f,e,null,g);b.style.marginTop=h-2+"px";b.style.right=d+"px";a.appendChild(b);return c};
-BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,f){function e(a){if(null!=b)b(k);else{var d=parseInt(k.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),e=h.view.getState(h.getSelectionCell());null!=e&&d!=mxUtils.getValue(e.style,c,100)&&(100==d&&(d=null),h.setCellStyles(c,d,h.getSelectionCells()));k.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)}d=null!=d?d:44;var h=this.editorUi.editor.graph,g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";mxUtils.write(g,
-a);g.style.fontWeight="bold";var k=this.addUnitInput(g,"%",20,d,e,10,-15,null!=b);if(null!=c){var l=mxUtils.bind(this,function(a,b,d){if(d||k!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),k.value=isNaN(a)?"":a+" %"});mxEvent.addListener(k,"keydown",function(a){13==a.keyCode?(h.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(l(null,null,!0),h.container.focus(),mxEvent.consume(a))});h.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){h.getModel().removeListener(l)}});
-l()}mxEvent.addListener(k,"blur",e);mxEvent.addListener(k,"change",e);null!=f&&f(k);return g};BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var f=document.createElement("div");mxUtils.write(f,c);f.style.position="absolute";f.style.right=d+"px";f.style.width=b+"px";f.style.marginTop="6px";f.style.textAlign="center";a.appendChild(f)};
+"borderRadius","3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,f,e,k,g){k=null!=k?k:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,f,e,null,g);b.style.marginTop=k-2+"px";b.style.right=d+"px";a.appendChild(b);return c};
+BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,f){d=null!=d?d:44;var e=this.editorUi.editor.graph,k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";mxUtils.write(k,a);k.style.fontWeight="bold";a=mxUtils.bind(this,function(a){if(null!=b)b(g);else{var d=parseInt(g.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),f=e.view.getState(e.getSelectionCell());null!=f&&d!=mxUtils.getValue(f.style,c,100)&&(100==d&&(d=null),e.setCellStyles(c,d,e.getSelectionCells()),
+this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[d],"cells",e.getSelectionCells())));g.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)});var g=this.addUnitInput(k,"%",20,d,a,10,-15,null!=b);if(null!=c){var h=mxUtils.bind(this,function(a,b,d){if(d||g!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),g.value=isNaN(a)?"":a+" %"});mxEvent.addListener(g,"keydown",function(a){13==a.keyCode?(e.container.focus(),mxEvent.consume(a)):
+27==a.keyCode&&(h(null,null,!0),e.container.focus(),mxEvent.consume(a))});e.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){e.getModel().removeListener(h)}});h()}mxEvent.addListener(g,"blur",a);mxEvent.addListener(g,"change",a);null!=f&&f(g);return k};
+BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var f=document.createElement("div");mxUtils.write(f,c);f.style.position="absolute";f.style.right=d+"px";f.style.width=b+"px";f.style.marginTop="6px";f.style.textAlign="center";a.appendChild(f)};
BaseFormatPanel.prototype.addKeyHandler=function(a,c){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(a){13==a.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(null!=c&&c(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(a))}))};
BaseFormatPanel.prototype.styleButtons=function(a){for(var c=0;c<a.length;c++)mxUtils.setPrefixedStyle(a[c].style,"borderRadius","3px"),mxUtils.setOpacity(a[c],100),a[c].style.border="1px solid #a0a0a0",a[c].style.padding="4px",a[c].style.paddingTop="3px",a[c].style.paddingRight="1px",a[c].style.margin="1px",a[c].style.width="24px",a[c].style.height="20px",a[c].className+=" geColorBtn"};
BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
@@ -2662,78 +2667,78 @@ function(a){c.actions.get("removeFromGroup").funct()}),e.setAttribute("title",mx
e.style.marginBottom="2px",a.appendChild(e),f++);1==d.getSelectionCount()&&(0<f&&mxUtils.br(a),e=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()})),e.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")"),e.style.width="100px",e.style.marginBottom="2px",a.appendChild(e),f++,e=mxUtils.button(mxResources.get("editLink"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editLink").funct()})),
e.setAttribute("title",mxResources.get("editLink")),e.style.width="100px",e.style.marginLeft="2px",e.style.marginBottom="2px",a.appendChild(e),f++);0==f&&(a.style.display="none");return a};
ArrangePanel.prototype.addAlign=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.paddingLeft="0px";d.style.borderWidth="0px";d.className="geToolbarContainer";mxClient.IS_QUIRKS&&(a.style.height="60px");var b=this.editorUi.toolbar.addButton("geSprite-alignleft",mxResources.get("left"),function(){c.alignCells(mxConstants.ALIGN_LEFT)},
-d),f=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){c.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){c.alignCells(mxConstants.ALIGN_RIGHT)},d),h=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){c.alignCells(mxConstants.ALIGN_TOP)},d),g=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){c.alignCells(mxConstants.ALIGN_MIDDLE)},
-d),k=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){c.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,f,e,h,g,k]);e.style.marginRight="6px";a.appendChild(d);return a};
+d),f=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){c.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){c.alignCells(mxConstants.ALIGN_RIGHT)},d),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){c.alignCells(mxConstants.ALIGN_TOP)},d),g=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){c.alignCells(mxConstants.ALIGN_MIDDLE)},
+d),h=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){c.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,f,e,k,g,h]);e.style.marginRight="6px";a.appendChild(d);return a};
ArrangePanel.prototype.addFlip=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="100px";d.style.marginRight=
"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="100px";a.appendChild(d);return a};
ArrangePanel.prototype.addDistribute=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var d=mxUtils.button(mxResources.get("horizontal"),function(a){c.distributeCells(!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){c.distributeCells(!1)});d.setAttribute("title",
mxResources.get("vertical"));d.style.width="100px";a.appendChild(d);return a};
-ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingBottom="8px";var f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";var e=null,h=null,g=null;0==b.edges.length?(mxUtils.write(f,mxResources.get("angle")),a.appendChild(f),e=this.addUnitInput(a,"°",20,44,function(){h.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop="10px"):a.style.paddingTop=
-"8px";b.containsLabel||(f=mxResources.get("reverse"),0<b.vertices.length&&0<b.edges.length?f=mxResources.get("turn")+" / "+f:0<b.vertices.length&&(f=mxResources.get("turn")),g=mxUtils.button(f,function(a){c.actions.get("turn").funct()}),g.setAttribute("title",f+" ("+this.editorUi.actions.get("turn").shortcut+")"),g.style.width="202px",a.appendChild(g),null!=e&&(g.style.marginTop="8px"));if(null!=e){var k=mxUtils.bind(this,function(a,c,d){if(d||document.activeElement!=e)b=this.format.getSelectionState(),
-a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(a)?"":a+"°"}),h=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,k);d.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){d.getModel().removeListener(k)}});k()}return a};
-ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),f=this.createPanel();f.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));f.appendChild(e);var h,g,k,l,m=this.addUnitInput(f,"pt",84,44,function(){h.apply(this,arguments)}),p=this.addUnitInput(f,"pt",20,44,function(){g.apply(this,arguments)}),
-n=document.createElement("div");n.className="geSprite geSprite-fit";n.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");n.style.position="relative";n.style.cursor="pointer";n.style.marginTop="-3px";n.style.border="0px";n.style.left="52px";mxUtils.setOpacity(n,50);mxEvent.addListener(n,"mouseenter",function(){mxUtils.setOpacity(n,100)});mxEvent.addListener(n,"mouseleave",function(){mxUtils.setOpacity(n,50)});mxEvent.addListener(n,"click",function(){c.actions.get("autosize").funct()});
-f.appendChild(n);this.addLabel(f,mxResources.get("width"),84);this.addLabel(f,mxResources.get("height"),20);mxUtils.br(f);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";e.appendChild(q);f.appendChild(e);var t=q.getElementsByTagName("input")[0];this.addKeyHandler(m,u);this.addKeyHandler(p,
-u);h=this.addGeometryHandler(m,function(a,b){0<a.width&&(b=Math.max(1,b),t.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});g=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,b),t.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(f);var r=this.createPanel();r.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,
-mxResources.get("position"));r.appendChild(e);var w=this.addUnitInput(r,"pt",84,44,function(){k.apply(this,arguments)}),v=this.addUnitInput(r,"pt",20,44,function(){l.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var u=mxUtils.bind(this,function(a,c,e){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)f.style.display="none";else{f.style.display=
-"";if(e||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(e||document.activeElement!=p)p.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==d.getSelectionCount()&&null!=b.x&&null!=b.y){r.style.display="";if(e||document.activeElement!=w)w.value=b.x+(""==b.x?"":" pt");if(e||document.activeElement!=v)v.value=b.y+(""==b.y?"":" pt")}else r.style.display="none"});this.addKeyHandler(w,u);this.addKeyHandler(v,u);d.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){d.getModel().removeListener(u)}});
-u();k=this.addGeometryHandler(w,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.y=b:a.y=b});a.appendChild(r)};
-ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isVertex(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}else isNaN(e)&&(a.value=f+" pt")}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
+ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingBottom="8px";var f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";var e=null,k=null,g=null;0==b.edges.length?(mxUtils.write(f,mxResources.get("angle")),a.appendChild(f),e=this.addUnitInput(a,"°",20,44,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop="10px"):a.style.paddingTop=
+"8px";b.containsLabel||(f=mxResources.get("reverse"),0<b.vertices.length&&0<b.edges.length?f=mxResources.get("turn")+" / "+f:0<b.vertices.length&&(f=mxResources.get("turn")),g=mxUtils.button(f,function(a){c.actions.get("turn").funct()}),g.setAttribute("title",f+" ("+this.editorUi.actions.get("turn").shortcut+")"),g.style.width="202px",a.appendChild(g),null!=e&&(g.style.marginTop="8px"));if(null!=e){var h=mxUtils.bind(this,function(a,c,d){if(d||document.activeElement!=e)b=this.format.getSelectionState(),
+a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(a)?"":a+"°"}),k=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,h);d.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){d.getModel().removeListener(h)}});h()}return a};
+ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),f=this.createPanel();f.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));f.appendChild(e);var k,g,h,l,m=this.addUnitInput(f,"pt",84,44,function(){k.apply(this,arguments)}),n=this.addUnitInput(f,"pt",20,44,function(){g.apply(this,arguments)}),
+p=document.createElement("div");p.className="geSprite geSprite-fit";p.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");p.style.position="relative";p.style.cursor="pointer";p.style.marginTop="-3px";p.style.border="0px";p.style.left="52px";mxUtils.setOpacity(p,50);mxEvent.addListener(p,"mouseenter",function(){mxUtils.setOpacity(p,100)});mxEvent.addListener(p,"mouseleave",function(){mxUtils.setOpacity(p,50)});mxEvent.addListener(p,"click",function(){c.actions.get("autosize").funct()});
+f.appendChild(p);this.addLabel(f,mxResources.get("width"),84);this.addLabel(f,mxResources.get("height"),20);mxUtils.br(f);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";e.appendChild(q);f.appendChild(e);var r=q.getElementsByTagName("input")[0];this.addKeyHandler(m,u);this.addKeyHandler(n,
+u);k=this.addGeometryHandler(m,function(a,b){0<a.width&&(b=Math.max(1,b),r.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});g=this.addGeometryHandler(n,function(a,b){0<a.height&&(b=Math.max(1,b),r.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(f);var t=this.createPanel();t.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,
+mxResources.get("position"));t.appendChild(e);var w=this.addUnitInput(t,"pt",84,44,function(){h.apply(this,arguments)}),v=this.addUnitInput(t,"pt",20,44,function(){l.apply(this,arguments)});mxUtils.br(t);this.addLabel(t,mxResources.get("left"),84);this.addLabel(t,mxResources.get("top"),20);var u=mxUtils.bind(this,function(a,c,e){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)f.style.display="none";else{f.style.display=
+"";if(e||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(e||document.activeElement!=n)n.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==d.getSelectionCount()&&null!=b.x&&null!=b.y){t.style.display="";if(e||document.activeElement!=w)w.value=b.x+(""==b.x?"":" pt");if(e||document.activeElement!=v)v.value=b.y+(""==b.y?"":" pt")}else t.style.display="none"});this.addKeyHandler(w,u);this.addKeyHandler(v,u);d.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){d.getModel().removeListener(u)}});
+u();h=this.addGeometryHandler(w,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.y=b:a.y=b});a.appendChild(t)};
+ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),h=0;h<g.length;h++)if(b.getModel().isVertex(g[h])){var l=b.getCellGeometry(g[h]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[h],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}else isNaN(e)&&(a.value=f+" pt")}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isEdge(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),h=0;h<g.length;h++)if(b.getModel().isEdge(g[h])){var l=b.getCellGeometry(g[h]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[h],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
-ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(p.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));p.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel(),
-h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));e.appendChild(h);var g,k,l,m,p=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(p,u);mxEvent.addListener(p,"blur",c);mxEvent.addListener(p,"change",c);a.appendChild(e);var n=this.createPanel();n.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";
-h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"Start");n.appendChild(h);var q=this.addUnitInput(n,"pt",84,44,function(){l.apply(this,arguments)}),t=this.addUnitInput(n,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),84);this.addLabel(n,mxResources.get("top"),20);a.appendChild(n);this.addKeyHandler(q,u);this.addKeyHandler(t,u);var r=this.createPanel();r.style.paddingBottom="30px";h=document.createElement("div");
-h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");r.appendChild(h);var w=this.addUnitInput(r,"pt",84,44,function(){g.apply(this,arguments)}),v=this.addUnitInput(r,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);a.appendChild(r);this.addKeyHandler(w,u);this.addKeyHandler(v,u);var u=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();
-a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=p)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),p.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=d.sourcePoint.x,t.value=d.sourcePoint.y):n.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
-!1)?(w.value=d.targetPoint.x,v.value=d.targetPoint.y):r.style.display="none"):(n.style.display="none",r.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(t,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){b.getModel().removeListener(u)}});
+ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(n.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));n.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel(),
+k=document.createElement("div");k.style.position="absolute";k.style.width="70px";k.style.marginTop="0px";k.style.fontWeight="bold";mxUtils.write(k,mxResources.get("width"));e.appendChild(k);var g,h,l,m,n=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(n,u);mxEvent.addListener(n,"blur",c);mxEvent.addListener(n,"change",c);a.appendChild(e);var p=this.createPanel();p.style.paddingBottom="30px";k=document.createElement("div");k.style.position="absolute";
+k.style.width="70px";k.style.marginTop="0px";k.style.fontWeight="bold";mxUtils.write(k,"Start");p.appendChild(k);var q=this.addUnitInput(p,"pt",84,44,function(){l.apply(this,arguments)}),r=this.addUnitInput(p,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),84);this.addLabel(p,mxResources.get("top"),20);a.appendChild(p);this.addKeyHandler(q,u);this.addKeyHandler(r,u);var t=this.createPanel();t.style.paddingBottom="30px";k=document.createElement("div");
+k.style.position="absolute";k.style.width="70px";k.style.marginTop="0px";k.style.fontWeight="bold";mxUtils.write(k,"End");t.appendChild(k);var w=this.addUnitInput(t,"pt",84,44,function(){g.apply(this,arguments)}),v=this.addUnitInput(t,"pt",20,44,function(){h.apply(this,arguments)});mxUtils.br(t);this.addLabel(t,mxResources.get("left"),84);this.addLabel(t,mxResources.get("top"),20);a.appendChild(t);this.addKeyHandler(w,u);this.addKeyHandler(v,u);var u=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();
+a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=n)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=d.sourcePoint.x,r.value=d.sourcePoint.y):p.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
+!1)?(w.value=d.targetPoint.x,v.value=d.targetPoint.y):t.style.display="none"):(p.style.display="none",t.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(r,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.x=b});h=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){b.getModel().removeListener(u)}});
u()};TextFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#c5ecff', EndColorStr='#87d4fb', GradientType=0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px";e.style.paddingBottom=
-"6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var h=e.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow="hidden";
-g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";var k=g.getElementsByTagName("div")[0];k.style.cssFloat="right";a.appendChild(h);mxClient.IS_FF&&(g.getElementsByTagName("div")[0].style.marginTop="-18px")}a.appendChild(e);h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e);l.style.color=
-"rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");k=e.cloneNode(!1);k.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+
-" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var p=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([p]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var n=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
-b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),r=this.editorUi.toolbar.addButton("geSprite-right",
-mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([q,t,r]);if(b.cellEditor.isContentEditing()){var w=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([w])}var v=this.editorUi.toolbar.addButton("geSprite-top",
-mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),u=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
-g);this.styleButtons([v,u,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,C,A,D,B,L,K;b.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",z.style.display="none",p.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([A,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",
-!1,null)},g),C=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),A.style.marginRight="9px",n=g.cloneNode(!1),n.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),
-function(){document.execCommand("insertunorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},n)],this.styleButtons(g),g[g.length-1].style.marginLeft=
-"9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),n.style.height="40"),a.appendChild(n)):(m[2].style.marginRight="9px",r.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft="0px";g.style.paddingTop="8px";g.style.paddingBottom="4px";g.style.fontWeight="normal";mxUtils.write(g,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var w="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),
+"6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var k=e.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow="hidden";
+g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";var h=g.getElementsByTagName("div")[0];h.style.cssFloat="right";a.appendChild(k);mxClient.IS_FF&&(g.getElementsByTagName("div")[0].style.marginTop="-18px")}a.appendChild(e);k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e);l.style.color=
+"rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");h=e.cloneNode(!1);h.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],h,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+
+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var n=this.editorUi.toolbar.addItems(["vertical"],h,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(h);this.styleButtons(m);this.styleButtons([n]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
+b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),r=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),t=this.editorUi.toolbar.addButton("geSprite-right",
+mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([q,r,t]);if(b.cellEditor.isContentEditing()){var w=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},h);this.styleButtons([w])}var v=this.editorUi.toolbar.addButton("geSprite-top",
+mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),u=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
+g);this.styleButtons([v,u,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,C,A,D,B,L,K;b.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",z.style.display="none",n.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([A,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",
+!1,null)},g),C=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),A.style.marginRight="9px",p=g.cloneNode(!1),p.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),
+function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(g),g[g.length-1].style.marginLeft=
+"9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(m[2].style.marginRight="9px",t.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft="0px";g.style.paddingTop="8px";g.style.paddingBottom="4px";g.style.fontWeight="normal";mxUtils.write(g,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var w="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),
E={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<w.length;n++){var J=document.createElement("option");
-J.setAttribute("value",w[n]);mxUtils.write(J,mxResources.get(w[n]));I.appendChild(J)}g.appendChild(I);w=e.cloneNode(!1);w.style.marginLeft="0px";w.style.paddingTop="4px";w.style.paddingBottom="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,
-rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<J.length;n++){var O=document.createElement("option");O.setAttribute("value",J[n]);mxUtils.write(O,mxResources.get(J[n]));N.appendChild(O)}w.appendChild(N);b.isEditing()||(a.appendChild(g),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=E[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),
+mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<w.length;p++){var J=document.createElement("option");
+J.setAttribute("value",w[p]);mxUtils.write(J,mxResources.get(w[p]));I.appendChild(J)}g.appendChild(I);w=e.cloneNode(!1);w.style.marginLeft="0px";w.style.paddingTop="4px";w.style.paddingBottom="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,
+rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var P=document.createElement("option");P.setAttribute("value",J[p]);mxUtils.write(P,mxResources.get(J[p]));N.appendChild(P)}w.appendChild(N);b.isEditing()||(a.appendChild(g),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=E[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),
b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(w),mxEvent.addListener(N,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[N.value],b.getSelectionCells());mxEvent.consume(a)}));var F=document.createElement("input");F.style.textAlign="right";F.style.marginTop="4px";mxClient.IS_QUIRKS||(F.style.position="absolute",
-F.style.right="32px");F.style.width="46px";F.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(F);var G=null,g=this.installInputHandler(F,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(!window.getSelection||mxClient.IS_IE||mxClient.IS_IE11)for(G=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++){if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=G+"px";
+F.style.right="32px");F.style.width="46px";F.style.height=mxClient.IS_QUIRKS?"21px":"17px";h.appendChild(F);var G=null,g=this.installInputHandler(F,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(!window.getSelection||mxClient.IS_IE||mxClient.IS_IE11)for(G=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++){if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=G+"px";
window.setTimeout(function(){F.value=G+" pt";G=null},0);break}}else{var c=function(c,e){c!=b.cellEditor.textarea&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==
-mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(var e=0;e<f.length;e++)c(f[e])}F.value=a+" pt"}},!0),g=this.createStepper(F,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=F.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat="right";var H=
+mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(var e=0;e<f.length;e++)c(f[e])}F.value=a+" pt"}},!0),g=this.createStepper(F,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=F.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");h.appendChild(g);h=l.getElementsByTagName("div")[0];h.style.cssFloat="right";var H=
null,y="#ffffff",W=null,R="#000000",T=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return y},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=
-null})});T.style.fontWeight="bold";var ca=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");ca.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return R},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){W=a},destroy:function(){W=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
-"#000000",function(a){T.style.display=null==a||a==mxConstants.NONE?"none":"";ca.style.display=T.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(T);b.cellEditor.isContentEditing()||h.appendChild(ca);
-a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||0!=f.edges.length||h.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));k.style.fontWeight="bold";h.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";
-k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var X,U,ja,da,ka,ea=this.addUnitInput(k,"pt",91,44,function(){X.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),
-20);mxUtils.br(k);mxUtils.br(k);var Z=this.addUnitInput(k,"pt",162,44,function(){ja.apply(this,arguments)}),fa=this.addUnitInput(k,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(k,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ba=null,la=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
+null})});T.style.fontWeight="bold";var ca=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");ca.style.fontWeight="bold";h=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return R},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){W=a},destroy:function(){W=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
+"#000000",function(a){T.style.display=null==a||a==mxConstants.NONE?"none":"";ca.style.display=T.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});h.style.fontWeight="bold";k.appendChild(h);k.appendChild(T);b.cellEditor.isContentEditing()||k.appendChild(ca);
+a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";h=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);h.style.fontWeight="bold";f.containsLabel||f.autoSize||0!=f.edges.length||k.appendChild(h);h=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));h.style.fontWeight="bold";k.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";
+h.style.paddingBottom="28px";h.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));h.appendChild(g);var X,U,ja,da,ka,ea=this.addUnitInput(h,"pt",91,44,function(){X.apply(this,arguments)}),Y=this.addUnitInput(h,"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("top"),91);this.addLabel(h,mxResources.get("global"),
+20);mxUtils.br(h);mxUtils.br(h);var Z=this.addUnitInput(h,"pt",162,44,function(){ja.apply(this,arguments)}),fa=this.addUnitInput(h,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(h,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("left"),162);this.addLabel(h,mxResources.get("bottom"),91);this.addLabel(h,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ba=null,la=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ba&&(b.cellEditor.restoreSelection(ba),ba=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&
-(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){la=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),
-function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(k);this.styleButtons(g);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(h);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);
-k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex:0))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex+1:-1))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),
-function(){try{null!=B&&null!=L&&b.deleteColumn(B,L.cellIndex)}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex+1))}catch(S){alert(S)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",
-mxResources.get("deleteRow"),function(){try{null!=B&&null!=K&&b.deleteRow(B,K.sectionRowIndex)}catch(S){alert(S)}},k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
+(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){la=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});a.value="120 %"}));k=e.cloneNode(!1);k.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],k,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),
+function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(h);this.styleButtons(g);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);mxClient.IS_QUIRKS&&(h.style.height="70");h=e.cloneNode(!1);
+h.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex:0))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=L?L.cellIndex+1:-1))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),
+function(){try{null!=B&&null!=L&&b.deleteColumn(B,L.cellIndex)}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=K&&b.selectNode(b.insertRow(B,K.sectionRowIndex+1))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),function(){try{null!=B&&null!=K&&b.deleteRow(B,K.sectionRowIndex)}catch(S){alert(S)}},h)];this.styleButtons(g);g[2].style.marginRight="9px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(h);mxClient.IS_QUIRKS&&(mxUtils.br(a),k.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
mxUtils.bind(this,function(){if(null!=B){var a=B.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=""):(B.setAttribute("border","1"),B.style.border="1px solid "+a,B.style.borderCollapse="collapse")})}}),
e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=B){var a=B.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){B.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",
mxResources.get("spacing"),function(){if(null!=B){var a=B.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?B.setAttribute("cellPadding",a):B.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=B&&B.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",
-mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var V=mxUtils.bind(this,
-function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=
-F)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),F.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,
+mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));k.appendChild(e);a.appendChild(k);D=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(h);var V=mxUtils.bind(this,
+function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=
+F)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),F.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(r,a==mxConstants.ALIGN_CENTER);c(t,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,
mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&
b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),Y.value=isNaN(a)?
"":a+" pt";if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,
0)),Z.value=isNaN(a)?"":a+" pt"});U=this.installInputHandler(Y,mxConstants.STYLE_SPACING,2,-999,999," pt");X=this.installInputHandler(ea,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");da=this.installInputHandler(fa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ja=this.installInputHandler(Z,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(F,V);this.addKeyHandler(Y,V);this.addKeyHandler(ea,V);this.addKeyHandler(ga,
V);this.addKeyHandler(fa,V);this.addKeyHandler(Z,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var ma=!1,e=function(){ma||(ma=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a){return"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},e=function(a,b,c){return"%"==
-c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var f=mxUtils.getCurrentStyle(a),g=d(f.fontSize),h=e(g,f.lineHeight,a),k=a.getElementsByTagName("*");if(0<k.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var p=
-window.getSelection(),n=0;n<k.length;n++)if(p.containsNode(k[n],!0)){temp=mxUtils.getCurrentStyle(k[n]);var g=Math.max(d(temp.fontSize),g),u=e(g,temp.lineHeight,k[n]);if(u!=h||isNaN(u))h=""}null!=f&&(c(m[0],"bold"==f.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea)),c(m[1],"italic"==f.fontStyle||null!=b.getParentByName(a,"I",b.cellEditor.textarea)),c(m[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea)),c(q,"left"==f.textAlign),c(t,"center"==f.textAlign),c(r,"right"==f.textAlign),
+c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var f=mxUtils.getCurrentStyle(a),g=d(f.fontSize),h=e(g,f.lineHeight,a),k=a.getElementsByTagName("*");if(0<k.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var n=
+window.getSelection(),p=0;p<k.length;p++)if(n.containsNode(k[p],!0)){temp=mxUtils.getCurrentStyle(k[p]);var g=Math.max(d(temp.fontSize),g),u=e(g,temp.lineHeight,k[p]);if(u!=h||isNaN(u))h=""}null!=f&&(c(m[0],"bold"==f.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea)),c(m[1],"italic"==f.fontStyle||null!=b.getParentByName(a,"I",b.cellEditor.textarea)),c(m[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea)),c(q,"left"==f.textAlign),c(r,"center"==f.textAlign),c(t,"right"==f.textAlign),
c(A,"justify"==f.textAlign),c(C,null!=b.getParentByName(a,"SUP",b.cellEditor.textarea)),c(x,null!=b.getParentByName(a,"SUB",b.cellEditor.textarea)),B=b.getParentByName(a,"TABLE",b.cellEditor.textarea),K=null==B?null:b.getParentByName(a,"TR",B),L=null==B?null:b.getParentByName(a,"TD",B),D.style.display=null!=B?"":"none",document.activeElement!=F&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=G?(a.removeAttribute("size"),a.style.fontSize=G+" pt",G=null):F.value=isNaN(g)?"":g+" pt",u=parseFloat(h),
isNaN(u)?la.value="100 %":la.value=Math.round(100*u)+" %"),a=f.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),d=f.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),
null!=W&&(R="#"==a.charAt(0)?a:"#000000",W(R,!0)),null!=H&&(y="#"==d.charAt(0)?d:null,H(y,!0)),null!=l.firstChild&&(f=f.fontFamily,"'"==f.charAt(0)&&(f=f.substring(1)),"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1)),'"'==f.charAt(0)&&(f=f.substring(1)),'"'==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1)),l.firstChild.nodeValue=f))}ma=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,
@@ -2743,27 +2748,27 @@ a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.con
StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),d=null;1==this.editorUi.editor.graph.getSelectionCount()&&(d=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),d.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),d.style.width="202px",d.style.marginBottom="2px",a.appendChild(d));c.image&&(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==d?c.style.width="202px":(d.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a};
StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var b=document.createElement("select");b.style.position="absolute";b.style.marginTop="-2px";b.style.right=mxClient.IS_QUIRKS?"52px":"72px";b.style.width="70px";mxEvent.addListener(b,"click",function(a){mxEvent.consume(a)});var f=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"#ffffff",function(a){b.style.display=
-null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,h=this.createCellColorOption(mxResources.get("fill"),e,"#ffffff");h.style.fontWeight="bold";e=mxUtils.getValue(d.style,e,null);f.style.display=null!=e&&e!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var g=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],e=0;e<g.length;e++){var k=document.createElement("option");
-k.setAttribute("value",g[e]);mxUtils.write(k,mxResources.get(g[e]));b.appendChild(k)}f.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);f.style.display=!d.fill||d.containsImage||null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?
-"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(f);h=this.getCustomColors();for(e=0;e<h.length;e++)a.appendChild(this.createCellColorOption(h[e].title,h[e].key,h[e].defaultValue));return a};
+null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),e,"#ffffff");k.style.fontWeight="bold";e=mxUtils.getValue(d.style,e,null);f.style.display=null!=e&&e!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var g=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],e=0;e<g.length;e++){var h=document.createElement("option");
+h.setAttribute("value",g[e]);mxUtils.write(h,mxResources.get(g[e]));b.appendChild(h)}f.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);f.style.display=!d.fill||d.containsImage||null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?
+"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(k);a.appendChild(f);k=this.getCustomColors();for(e=0;e<k.length;e++)a.appendChild(this.createCellColorOption(k[e].title,k[e].key,k[e].defaultValue));return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=[];"swimlane"==this.format.getSelectionState().style.shape&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return a};
StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(v.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));v.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
-"bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){f.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
-"curved"==g.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)f.setCellStyles(c[e],d[e],f.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var p="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k=this.createCellColorOption(mxResources.get("line"),p,"#000000");k.appendChild(g);h.appendChild(k);
-var n=h.cloneNode(!1);n.style.fontWeight="normal";n.style.whiteSpace="nowrap";n.style.position="relative";n.style.paddingLeft="16px";n.style.marginBottom="2px";n.style.marginTop="2px";n.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop="6px";a.firstChild.firstChild.style.padding=
-"0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(n,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
-q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),t=n.cloneNode(!1),r=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-connection",
+c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));v.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight=
+"bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var h=["sharp","rounded","curved"],l=0;l<h.length;l++){var m=document.createElement("option");m.setAttribute("value",h[l]);mxUtils.write(m,mxResources.get(h[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){f.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
+"curved"==g.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)f.setCellStyles(c[e],d[e],f.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var n="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,h=this.createCellColorOption(mxResources.get("line"),n,"#000000");h.appendChild(g);k.appendChild(h);
+var p=k.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop="6px";a.firstChild.firstChild.style.padding=
+"0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
+q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),r=p.cloneNode(!1),t=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-connection",
mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",
mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),
-m=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
-mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=n.cloneNode(!1),w=document.createElement("input");w.style.textAlign="right";w.style.marginTop="2px";w.style.width="41px";w.setAttribute("title",mxResources.get("linewidth"));n.appendChild(w);
-var v=w.cloneNode(!0);t.appendChild(v);var u=this.createStepper(w,c,1,9);u.style.display=w.style.display;u.style.marginTop="2px";n.appendChild(u);var z=this.createStepper(v,d,1,9);z.style.display=v.style.display;z.style.marginTop="2px";t.appendChild(z);mxClient.IS_QUIRKS?(w.style.height="17px",v.style.height="17px"):(w.style.position="absolute",w.style.right="32px",w.style.height="15px",u.style.right="20px",v.style.position="absolute",v.style.right="32px",v.style.height="15px",z.style.right="20px");
-mxEvent.addListener(w,"blur",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(v,"blur",d);mxEvent.addListener(v,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
+m=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
+mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),h=p.cloneNode(!1),w=document.createElement("input");w.style.textAlign="right";w.style.marginTop="2px";w.style.width="41px";w.setAttribute("title",mxResources.get("linewidth"));p.appendChild(w);
+var v=w.cloneNode(!0);r.appendChild(v);var u=this.createStepper(w,c,1,9);u.style.display=w.style.display;u.style.marginTop="2px";p.appendChild(u);var z=this.createStepper(v,d,1,9);z.style.display=v.style.display;z.style.marginTop="2px";r.appendChild(z);mxClient.IS_QUIRKS?(w.style.height="17px",v.style.height="17px"):(w.style.position="absolute",w.style.right="32px",w.style.height="15px",u.style.right="20px",v.style.position="absolute",v.style.right="32px",v.style.height="15px",z.style.right="20px");
+mxEvent.addListener(w,"blur",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(v,"blur",d);mxEvent.addListener(v,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));var x=this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-startclassic",
mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?
(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",
null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",
@@ -2775,7 +2780,7 @@ null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeS
this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,
-"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),A=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",
+"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),A=this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",
null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-endblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
@@ -2786,28 +2791,28 @@ null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild
"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",
-null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(r,8);this.addArrow(x);this.addArrow(C);this.addArrow(A);u=this.addArrow(l,9);u.className="geIcon";u.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom=
-"1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";u.appendChild(D);var B=document.createElement("div");B.style.width="23px";B.style.height="1px";B.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.marginBottom="9px";z.appendChild(B);l.style.height="15px";m.style.height="15px";r.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(h);a.appendChild(t);a.appendChild(n);l=n.cloneNode(!1);
+null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(C);this.addArrow(A);u=this.addArrow(l,9);u.className="geIcon";u.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom=
+"1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";u.appendChild(D);var B=document.createElement("div");B.style.width="23px";B.style.height="1px";B.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.marginBottom="9px";z.appendChild(B);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(k);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);
l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var L,K,I=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),E=this.addUnitInput(l,"pt",20,33,function(){K.apply(this,arguments)});mxUtils.br(l);u=document.createElement("div");
-u.style.height="8px";l.appendChild(u);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,N,Q=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom=
-"2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var F,G=this.addUnitInput(h,"pt",20,41,function(){F.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),
-mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter=
-"none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";
+u.style.height="8px";l.appendChild(u);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,N,Q=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
+"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));k.appendChild(m);var F,G=this.addUnitInput(k,"pt",20,41,function(){F.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(h),mxClient.IS_QUIRKS&&(mxUtils.br(a),
+mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(k));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter=
+"none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";
"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.borderBottom=D.style.borderBottom;
a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,
-null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";r.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==
-f.getSelectionCount()?(t.style.display="",n.style.display="none"):(t.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",
-c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(A,100));if(d||document.activeElement!=O)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,
+null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==
+f.getSelectionCount()?(r.style.display="",p.style.display="none"):(r.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",
+c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(A,100));if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,
mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),E.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),I.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":
-a+" pt"});N=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(E,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,H);this.addKeyHandler(O,
+a+" pt"});N=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(E,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,H);this.addKeyHandler(P,
H);this.addKeyHandler(Q,H);this.addKeyHandler(E,H);this.addKeyHandler(I,H);this.addKeyHandler(G,H);f.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){f.getModel().removeListener(H)}});H();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
-e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
-mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
+e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],k=0;k<f.length;k++){var g=document.createElement("option");g.setAttribute("value",f[k]);mxUtils.write(g,mxResources.get(f[k]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
+mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var h,l=this.addUnitInput(a,"pt",22,33,function(){h.apply(this,arguments)});h=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
m);b.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){b.getModel().removeListener(m)}});m()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var b=document.createElement("table");mxClient.IS_QUIRKS&&(b.style.fontSize="1em");b.style.width="100%";b.style.fontWeight="bold";b.style.paddingRight="20px";var f=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var h=document.createElement("td");h.style.padding="0px";h.style.width="50%";h.setAttribute("valign",
-"top");var g=h.cloneNode(!0);g.style.paddingLeft="8px";e.appendChild(h);e.appendChild(g);f.appendChild(e);b.appendChild(f);a.appendChild(b);var k=h,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";k.appendChild(a);k=k==h?g:h;l++}),p=mxUtils.bind(this,function(b,c,e){d=this.format.getSelectionState();h.innerHTML="";g.innerHTML="";k=h;d.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==d.style.shape&&m(mxResources.get("divider"),
-"swimlaneLine",1);d.containsImage||m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);d.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);d.comic&&m(mxResources.get("comic"),"comic",0);0==l&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){c.getModel().removeListener(p)}});p();return a};
+StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var b=document.createElement("table");mxClient.IS_QUIRKS&&(b.style.fontSize="1em");b.style.width="100%";b.style.fontWeight="bold";b.style.paddingRight="20px";var f=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var k=document.createElement("td");k.style.padding="0px";k.style.width="50%";k.setAttribute("valign",
+"top");var g=k.cloneNode(!0);g.style.paddingLeft="8px";e.appendChild(k);e.appendChild(g);f.appendChild(e);b.appendChild(f);a.appendChild(b);var h=k,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";h.appendChild(a);h=h==k?g:k;l++}),n=mxUtils.bind(this,function(b,c,e){d=this.format.getSelectionState();k.innerHTML="";g.innerHTML="";h=k;d.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==d.style.shape&&m(mxResources.get("divider"),
+"swimlaneLine",1);d.containsImage||m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);d.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);d.comic&&m(mxResources.get("comic"),"comic",0);0==l&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,n);this.listeners.push({destroy:function(){c.getModel().removeListener(n)}});n();return a};
StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";var c=mxUtils.button(mxResources.get("setAsDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("setAsDefaultStyle").funct()}));c.setAttribute("title",mxResources.get("setAsDefaultStyle")+" ("+this.editorUi.actions.get("setAsDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};
mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);if(d.isEnabled()){DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return d.pageVisible},function(a){c.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(d.pageVisible)};c.addListener("pageViewChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}));
@@ -2817,42 +2822,42 @@ DiagramFormatPanel.prototype.addOptions=function(a){var c=this.editorUi,d=c.edit
a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return d.connectionHandler.isEnabled()},function(a){c.actions.get("connectionPoints").funct()},{install:function(a){this.listener=function(){a(d.connectionHandler.isEnabled())};c.addListener("connectionPointsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return d.graphHandler.guidesEnabled},function(a){c.actions.get("guides").funct()},
{install:function(a){this.listener=function(){a(d.graphHandler.guidesEnabled)};c.addListener("guidesEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})));return a};
DiagramFormatPanel.prototype.addGridOption=function(a){function c(a){var c=parseInt(f.value),c=Math.max(1,isNaN(c)?10:c);c!=b.getGridSize()&&b.setGridSize(c);f.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=document.createElement("input");f.style.position="absolute";f.style.textAlign="right";f.style.width="38px";f.value=b.getGridSize()+" pt";var e=this.createStepper(f,c);f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display;mxEvent.addListener(f,"keydown",
-function(a){13==a.keyCode?(b.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(f.value=b.getGridSize(),b.container.focus(),mxEvent.consume(a))});mxEvent.addListener(f,"blur",c);mxEvent.addListener(f,"change",c);if(mxClient.IS_SVG){f.style.marginTop="-2px";f.style.right="84px";e.style.marginTop="-16px";e.style.right="72px";var h=this.createColorOption(mxResources.get("grid"),function(){var a=b.view.gridColor;return b.isGridEnabled()?a:null},function(a){a==mxConstants.NONE?(b.setGridEnabled(!1),
-d.fireEvent(new mxEventObject("gridEnabledChanged"))):(b.setGridEnabled(!0),d.setGridColor(a));f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display},"#e0e0e0",{install:function(a){this.listener=function(){a(b.isGridEnabled()?b.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});h.appendChild(f);h.appendChild(e);a.appendChild(h)}else f.style.marginTop="2px",
+function(a){13==a.keyCode?(b.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(f.value=b.getGridSize(),b.container.focus(),mxEvent.consume(a))});mxEvent.addListener(f,"blur",c);mxEvent.addListener(f,"change",c);if(mxClient.IS_SVG){f.style.marginTop="-2px";f.style.right="84px";e.style.marginTop="-16px";e.style.right="72px";var k=this.createColorOption(mxResources.get("grid"),function(){var a=b.view.gridColor;return b.isGridEnabled()?a:null},function(a){a==mxConstants.NONE?b.setGridEnabled(!1):
+(b.setGridEnabled(!0),d.setGridColor(a));f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display;d.fireEvent(new mxEventObject("gridEnabledChanged"))},"#e0e0e0",{install:function(a){this.listener=function(){a(b.isGridEnabled()?b.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});k.appendChild(f);k.appendChild(e);a.appendChild(k)}else f.style.marginTop="2px",
f.style.right="32px",e.style.marginTop="2px",e.style.right="20px",a.appendChild(f),a.appendChild(e),a.appendChild(this.createOption(mxResources.get("grid"),function(){return b.isGridEnabled()},function(a){b.setGridEnabled(a);b.isGridEnabled()&&(b.view.gridColor="#e0e0e0");d.fireEvent(new mxEventObject("gridEnabledChanged"))},{install:function(a){this.listener=function(){f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display;a(b.isGridEnabled())};d.addListener("gridEnabledChanged",
this.listener)},destroy:function(){d.removeListener(this.listener)}}))};DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
DiagramFormatPanel.prototype.addPaperSize=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var b=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(c,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(b.widthInput,function(){b.set(d.pageFormat)});this.addKeyHandler(b.heightInput,
function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addListener("pageFormatChanged",f);this.listeners.push({destroy:function(){c.removeListener(f)}});d.getModel().addListener(mxEvent.CHANGE,f);this.listeners.push({destroy:function(){d.getModel().removeListener(f)}});return a};
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
-c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function q(){mxActor.call(this)}function t(a,b){this.canvas=
-a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function r(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}
-function L(){mxEllipse.call(this)}function K(){mxShape.call(this)}function I(){mxShape.call(this)}function E(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function Q(){mxShape.call(this)}function O(){mxCylinder.call(this)}function F(){mxDoubleEllipse.call(this)}function G(){mxDoubleEllipse.call(this)}function H(){mxArrowConnector.call(this);this.spacing=0}function y(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}
+c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function k(){mxCylinder.call(this)}function g(){mxActor.call(this)}function h(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(a,b){this.canvas=
+a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}
+function L(){mxEllipse.call(this)}function K(){mxShape.call(this)}function I(){mxShape.call(this)}function E(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxCylinder.call(this)}function F(){mxDoubleEllipse.call(this)}function G(){mxDoubleEllipse.call(this)}function H(){mxArrowConnector.call(this);this.spacing=0}function y(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}
function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function X(){mxActor.call(this)}function U(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(){mxActor.call(this)}function ka(){mxActor.call(this)}function ea(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function la(){mxRhombus.call(this)}function V(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}
-function S(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Da(a,b,c,d,e,f,g,h,k,l){g+=k;var P=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(P.x-e-g,P.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
+function S(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Da(a,b,c,d,e,f,g,h,k,l){g+=k;var O=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(O.x-e-g,O.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};a.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",
a);var za=Math.tan(mxUtils.toRadians(30)),oa=(.5-za)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/za);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*oa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-oa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+za));f?(a.moveTo(0,.25*b),a.lineTo(.5*
b,(.5-oa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-oa)*b),a.lineTo(.5*b,(1-oa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*oa),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-oa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||
(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",
b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(d-b,0),a.lineTo(d-b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*
-d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
-f?"left"==g?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==g?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(d,c)):(a.moveTo(0,c),a.lineTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d,0)),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,c),a.close());a.end()};mxCellRenderer.registerShape("folder",h);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*
-d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",
-k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();
+d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(k,mxCylinder);k.prototype.tabWidth=60;k.prototype.tabHeight=20;k.prototype.tabPosition="right";k.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
+f?"left"==g?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==g?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(d,c)):(a.moveTo(0,c),a.lineTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d,0)),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,c),a.close());a.end()};mxCellRenderer.registerShape("folder",k);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(h,mxActor);h.prototype.size=.4;h.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*
+d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};h.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",
+h);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();
a.end()};mxCellRenderer.registerShape("document",l);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,
-c,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};
-mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);t.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};t.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)};t.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};t.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};t.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=
-g};t.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var P=c(a-this.lastX)*d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,
-P*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
-function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new t(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};
+[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,
+c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};
+mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);r.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};r.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)};r.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};r.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};r.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=
+g};r.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var O=c(a-this.lastX)*d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,
+O*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};r.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};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
+function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};
var Ja=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ja.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,
-c)),a.close(),a.end(),a.fillAndStroke()}};var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(r,mxRectangleShape);r.prototype.size=.1;r.prototype.isHtmlAllowed=function(){return!1};r.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 b=
-a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};r.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",r);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};w.prototype.paintForeground=
+c)),a.close(),a.end(),a.fillAndStroke()}};var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.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 b=
+a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};t.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",t);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};w.prototype.paintForeground=
function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",
v);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-
@@ -2860,8 +2865,8 @@ b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRe
this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Fa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Fa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Fa.apply(this,[a,b,
c,d,e]))}};mxUtils.extend(C,mxRectangleShape);C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};C.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],P=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,Aa=this.style["symbol"+f+"VSpacing"]||m,aa=this.style["symbol"+f+"ArcSpacing"];null!=aa&&(aa*=this.getArcSize(d+this.strokewidth,
-e+this.strokewidth),m+=aa,Aa+=aa);var aa=b,ra=c,aa=h==mxConstants.ALIGN_CENTER?aa+(d-P)/2:h==mxConstants.ALIGN_RIGHT?aa+(d-P-m):aa+m,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-l-Aa):ra+Aa;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,aa,ra,P,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(a,
+0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],O=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,Aa=this.style["symbol"+f+"VSpacing"]||m,aa=this.style["symbol"+f+"ArcSpacing"];null!=aa&&(aa*=this.getArcSize(d+this.strokewidth,
+e+this.strokewidth),m+=aa,Aa+=aa);var aa=b,ra=c,aa=h==mxConstants.ALIGN_CENTER?aa+(d-O)/2:h==mxConstants.ALIGN_RIGHT?aa+(d-O-m):aa+m,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-l-Aa):ra+Aa;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,aa,ra,O,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(a,
b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",A);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);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,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(a,
b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",L);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",K);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
@@ -2874,17 +2879,17 @@ a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h
mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<
a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",v.prototype.size))*
b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+
-h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=p.prototype.size;null!=b&&(e=
+h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=
mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,
g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
-mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?u.prototype.fixedSize:u.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,h=a.y,k=a.width,l=a.height,P=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+k-
-e,h),new mxPoint(g+k,a),new mxPoint(g+k-e,h+l),new mxPoint(g,h+l),new mxPoint(g+e,a),new mxPoint(g,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+l),new mxPoint(g+e,h+l),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(P,h),new mxPoint(g+k,h+e),new mxPoint(g+k,
-h+l),new mxPoint(P,h+l-e),new mxPoint(g,h+l),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(P,h+e),new mxPoint(g+k,h),new mxPoint(g+k,h+l-e),new mxPoint(P,h+l),new mxPoint(g,h+l-e),new mxPoint(g,h)]);P=new mxPoint(P,a);d&&(c.x<g||c.x>g+k?P.y=c.y:P.x=c.x);return mxUtils.getPerimeterPoint(h,P,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=z.prototype.size;null!=
+mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?u.prototype.fixedSize:u.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,h=a.y,k=a.width,l=a.height,O=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+k-
+e,h),new mxPoint(g+k,a),new mxPoint(g+k-e,h+l),new mxPoint(g,h+l),new mxPoint(g+e,a),new mxPoint(g,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+l),new mxPoint(g+e,h+l),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(O,h),new mxPoint(g+k,h+e),new mxPoint(g+k,
+h+l),new mxPoint(O,h+l-e),new mxPoint(g,h+l),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(O,h+e),new mxPoint(g+k,h),new mxPoint(g+k,h+l-e),new mxPoint(O,h+l),new mxPoint(g,h+l-e),new mxPoint(g,h)]);O=new mxPoint(O,a);d&&(c.x<g||c.x>g+k?O.y=c.y:O.x=c.x);return mxUtils.getPerimeterPoint(h,O,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=z.prototype.size;null!=
b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+
e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();
a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/
-2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(O,mxCylinder);O.prototype.jettyWidth=32;O.prototype.jettyHeight=12;O.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),
-a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",O);mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);
+2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(P,mxCylinder);P.prototype.jettyWidth=32;P.prototype.jettyHeight=12;P.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),
+a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",P);mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);
this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",F);mxUtils.extend(G,F);G.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",G);mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=4;H.prototype.isOpenEnded=function(){return!0};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};H.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
H);mxUtils.extend(y,mxArrowConnector);y.prototype.defaultWidth=10;y.prototype.defaultArrowWidth=20;y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
y);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",W);mxUtils.extend(R,mxRectangleShape);R.prototype.dx=20;R.prototype.dy=20;R.prototype.isHtmlAllowed=
@@ -2907,15 +2912,15 @@ mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype
e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",
pa);mxUtils.extend(qa,mxActor);qa.prototype.size=.25;qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",qa);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,b,c){for(var d=
[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),na.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;
-StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),p=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+p/2-3*m/2,d.y-3*p/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,
-l){var m=e*(g+k+1),p=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+p/2-3*m/2,d.y-3*p/2-m/2);a.moveTo(d.x-m/2+p/2,d.y-p/2-m/2);a.lineTo(d.x-p/2-3*m/2,d.y-3*p/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),p=Da.apply(this,arguments),n=e*(g+2*k),q=f*(g+2*k);return function(){p.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*q+f*k);a.moveTo(m.x-
-n-q+f*k,m.y-q+n-e*k);a.lineTo(m.x+q-n-f*k,m.y-q-n+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var p=
-e.clone();return function(){b.begin();b.moveTo(p.x,p.y);k?b.lineTo(p.x-f-g/a,p.y-g+f/a):b.lineTo(p.x+g/a-f,p.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ga=function(a,b,c){return sa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},sa=function(a,b,c,d,e){return M(a,b,
-function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,p=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,p,h/p,m/p,l,g,d,f)})},ia=function(a){return function(b){return[M(b,["arrowWidth",
+StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,
+l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Da.apply(this,arguments),p=e*(g+2*k),O=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*O+f*k);a.moveTo(m.x-
+p-O+f*k,m.y-O+p-e*k);a.lineTo(m.x+O-p-f*k,m.y-O-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=
+e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ga=function(a,b,c){return sa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},sa=function(a,b,c,d,e){return M(a,b,
+function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,n=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,n,h/n,m/n,l,g,d,f)})},ia=function(a){return function(b){return[M(b,["arrowWidth",
"arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ba=function(a,b,c){return function(d){var e=
[M(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},wa=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[M(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,
"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ha(f));return g}},Ha=function(a){return function(b){var c=
-[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},ta=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return M(a,
+[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},ta=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return M(a,
[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*
e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},M=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};
g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ca={link:function(a){return[Ga(a,!0,10),Ga(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,
@@ -2931,7 +2936,7 @@ parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYL
b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ha(a,c/2))}return b},
label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
"width",J.prototype.width))),c=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",r.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));
return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[M(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
@@ -2940,30 +2945,30 @@ b)},function(a,b){mxUtils.getValue(this.state.style,"base",v.prototype.base);thi
this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},internalStorage:function(a){var b=[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",R.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",R.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
-Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
-Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ba(1,a.prototype.size,!1),card:Ba(.5,g.prototype.size,!0),loopLimit:Ba(.5,Y.prototype.size,!0),trapezoid:Ha(.5),parallelogram:Ha(1)};Graph.createHandle=M;Graph.handleFactory=Ca;mxVertexHandler.prototype.createCustomHandles=
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",k.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",k.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(p.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ba(1,a.prototype.size,!1),card:Ba(.5,g.prototype.size,!0),loopLimit:Ba(.5,Y.prototype.size,!0),trapezoid:Ha(.5),parallelogram:Ha(1)};Graph.createHandle=M;Graph.handleFactory=Ca;mxVertexHandler.prototype.createCustomHandles=
function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ca[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&
(a=mxConstants.SHAPE_CONNECTOR);a=Ca[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xa=new mxPoint(1,0),ya=new mxPoint(1,0),ia=mxUtils.toRadians(-30),xa=mxUtils.getRotatedPoint(xa,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),ya=mxUtils.getRotatedPoint(ya,Math.cos(ia),Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
-d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=xa.x,l=xa.y,m=ya.x,p=ya.y,n="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(p*a-m*d)/(k*p-l*m);a=(l*a-k*d)/(l*m-k*p);n?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+
+d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=xa.x,l=xa.y,m=ya.x,n=ya.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+
k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return La.apply(this,arguments)};c.prototype.constraints=[];d.prototype.constraints=[];v.prototype.constraints=[];
mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;
+.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;
R.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=
mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;Z.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)];O.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,
+1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];P.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)];e.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)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];h.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
0),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
-.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;T.prototype.constraints=null;ca.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];E.prototype.constraints=null;ka.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,
@@ -2973,7 +2978,7 @@ this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.op
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=f;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(b)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&
-a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,h=e.y,e=null;if(1==c.length&&a){var t=b.getCellGeometry(c[0]);null!=t&&(e=t.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var r=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),w=Math.round(b.snap(b.popupMenuHandler.triggerY/f-h));b.cellsMoved(c,r-e.x,w-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,k=e.y,e=null;if(1==c.length&&a){var r=b.getCellGeometry(c[0]);null!=r&&(e=r.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var t=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),w=Math.round(b.snap(b.popupMenuHandler.triggerY/f-k));b.cellsMoved(c,t-e.x,w-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){b.setSelectionCells(b.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){b.turnShapes(b.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){b.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){b.selectEdges()},
null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){b.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){b.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!b.isSelectionEmpty()){b.getModel().beginUpdate();try{var a=b.isCellMovable(b.getSelectionCell())?1:0;b.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);b.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);b.toggleCellStyles(mxConstants.STYLE_ROTATABLE,
a);b.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);b.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);b.toggleCellStyles("connectable",a)}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){b.home()},null,null,"Home");this.addAction("exitGroup",function(){b.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){b.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){b.foldCells(!0)},
@@ -2997,7 +3002,7 @@ e=this.addAction("guides",function(){b.graphHandler.guidesEnabled=!b.graphHandle
new ChangePageSetup(c);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.foldingEnabled});e.isEnabled=f;e=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.scrollbars});e=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!b.pageVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return b.pageVisible});
e=this.addAction("connectionArrows",function(){b.connectionArrowsEnabled=!b.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionArrowsEnabled});e=this.addAction("connectionPoints",function(){b.setConnectable(!b.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isEnabled()});
e=this.addAction("copyConnect",function(){b.connectionHandler.setCreateTarget(!b.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isCreateTarget()});e.isEnabled=f;e=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});e.setToggleAction(!0);e.setSelectedCallback(function(){return c.editor.autosave});e.isEnabled=f;e.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var h=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){h||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){h=!1}),h=!0)},null,null,"F1"));e=mxUtils.bind(this,function(a,c,d,e){return this.addAction(a,function(){if(null!=d&&b.cellEditor.isContentEditing())d();else{b.stopEditing(!1);b.getModel().beginUpdate();try{b.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var k=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){k||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){k=!1}),k=!0)},null,null,"F1"));e=mxUtils.bind(this,function(a,c,d,e){return this.addAction(a,function(){if(null!=d&&b.cellEditor.isContentEditing())d();else{b.stopEditing(!1);b.getModel().beginUpdate();try{b.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
c),(c&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&b.replaceElement(a)}):(c&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&b.replaceElement(a)}):(c&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.updateLabelElements(b.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&
b.replaceElement(a)})}finally{b.getModel().endUpdate()}}},null,null,e)});e("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");e("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");e("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){c.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
this.addAction("strokeColor...",function(){c.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){c.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){c.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
@@ -3008,8 +3013,8 @@ this.addAction("rounded",function(){b.getModel().beginUpdate();try{b.setCellStyl
e=null!=d?d.style:b.getCellStyle(a[0]),f="1"==mxUtils.getValue(e,mxConstants.STYLE_ROUNDED,"0")?"0":"1";b.setCellStyles(mxConstants.STYLE_ROUNDED,f);b.setCellStyles(mxConstants.STYLE_CURVED,null);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("curved",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),b.setCellStyles(mxConstants.STYLE_CURVED,
"1"),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=b.view.getState(b.getSelectionCell()),d="1";null!=a&&null!=b.getFoldingImage(a)&&(d="0");b.setCellStyles("collapsible",d);c.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",b.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var a=b.getSelectionCells();if(null!=a&&0<a.length){var c=b.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&b.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(){b.isEnabled()&&!b.isSelectionEmpty()&&c.setDefaultStyle(b.getSelectionCell())},null,null,Editor.ctrlKey+
-"+Shift+D");this.addAction("clearDefaultStyle",function(){b.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var c=d.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var e=b.view.translate,f=b.view.scale,h=e.x,e=e.y,a=b.getModel().getParent(a),n=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=n;)h+=n.x,e+=n.y,a=b.getModel().getParent(a),n=
-b.getCellGeometry(a);h=Math.round(b.snap(b.popupMenuHandler.triggerX/f-h));f=Math.round(b.snap(b.popupMenuHandler.triggerY/f-e));c.addPointAt(c.state,h,f)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().isEdge(d)){var e=
+"+Shift+D");this.addAction("clearDefaultStyle",function(){b.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var c=d.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var e=b.view.translate,f=b.view.scale,k=e.x,e=e.y,a=b.getModel().getParent(a),p=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=p;)k+=p.x,e+=p.y,a=b.getModel().getParent(a),p=
+b.getCellGeometry(a);k=Math.round(b.snap(b.popupMenuHandler.triggerX/f-k));f=Math.round(b.snap(b.popupMenuHandler.triggerY/f-e));c.addPointAt(c.state,k,f)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().isEdge(d)){var e=
b.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,b.getModel().setGeometry(d,e))}}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+C");e=this.addAction("subscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");e=this.addAction("superscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=b.getView().getState(b.getSelectionCell()),e="";null!=d&&(e=d.style[mxConstants.STYLE_IMAGE]||e);var f=b.cellEditor.saveSelection();c.showImageDialog(a,e,function(a,c,d){if(b.cellEditor.isContentEditing())b.cellEditor.restoreSelection(f),b.insertImage(a,c,d);else{var e=b.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;b.getModel().beginUpdate();
try{if(0==e.length){var h=b.getFreeInsertPoint(),g=e=[b.insertVertex(b.getDefaultParent(),null,"",h.x,h.y,c,d,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];b.fireEvent(new mxEventObject("cellsInserted","cells",g))}b.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var k=b.view.getState(e[0]),l=null!=k?k.style:b.getCellStyle(e[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?b.setCellStyles(mxConstants.STYLE_SHAPE,"image",
@@ -3025,7 +3030,7 @@ Menus.prototype.init=function(){var a=this.editorUi.editor.graph,c=mxUtils.bind(
this.put("formatBlock",new Menu(mxUtils.bind(this,function(c,b){function d(d,f){return c.addItem(d,null,mxUtils.bind(this,function(){a.cellEditor.textarea.focus();document.execCommand("formatBlock",!1,"<"+f+">")}),b)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML=
'<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML='<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("",
"blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(c,b){for(var d=[6,8,9,10,11,12,14,18,24,36,48,72],e=mxUtils.bind(this,function(d){this.styleChange(c,d,[mxConstants.STYLE_FONTSIZE],[d],null,b,function(){document.execCommand("fontSize",!1,"3");for(var b=a.cellEditor.textarea.getElementsByTagName("font"),c=0;c<b.length;c++)if("3"==b[c].getAttribute("size")){b[c].removeAttribute("size");
-b[c].style.fontSize=d+"px";break}})}),h=0;h<d.length;h++)e(d[h]);c.addSeparator(b);if(0<this.customFontSizes.length){for(h=0;h<this.customFontSizes.length;h++)e(this.customFontSizes[h]);c.addSeparator(b);c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),b);c.addSeparator(b)}this.promptChange(c,mxResources.get("custom")+"...","(pt)","12",mxConstants.STYLE_FONTSIZE,b,!0,mxUtils.bind(this,function(a){this.customFontSizes.push(a)}))})));this.put("direction",
+b[c].style.fontSize=d+"px";break}})}),k=0;k<d.length;k++)e(d[k]);c.addSeparator(b);if(0<this.customFontSizes.length){for(k=0;k<this.customFontSizes.length;k++)e(this.customFontSizes[k]);c.addSeparator(b);c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),b);c.addSeparator(b)}this.promptChange(c,mxResources.get("custom")+"...","(pt)","12",mxConstants.STYLE_FONTSIZE,b,!0,mxUtils.bind(this,function(a){this.customFontSizes.push(a)}))})));this.put("direction",
new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("flipH"),null,function(){a.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)},b);c.addItem(mxResources.get("flipV"),null,function(){a.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},b);this.addMenuItems(c,["-","rotation"],b)})));this.put("align",new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("leftAlign"),null,function(){a.alignCells(mxConstants.ALIGN_LEFT)},b);c.addItem(mxResources.get("center"),null,function(){a.alignCells(mxConstants.ALIGN_CENTER)},
b);c.addItem(mxResources.get("rightAlign"),null,function(){a.alignCells(mxConstants.ALIGN_RIGHT)},b);c.addSeparator(b);c.addItem(mxResources.get("topAlign"),null,function(){a.alignCells(mxConstants.ALIGN_TOP)},b);c.addItem(mxResources.get("middle"),null,function(){a.alignCells(mxConstants.ALIGN_MIDDLE)},b);c.addItem(mxResources.get("bottomAlign"),null,function(){a.alignCells(mxConstants.ALIGN_BOTTOM)},b)})));this.put("distribute",new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("horizontal"),
null,function(){a.distributeCells(!0)},b);c.addItem(mxResources.get("vertical"),null,function(){a.distributeCells(!1)},b)})));this.put("layout",new Menu(mxUtils.bind(this,function(c,b){var d=mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});c.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,
@@ -3039,28 +3044,28 @@ b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a
b)})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),b))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(a,b){null!=this.editorUi.format&&this.addMenuItems(a,["formatPanel"],b);this.addMenuItems(a,["outline","layers"],b)})));this.put("viewZoom",new Menu(mxUtils.bind(this,
function(c,b){this.addMenuItems(c,["resetView","-"],b);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],e=0;e<d.length;e++)(function(d){c.addItem(100*d+"%",null,function(){a.zoomTo(d)},b)})(d[e]);this.addMenuItems(c,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),b)})));this.put("file",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"new open - save saveAs - import export - pageSetup print".split(" "),b)})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
"undo redo - cut copy paste delete - duplicate - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["help","-","about"])})))};Menus.prototype.put=function(a,c){return this.menus[a]=c};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,c,d){var b=this.get(a).isEnabled();if(c.showDisabled||b)d=c.addItem(mxResources.get(a),null,null,d,null,b),this.addMenu(a,c,d)};Menus.prototype.addMenu=function(a,c,d){var b=this.get(a);null!=b&&(c.showDisabled||b.isEnabled())&&this.get(a).execute(c,d)};
-Menus.prototype.addInsertTableItem=function(a){function c(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var h=0;h<f.length;h++)a.push(f[h]);d.container.focus();
-d.pasteHtmlAtCaret(c(e.sectionRowIndex+1,b.cellIndex+1));b=d.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(h=b.length-1;0<=h;h--)if(0==h||b[h]!=a[h-1]){d.selectNode(b[h].rows[0].cells[0]);break}}}));var b='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';a.firstChild.innerHTML="";var f=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS||d.setAttribute("cellPadding",
-"8");for(var e=0;e<a;e++)for(var f=d.insertRow(e),g=0;g<c;g++){var h=f.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=b)}return d}(5,5);a.firstChild.appendChild(f);var e=document.createElement("div");e.style.padding="4px";e.style.fontSize=Menus.prototype.defaultFontSize+"px";e.innerHTML="1x1";a.firstChild.appendChild(e);mxEvent.addListener(f,"mouseover",function(a){var c=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=c){for(var h=d.getParentByName(c,"TR"),l=Math.min(20,h.sectionRowIndex+2),
-m=Math.min(20,c.cellIndex+2),p=f.rows.length;p<l;p++)for(var n=f.insertRow(p),q=0;q<f.rows[0].cells.length;q++){var t=n.insertCell(-1);mxClient.IS_QUIRKS&&(t.innerHTML=b)}for(p=0;p<f.rows.length;p++)for(n=f.rows[p],q=n.cells.length;q<m;q++)t=n.insertCell(-1),mxClient.IS_QUIRKS&&(t.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(l=0;l<f.rows.length;l++)for(m=f.rows[l],p=0;p<m.cells.length;p++)m.cells[p].style.backgroundColor=l<=h.sectionRowIndex&&p<=c.cellIndex?"blue":"white";
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,c,d,b){var f=this.get(a).isEnabled();if(c.showDisabled||f)d=c.addItem(b||mxResources.get(a),null,null,d,null,f),this.addMenu(a,c,d)};Menus.prototype.addMenu=function(a,c,d){var b=this.get(a);null!=b&&(c.showDisabled||b.isEnabled())&&this.get(a).execute(c,d)};
+Menus.prototype.addInsertTableItem=function(a){function c(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var k=0;k<f.length;k++)a.push(f[k]);d.container.focus();
+d.pasteHtmlAtCaret(c(e.sectionRowIndex+1,b.cellIndex+1));b=d.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(k=b.length-1;0<=k;k--)if(0==k||b[k]!=a[k-1]){d.selectNode(b[k].rows[0].cells[0]);break}}}));var b='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';a.firstChild.innerHTML="";var f=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS||d.setAttribute("cellPadding",
+"8");for(var e=0;e<a;e++)for(var f=d.insertRow(e),g=0;g<c;g++){var k=f.insertCell(-1);mxClient.IS_QUIRKS&&(k.innerHTML=b)}return d}(5,5);a.firstChild.appendChild(f);var e=document.createElement("div");e.style.padding="4px";e.style.fontSize=Menus.prototype.defaultFontSize+"px";e.innerHTML="1x1";a.firstChild.appendChild(e);mxEvent.addListener(f,"mouseover",function(a){var c=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=c){for(var h=d.getParentByName(c,"TR"),k=Math.min(20,h.sectionRowIndex+2),
+m=Math.min(20,c.cellIndex+2),n=f.rows.length;n<k;n++)for(var p=f.insertRow(n),q=0;q<f.rows[0].cells.length;q++){var r=p.insertCell(-1);mxClient.IS_QUIRKS&&(r.innerHTML=b)}for(n=0;n<f.rows.length;n++)for(p=f.rows[n],q=p.cells.length;q<m;q++)r=p.insertCell(-1),mxClient.IS_QUIRKS&&(r.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(k=0;k<f.rows.length;k++)for(m=f.rows[k],n=0;n<m.cells.length;n++)m.cells[n].style.backgroundColor=k<=h.sectionRowIndex&&n<=c.cellIndex?"blue":"white";
mxEvent.consume(a)}})};
-Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var p=c[f];if(a.getModel().isEdge(p)){if(h){var n=a.getCellGeometry(p);null!=n&&(n=n.clone(),n.points=null,a.getModel().setGeometry(p,n))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[p]);e.push(p)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
-d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,h,g){var k=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=h&&a.cellEditor.isContentEditing()?h():k(g)}),e,f)};
+Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var n=c[f];if(a.getModel().isEdge(n)){if(k){var p=a.getCellGeometry(n);null!=p&&(p=p.clone(),p.points=null,a.getModel().setGeometry(n,p))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[n]);e.push(n)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
+d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,k,g){var h=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=k&&a.cellEditor.isContentEditing()?k():h(g)}),e,f)};
Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var f=0;f<a.length;f++)b.setCellStyles(a[f],c[f]);null!=d&&d();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,c,d,b,f,e,h,g,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[f]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(f,b)}finally{a.getModel().endUpdate()}null!=g&&g(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
-d:""));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}),e,k,h)};
+Menus.prototype.promptChange=function(a,c,d,b,f,e,k,g,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[f]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(f,b)}finally{a.getModel().endUpdate()}null!=g&&g(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
+d:""));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}),e,h,k)};
Menus.prototype.pickColor=function(a,c,d){var b=this.editorUi.editor.graph;if(null!=c&&b.cellEditor.isContentEditing()){var f=b.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,d||"000000",mxUtils.bind(this,function(a){b.cellEditor.restoreSelection(f);document.execCommand(c,!1,a!=mxConstants.NONE?a:"transparent")}),function(){b.cellEditor.restoreSelection(f)});this.editorUi.showDialog(a.container,230,430,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));
this.colorDialog.currentColorKey=a;d=b.getView().getState(b.getSelectionCell());var e="none";null!=d&&(e=d.style[a]||e);"none"==e?(e="ffffff",this.colorDialog.picker.fromString("ffffff"),this.colorDialog.colorInput.value="none"):this.colorDialog.picker.fromString(e);this.editorUi.showDialog(this.colorDialog.container,230,430,!0,!0);this.colorDialog.init()}};
Menus.prototype.toggleStyle=function(a,c){var d=this.editorUi.editor.graph,b=d.toggleCellStyles(a,c);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",d.getSelectionCells()))};
Menus.prototype.addMenuItem=function(a,c,d,b,f){var e=this.editorUi.actions.get(c);return null!=e&&(a.showDisabled||e.isEnabled())&&e.visible?(c=a.addItem(e.label,null,function(){e.funct(b)},d,f,e.isEnabled()),e.toggleAction&&e.isSelected()&&a.addCheckmark(c,Editor.checkmarkImage),this.addShortcut(c,e),c):null};
Menus.prototype.addShortcut=function(a,c){if(null!=c.shortcut){var d=a.firstChild.nextSibling.nextSibling,b=document.createElement("span");b.style.color="gray";mxUtils.write(b,c.shortcut);d.appendChild(b)}};Menus.prototype.addMenuItems=function(a,c,d,b,f){for(var e=0;e<c.length;e++)"-"==c[e]?a.addSeparator(d):this.addMenuItem(a,c[e],d,b,null!=f?f[e]:null)};
Menus.prototype.createPopupMenu=function(a,c,d){var b=this.editorUi.editor.graph;a.smartSeparators=!0;b.isSelectionEmpty()?this.addMenuItems(a,["undo","redo","pasteHere"],null,d):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,d);if(b.isSelectionEmpty())this.addMenuItems(a,"- selectVertices selectEdges selectAll - clearDefaultStyle".split(" "),null,d);else{1==b.getSelectionCount()&&this.addMenuItems(a,["setAsDefaultStyle"],null,d);a.addSeparator();c=b.getSelectionCell();var f=
-b.view.getState(c);if(null!=f){var e=!1;this.addMenuItems(a,["toFront","toBack","-"],null,d);if(b.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null)){var e=b.selectionCellsHandler.getHandler(c),h=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var h=e.getHandleForEvent(b.updateMouseEvent(new mxMouseEvent(d))),g=this.editorUi.actions.get("removeWaypoint");g.handler=
-e;g.index=h;h=0<h&&h<e.bends.length-1}this.addMenuItems(a,["-",h?"removeWaypoint":"addWaypoint"],null,d);e=b.getModel().getGeometry(c);e=null!=e&&null!=e.points&&0<e.points.length}1==b.getSelectionCount()&&(e||b.getModel().isVertex(c)&&0<b.getModel().getEdgeCount(c))&&this.addMenuItems(a,["clearWaypoints"],null,d);1<b.getSelectionCount()?(a.addSeparator(),this.addMenuItems(a,["group"],null,d)):1==b.getSelectionCount()&&!b.getModel().isEdge(c)&&!b.isSwimlane(c)&&0<b.getModel().getChildCount(c)&&(a.addSeparator(),
+b.view.getState(c);if(null!=f){var e=!1;this.addMenuItems(a,["toFront","toBack","-"],null,d);if(b.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null)){var e=b.selectionCellsHandler.getHandler(c),k=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var k=e.getHandleForEvent(b.updateMouseEvent(new mxMouseEvent(d))),g=this.editorUi.actions.get("removeWaypoint");g.handler=
+e;g.index=k;k=0<k&&k<e.bends.length-1}this.addMenuItems(a,["-",k?"removeWaypoint":"addWaypoint"],null,d);e=b.getModel().getGeometry(c);e=null!=e&&null!=e.points&&0<e.points.length}1==b.getSelectionCount()&&(e||b.getModel().isVertex(c)&&0<b.getModel().getEdgeCount(c))&&this.addMenuItems(a,["clearWaypoints"],null,d);1<b.getSelectionCount()?(a.addSeparator(),this.addMenuItems(a,["group"],null,d)):1==b.getSelectionCount()&&!b.getModel().isEdge(c)&&!b.isSwimlane(c)&&0<b.getModel().getChildCount(c)&&(a.addSeparator(),
this.addMenuItems(a,["ungroup"],null,d));1==b.getSelectionCount()&&(a.addSeparator(),this.addMenuItems(a,["edit","-","editData","editLink"],null,d),b.getModel().isVertex(c)&&null!=mxUtils.getValue(f.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",null,d).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"..."))}}};
Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),d=this.defaultMenuItems,b=0;b<d.length;b++)mxUtils.bind(this,function(a){var e=c.addMenu(mxResources.get(d[b]),mxUtils.bind(this,function(){a.funct.apply(this,arguments)}));this.menuCreated(a,e)})(this.get(d[b]));return c};
-Menus.prototype.menuCreated=function(a,c){null!=c&&a.addListener("stateChanged",function(){(c.enabled=a.enabled)?(c.className="geItem",8==document.documentMode&&(c.style.color="")):(c.className="geItem mxDisabled",8==document.documentMode&&(c.style.color="#c3c3c3"))})};function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
+Menus.prototype.menuCreated=function(a,c,d){null!=c&&(d=null!=d?d:"geItem",a.addListener("stateChanged",function(){(c.enabled=a.enabled)?(c.className=d,8==document.documentMode&&(c.style.color="")):(c.className=d+" mxDisabled",8==document.documentMode&&(c.style.color="#c3c3c3"))}))};function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
Menubar.prototype.addMenu=function(a,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.className="geItem";mxUtils.write(d,a);this.addMenuHandler(d,c);this.container.appendChild(d);return d};
Menubar.prototype.addMenuHandler=function(a,c){if(null!=c){var d=!0,b=mxUtils.bind(this,function(b){if(d&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(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);this.editorUi.resetCurrentMenu();e.destroy()});var f=mxUtils.getOffset(a);e.popup(f.x,f.y+a.offsetHeight,null,
b);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(b)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(c){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),b(c))}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(){d=this.currentElt!=a}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){b(a);d=!0}))}};Menubar.prototype.destroy=function(){};
@@ -3078,7 +3083,7 @@ null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edg
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8)};
-Toolbar.prototype.addDropDownArrow=function(a,c,d,b,f,e,h,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='<div class="geSprite '+c+'" style="margin-left:'+f+"px;margin-top:"+e+'px;"></div>'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=h?h:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top=
+Toolbar.prototype.addDropDownArrow=function(a,c,d,b,f,e,k,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='<div class="geSprite '+c+'" style="margin-left:'+f+"px;margin-top:"+e+'px;"></div>'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=k?k:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top=
"5px",a.style.width=mxClient.IS_QUIRKS?d+"px":d-10+"px")};Toolbar.prototype.setFontName=function(a){null!=this.fontMenu&&(this.fontMenu.innerHTML='<div style="width:60px;overflow:hidden;display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+this.dropdownImageHtml)};Toolbar.prototype.setFontSize=function(a){null!=this.sizeMenu&&(this.sizeMenu.innerHTML='<div style="width:24px;overflow:hidden;display:inline-block;">'+a+"</div>"+this.dropdownImageHtml)};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi.editor.graph,c=this.addMenu("",mxResources.get("style"),!0,"formatBlock");c.style.position="relative";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.innerHTML=mxResources.get("style")+this.dropdownImageHtml;EditorUi.compactUi&&(c.style.paddingRight="18px",c.getElementsByTagName("img")[0].style.right="1px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width=mxClient.IS_QUIRKS?"80px":"60px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,
@@ -3093,99 +3098,99 @@ mxResources.get("fontColor"));d=a.addItem("",null,this.editorUi.actions.get("bac
'<div class="geSprite geSprite-dots" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;c.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(c.getElementsByTagName("img")[0].style.left="22px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){a.cellEditor.toggleViewMode();0<a.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=a.cellEditor.textarea.innerHTML||!a.cellEditor.clearOnChange)&&
window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});this.addSeparator();c=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(a){a.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));a.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));a.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",
!1,null)}))}));c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.position="relative";c.innerHTML='<div class="geSprite geSprite-plus" style="margin-left:-4px;margin-top:-3px;"></div>'+this.dropdownImageHtml;c.style.width=mxClient.IS_QUIRKS?"36px":"16px";EditorUi.compactUi&&(c.getElementsByTagName("img")[0].style.left="24px",c.getElementsByTagName("img")[0].style.top="5px",c.style.width=mxClient.IS_QUIRKS?"50px":"30px");this.addSeparator();var d=this.addMenuFunction("geIcon geSprite geSprite-table",
-mxResources.get("table"),!1,mxUtils.bind(this,function(b){var c=a.getSelectedElement(),d=a.getParentByName(c,"TD",a.cellEditor.text2),h=a.getParentByName(c,"TR",a.cellEditor.text2);if(null==h)this.editorUi.menus.addInsertTableItem(b);else{var g=a.getParentByName(h,"TABLE",a.cellEditor.text2),c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex:0))}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");
-c.setAttribute("title",mxResources.get("insertColumnBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex+1:-1))}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=b.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{a.deleteColumn(g,d.cellIndex)}catch(k){mxUtils.alert(mxResources.get("error")+
-": "+k.message)}}),null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,h.sectionRowIndex))}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,h.sectionRowIndex+1))}catch(k){mxUtils.alert(mxResources.get("error")+
-": "+k.message)}}),null,"geIcon geSprite geSprite-insertrowafter");c.setAttribute("title",mxResources.get("insertRowAfter"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.deleteRow(g,h.sectionRowIndex)}catch(k){mxUtils.alert(mxResources.get("error")+": "+k.message)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+mxResources.get("table"),!1,mxUtils.bind(this,function(b){var c=a.getSelectedElement(),d=a.getParentByName(c,"TD",a.cellEditor.text2),k=a.getParentByName(c,"TR",a.cellEditor.text2);if(null==k)this.editorUi.menus.addInsertTableItem(b);else{var g=a.getParentByName(k,"TABLE",a.cellEditor.text2),c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex:0))}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");
+c.setAttribute("title",mxResources.get("insertColumnBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex+1:-1))}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=b.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{a.deleteColumn(g,d.cellIndex)}catch(h){mxUtils.alert(mxResources.get("error")+
+": "+h.message)}}),null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,k.sectionRowIndex))}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,k.sectionRowIndex+1))}catch(h){mxUtils.alert(mxResources.get("error")+
+": "+h.message)}}),null,"geIcon geSprite geSprite-insertrowafter");c.setAttribute("title",mxResources.get("insertRowAfter"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.deleteRow(g,k.sectionRowIndex)}catch(h){mxUtils.alert(mxResources.get("error")+": "+h.message)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(g.removeAttribute("border"),g.style.border="",g.style.borderCollapse=""):(g.setAttribute("border","1"),g.style.border="1px solid "+a,g.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");c.setAttribute("title",mxResources.get("borderColor"));c=b.addItem("",
null,mxUtils.bind(this,function(){var a=g.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){g.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=b.addItem("",null,mxUtils.bind(this,
function(){var a=g.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?g.setAttribute("cellPadding",a):g.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,"geIcon geSprite geSprite-fit");c.setAttribute("title",mxResources.get("spacing"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");
c.setAttribute("title",mxResources.get("left"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");c.setAttribute("title",mxResources.get("center"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");c.setAttribute("title",mxResources.get("right"))}}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.innerHTML='<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>'+
-this.dropdownImageHtml;d.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,c,d,b,f,e){var h=this.editorUi.menus.get(b),g=this.addMenuFunction(a,c,d,function(){h.funct.apply(h,arguments)},f,e);h.addListener("stateChanged",function(){g.setEnabled(h.enabled)});return g};
+this.dropdownImageHtml;d.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,c,d,b,f,e){var k=this.editorUi.menus.get(b),g=this.addMenuFunction(a,c,d,function(){k.funct.apply(k,arguments)},f,e);k.addListener("stateChanged",function(){g.setEnabled(k.enabled)});return g};
Toolbar.prototype.addMenuFunction=function(a,c,d,b,f,e){return this.addMenuFunctionInContainer(null!=f?f:this.container,a,c,d,b,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,c,d,b,f,e){c=b?this.createLabel(c):this.createButton(c);this.initElement(c,d);this.addMenuHandler(c,b,f,e);a.appendChild(c);return c};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var c=document.createElement("div");c.className="geSeparator";a.appendChild(c);return c};
Toolbar.prototype.addItems=function(a,c,d){for(var b=[],f=0;f<a.length;f++){var e=a[f];"-"==e?b.push(this.addSeparator(c)):b.push(this.addItem("geSprite-"+e.toLowerCase(),e,c,d))}return b};Toolbar.prototype.addItem=function(a,c,d,b){var f=this.editorUi.actions.get(c),e=null;null!=f&&(c=f.label,null!=f.shortcut&&(c+=" ("+f.shortcut+")"),e=this.addButton(a,c,f.funct,d),b||(e.setEnabled(f.enabled),f.addListener("stateChanged",function(){e.setEnabled(f.enabled)})));return e};
Toolbar.prototype.addButton=function(a,c,d,b){a=this.createButton(a);b=null!=b?b:this.container;this.initElement(a,c);this.addClickHandler(a,d);b.appendChild(a);return a};Toolbar.prototype.initElement=function(a,c){null!=c&&a.setAttribute("title",c);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var c=a.className;a.setEnabled=function(d){a.enabled=d;a.className=d?c:c+" mxDisabled"};a.setEnabled(!0)};
Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,"click",function(d){a.enabled&&c(d);mxEvent.consume(d)}),null!=document.documentMode&&9<=document.documentMode&&mxEvent.addListener(a,"mousedown",function(a){a.preventDefault()}))};Toolbar.prototype.createButton=function(a){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.className="geButton";var d=document.createElement("div");null!=a&&(d.className="geSprite "+a);c.appendChild(d);return c};
Toolbar.prototype.createLabel=function(a,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.className="geLabel";mxUtils.write(d,a);return d};
-Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var f=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(h&&(null==a.enabled||a.enabled)){f.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
-e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}h=!0;mxEvent.consume(g)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){h=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};
+Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var f=this.editorUi.editor.graph,e=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(k&&(null==a.enabled||a.enabled)){f.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var h=mxUtils.getOffset(a);e.popup(h.x,h.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
+e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}k=!0;mxEvent.consume(g)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){k=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};
Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=
-function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b=
-document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+q]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
-a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";
-h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var g=new jscolor.color(h);g.pickerOnfocus=!1;g.showPicker();var k=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";k.appendChild(jscolor.picker.box);var l=document.createElement("center");k.appendChild(h);
-mxUtils.br(k);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";k.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);var n=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;ColorDialog.addRecentColor(b,
-12);"none"!=b&&"#"!=b.charAt(0)&&(b="#"+b);n(b);a.hideDialog()});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(p);null!=c&&("none"==c?(g.fromString("ffffff"),h.value="none"):g.fromString(c));k.appendChild(m);this.picker=g;this.colorInput=h;mxEvent.addListener(k,"keydown",function(c){27==c.keyCode&&(a.hideDialog(),null!=b&&b(),mxEvent.consume(c))});this.container=k};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
+function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var h=document.createElement("tbody");e.appendChild(h);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b=
+document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),k.value="none"):g.fromString(a)}))})(a[n*b+q]);h.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
+a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";
+k.style.width="216px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));this.init=function(){mxClient.IS_TOUCH||k.focus()};var g=new jscolor.color(k);g.pickerOnfocus=!1;g.showPicker();var h=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";h.appendChild(jscolor.picker.box);var l=document.createElement("center");h.appendChild(k);
+mxUtils.br(h);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";h.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var p=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=k.value;ColorDialog.addRecentColor(b,
+12);"none"!=b&&"#"!=b.charAt(0)&&(b="#"+b);p(b);a.hideDialog()});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(n);null!=c&&("none"==c?(g.fromString("ffffff"),k.value="none"):g.fromString(c));h.appendChild(m);this.picker=g;this.colorInput=k;mxEvent.addListener(h,"keydown",function(c){27==c.keyCode&&(a.hideDialog(),null!=b&&b(),mxEvent.consume(c))});this.container=h};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");c.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(d);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);d=document.createElement("a");d.setAttribute("href",
-"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,f,e,h,g,k,l){k=null!=k?k:!0;var m,p,n=document.createElement("table"),q=document.createElement("tbody");n.style.marginTop="8px";m=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace=
-"nowrap";p.style.fontSize="10pt";p.style.width="120px";mxUtils.write(p,(f||mxResources.get("filename"))+":");m.appendChild(p);var t=document.createElement("input");t.setAttribute("value",c||"");t.style.marginLeft="4px";t.style.width="180px";var r=mxUtils.button(d,function(){if(null==e||e(t.value))k&&a.hideDialog(),b(t.value)});r.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():
-document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=n.parentNode,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=t,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")&&(t.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),r.click());a.stopPropagation();a.preventDefault()}))}};p=document.createElement("td");p.appendChild(t);m.appendChild(p);null==f&&null!=h||q.appendChild(m);null!=h&&(m=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(h),m.appendChild(p),q.appendChild(m));m=document.createElement("tr");p=document.createElement("td");p.colSpan=
-2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&p.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",p.appendChild(d));mxEvent.addListener(t,"keypress",function(a){13==a.keyCode&&r.click()});p.appendChild(r);a.editor.cancelFirst||p.appendChild(c);m.appendChild(p);
-q.appendChild(m);n.appendChild(q);this.container=n},TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,p){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var n,q,t=document.createElement("table"),r=document.createElement("tbody");n=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);n.appendChild(q);r.appendChild(n);n=document.createElement("tr");q=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap",
-"off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.width=h+"px";w.style.height=g+"px";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};q.appendChild(w);n.appendChild(q);r.appendChild(n);n=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");
-c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=k&&k(q);null!=b&&(k=mxUtils.button(p||mxResources.get("apply"),function(){l||a.hideDialog();b(w.value)}),k.className="geBtn gePrimaryBtn",q.appendChild(k));a.editor.cancelFirst||q.appendChild(c);n.appendChild(q);r.appendChild(n);t.appendChild(r);this.container=t},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";
+"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,f,e,k,g,h,l){h=null!=h?h:!0;var m,n,p=document.createElement("table"),q=document.createElement("tbody");p.style.marginTop="8px";m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace=
+"nowrap";n.style.fontSize="10pt";n.style.width="120px";mxUtils.write(n,(f||mxResources.get("filename"))+":");m.appendChild(n);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width="180px";var t=mxUtils.button(d,function(){if(null==e||e(r.value))h&&a.hideDialog(),b(r.value)});t.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==k)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():
+document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=p.parentNode,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=r,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")&&(r.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),t.click());a.stopPropagation();a.preventDefault()}))}};n=document.createElement("td");n.appendChild(r);m.appendChild(n);null==f&&null!=k||q.appendChild(m);null!=k&&(m=document.createElement("tr"),n=document.createElement("td"),n.colSpan=2,n.appendChild(k),m.appendChild(n),q.appendChild(m));m=document.createElement("tr");n=document.createElement("td");n.colSpan=
+2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&n.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",n.appendChild(d));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&t.click()});n.appendChild(t);a.editor.cancelFirst||n.appendChild(c);m.appendChild(n);
+q.appendChild(m);p.appendChild(q);this.container=p},TextareaDialog=function(a,c,d,b,f,e,k,g,h,l,m,n){k=null!=k?k:300;g=null!=g?g:120;l=null!=l?l:!1;var p,q,r=document.createElement("table"),t=document.createElement("tbody");p=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap",
+"off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.width=k+"px";w.style.height=g+"px";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};q.appendChild(w);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");
+c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=h&&h(q);null!=b&&(h=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(w.value)}),h.className="geBtn gePrimaryBtn",q.appendChild(h));a.editor.cancelFirst||q.appendChild(c);p.appendChild(q);t.appendChild(p);r.appendChild(t);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";
var d=document.createElement("textarea");d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();
a.preventDefault()},!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var f=document.createElement("select");f.style.width="180px";f.className=
"geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),
-f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),a.editor.graph.openLink(a.getUrl());else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==
-f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};
+f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),a.editor.graph.openLink(a.getUrl());else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==
+f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};
EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+p.value:a+"."+p.value;"xml"===p.value?(n.setAttribute("disabled","true"),q.setAttribute("disabled","true"),t.setAttribute("disabled","true"),w.setAttribute("disabled","true")):(n.removeAttribute("disabled"),q.removeAttribute("disabled"),t.removeAttribute("disabled"),w.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled")}
-function d(){q.style.backgroundColor=q.value*t.value>MAX_AREA||0>=q.value?"red":"";t.style.backgroundColor=q.value*t.value>MAX_AREA||0>=t.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,
-mxResources.get("filename")+":");f.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");f.appendChild(k);var p=document.createElement("select");p.style.width="180px";k=document.createElement("option");k.setAttribute("value",
-"png");mxUtils.write(k,mxResources.get("formatPng"));p.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),p.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));p.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));p.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),p.appendChild(k));k=document.createElement("td");k.appendChild(p);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");f.appendChild(k);var n=document.createElement("input");
-n.setAttribute("type","number");n.setAttribute("value","100");n.style.width="180px";k=document.createElement("td");k.appendChild(n);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");f.appendChild(k);var q=document.createElement("input");q.setAttribute("value",h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");
-k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("value",g);t.style.width="180px";k=document.createElement("td");k.appendChild(t);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var r=document.createElement("input");r.setAttribute("type",
-"checkbox");r.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px";
-k=document.createElement("td");k.appendChild(w);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(n,"change",function(){var a=Math.max(0,parseFloat(n.value)||100)/100;n.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),t.value=Math.floor(g*a)):(n.value="100",q.value=h,t.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(n.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(g*a)):(n.value=
-"100",q.value=h,t.value=g);d()});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value)/g;0<a?(n.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(n.value="100",q.value=h,t.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var v=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(n.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
-m.value,d=p.value,e=Math.max(0,parseFloat(n.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));v.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst?(k.appendChild(u),k.appendChild(v)):(k.appendChild(v),k.appendChild(u));f.appendChild(k);
+var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),w.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),w.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}
+function d(){q.style.backgroundColor=q.value*r.value>MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,k=Math.ceil(f.width/e),g=Math.ceil(f.height/e),h,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";h.style.width="100px";mxUtils.write(h,
+mxResources.get("filename")+":");f.appendChild(h);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";h=document.createElement("td");h.appendChild(m);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("format")+":");f.appendChild(h);var n=document.createElement("select");n.style.width="180px";h=document.createElement("option");h.setAttribute("value",
+"png");mxUtils.write(h,mxResources.get("formatPng"));n.appendChild(h);h=document.createElement("option");ExportDialog.showGifOption&&(h.setAttribute("value","gif"),mxUtils.write(h,mxResources.get("formatGif")),n.appendChild(h));h=document.createElement("option");h.setAttribute("value","jpg");mxUtils.write(h,mxResources.get("formatJpg"));n.appendChild(h);h=document.createElement("option");h.setAttribute("value","pdf");mxUtils.write(h,mxResources.get("formatPdf"));n.appendChild(h);h=document.createElement("option");
+h.setAttribute("value","svg");mxUtils.write(h,mxResources.get("formatSvg"));n.appendChild(h);ExportDialog.showXmlOption&&(h=document.createElement("option"),h.setAttribute("value","xml"),mxUtils.write(h,mxResources.get("formatXml")),n.appendChild(h));h=document.createElement("td");h.appendChild(n);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("zoom")+" (%):");f.appendChild(h);var p=document.createElement("input");
+p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";h=document.createElement("td");h.appendChild(p);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("width")+":");f.appendChild(h);var q=document.createElement("input");q.setAttribute("value",k);q.style.width="180px";h=document.createElement("td");h.appendChild(q);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");
+h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("height")+":");f.appendChild(h);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";h=document.createElement("td");h.appendChild(r);f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("background")+":");f.appendChild(h);var t=document.createElement("input");t.setAttribute("type",
+"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;h=document.createElement("td");h.appendChild(t);mxUtils.write(h,mxResources.get("transparent"));f.appendChild(h);l.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("borderWidth")+":");f.appendChild(h);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px";
+h=document.createElement("td");h.appendChild(w);f.appendChild(h);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<k?(q.value=Math.floor(k*a),r.value=Math.floor(g*a)):(p.value="100",q.value=k,r.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/k;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(p.value=
+"100",q.value=k,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(k*a)):(p.value="100",q.value=k,r.value=g);d()});f=document.createElement("tr");h=document.createElement("td");h.setAttribute("align","right");h.style.paddingTop="22px";h.colSpan=2;var v=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
+m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));v.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst?(h.appendChild(u),h.appendChild(v)):(h.appendChild(v),h.appendChild(u));f.appendChild(h);
l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,c,d,b,f,e){var h=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(b,f,e)),c,d);else{var g=h.getGraphBounds(),k=mxUtils.createXmlDocument(),l=k.createElement("output");k.appendChild(l);k=new mxXmlCanvas2D(l);k.translate(Math.floor((e/f-g.x)/h.view.scale),Math.floor((e/f-g.y)/h.view.scale));k.scale(f/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
-k);l="xml="+encodeURIComponent(mxUtils.getXml(l));k=Math.ceil(g.width*f/h.view.scale+2*e);f=Math.ceil(g.height*f/h.view.scale+2*e);l.length<=MAX_REQUEST_SIZE&&k*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+k+"&h="+f+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+ExportDialog.exportFile=function(a,c,d,b,f,e){var k=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(k.getSvg(b,f,e)),c,d);else{var g=k.getGraphBounds(),h=mxUtils.createXmlDocument(),l=h.createElement("output");h.appendChild(l);h=new mxXmlCanvas2D(l);h.translate(Math.floor((e/f-g.x)/k.view.scale),Math.floor((e/f-g.y)/k.view.scale));h.scale(f/k.view.scale);(new mxImageExport).drawState(k.getView().getState(k.model.root),
+h);l="xml="+encodeURIComponent(mxUtils.getXml(l));h=Math.ceil(g.width*f/k.view.scale+2*e);f=Math.ceil(g.height*f/k.view.scale+2*e);l.length<=MAX_REQUEST_SIZE&&h*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+h+"&h="+f+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function d(){0<r.value.length?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var g=new mxForm("properties");g.table.style.width="100%";for(var h=e.attributes,k=[],l=[],m=0,p=function(a,b){var c=document.createElement("div");c.style.position="relative";
+var EditDataDialog=function(a,c){function d(){0<t.value.length?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",e||"");e=k}var g=new mxForm("properties");g.table.style.width="100%";for(var k=e.attributes,h=[],l=[],m=0,n=function(a,b){var c=document.createElement("div");c.style.position="relative";
c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin="0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);
-e=function(a){return function(){for(var b=0,c=0;c<k.length;c++){if(k[c]==a){l[c]=null;g.table.deleteRow(b);break}null!=l[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},n=function(a,b,c){k[a]=b;l[a]=g.addTextarea(k[m]+":",c,2);l[a].style.width="100%";p(l[a],b)},q=[],t=0;t<h.length;t++)"label"!=h[t].nodeName&&"placeholders"!=h[t].nodeName&&q.push({name:h[t].nodeName,value:h[t].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:
-a.name>b.name?1:0});for(t=0;t<q.length;t++)n(m,q[t].name,q[t].value),m++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";h.appendChild(g.table);n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.marginTop="6px";var r=document.createElement("input");r.setAttribute("placeholder",mxResources.get("enterPropertyName"));r.setAttribute("type","text");r.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":
-"22");r.style.marginLeft="2px";n.appendChild(r);h.appendChild(n);b.appendChild(h);var w=mxUtils.button(mxResources.get("addProperty"),function(){var a=r.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(k,a);if(0<=b&&null!=l[b])l[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(k.splice(b,1),l.splice(b,1));k.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);p(c,a);c.focus()}r.value=""}catch(A){mxUtils.alert(A)}else mxUtils.alert(mxResources.get("invalidName"))});
-this.init=function(){0<l.length?l[0].focus():r.focus()};w.setAttribute("disabled","disabled");w.style.marginLeft="10px";w.style.width="144px";n.appendChild(w);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<k.length;d++)null==l[d]?e.removeAttribute(k[d]):(e.setAttribute(k[d],l[d].value),b=b||"placeholder"==k[d]&&"1"==
-e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});n.className="geBtn gePrimaryBtn";mxEvent.addListener(r,"keyup",d);mxEvent.addListener(r,"change",d);q=document.createElement("div");q.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){t=document.createElement("span");t.style.marginRight="10px";var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});t.appendChild(v);mxUtils.write(t,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){v=document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);
-v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="10px";v.style.cursor="help";var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("valign","middle");u.style.marginTop=mxClient.IS_IE11?"0px":"-4px";u.setAttribute("src",Editor.helpImage);v.appendChild(u);t.appendChild(v)}q.appendChild(t)}a.editor.cancelFirst?(q.appendChild(h),q.appendChild(n)):(q.appendChild(n),q.appendChild(h));b.appendChild(q);this.container=b};
+e=function(a){return function(){for(var b=0,c=0;c<h.length;c++){if(h[c]==a){l[c]=null;g.table.deleteRow(b);break}null!=l[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},p=function(a,b,c){h[a]=b;l[a]=g.addTextarea(h[m]+":",c,2);l[a].style.width="100%";n(l[a],b)},q=[],r=0;r<k.length;r++)"label"!=k[r].nodeName&&"placeholders"!=k[r].nodeName&&q.push({name:k[r].nodeName,value:k[r].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:
+a.name>b.name?1:0});for(r=0;r<q.length;r++)p(m,q[r].name,q[r].value),m++;k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";k.appendChild(g.table);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.marginTop="6px";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("enterPropertyName"));t.setAttribute("type","text");t.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":
+"22");t.style.marginLeft="2px";p.appendChild(t);k.appendChild(p);b.appendChild(k);var w=mxUtils.button(mxResources.get("addProperty"),function(){var a=t.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(h,a);if(0<=b&&null!=l[b])l[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(h.splice(b,1),l.splice(b,1));h.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(A){mxUtils.alert(A)}else mxUtils.alert(mxResources.get("invalidName"))});
+this.init=function(){0<l.length?l[0].focus():t.focus()};w.setAttribute("disabled","disabled");w.style.marginLeft="10px";w.style.width="144px";p.appendChild(w);k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});k.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<h.length;d++)null==l[d]?e.removeAttribute(h[d]):(e.setAttribute(h[d],l[d].value),b=b||"placeholder"==h[d]&&"1"==
+e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});p.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keyup",d);mxEvent.addListener(t,"change",d);q=document.createElement("div");q.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";var v=document.createElement("input");
+v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});r.appendChild(v);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){v=document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);
+v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="10px";v.style.cursor="help";var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("valign","middle");u.style.marginTop=mxClient.IS_IE11?"0px":"-4px";u.setAttribute("src",Editor.helpImage);v.appendChild(u);r.appendChild(v)}q.appendChild(r)}a.editor.cancelFirst?(q.appendChild(k),q.appendChild(p)):(q.appendChild(p),q.appendChild(k));b.appendChild(q);this.container=b};
EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
-"text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";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=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
-0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});e.appendChild(h);e.appendChild(c);f.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
-b(h.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);d=mxUtils.button(d,function(){a.hideDialog();b(h.value)});d.className="geBtn gePrimaryBtn";e.appendChild(d);a.editor.cancelFirst||e.appendChild(c);f.appendChild(e);this.container=f},OutlineWindow=function(a,c,d,b,f){function e(){l.outline.pageScale=h.pageScale;l.outline.pageFormat=h.pageFormat;l.outline.pageVisible=h.pageVisible;l.outline.background=null==
-h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;var a=mxUtils.getCurrentStyle(h.container);g.style.backgroundColor=a.backgroundColor;null!=h.view.backgroundPageShape&&null!=l.outline.view.backgroundPageShape&&(l.outline.view.backgroundPageShape.fill=h.view.backgroundPageShape.fill);l.outline.refresh()}var h=a.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.border="1px solid whiteSmoke";
+var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type",
+"text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";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=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
+0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});e.appendChild(k);e.appendChild(c);f.appendChild(e);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(k,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
+b(k.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);d=mxUtils.button(d,function(){a.hideDialog();b(k.value)});d.className="geBtn gePrimaryBtn";e.appendChild(d);a.editor.cancelFirst||e.appendChild(c);f.appendChild(e);this.container=f},OutlineWindow=function(a,c,d,b,f){function e(){l.outline.pageScale=k.pageScale;l.outline.pageFormat=k.pageFormat;l.outline.pageVisible=k.pageVisible;l.outline.background=null==
+k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background;var a=mxUtils.getCurrentStyle(k.container);g.style.backgroundColor=a.backgroundColor;null!=k.view.backgroundPageShape&&null!=l.outline.view.backgroundPageShape&&(l.outline.view.backgroundPageShape.fill=k.view.backgroundPageShape.fill);l.outline.refresh()}var k=a.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.border="1px solid whiteSmoke";
g.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),g,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var k=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",k);var l=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",k);this.window.destroy();l.destroy()};this.window.addListener(mxEvent.RESIZE,
+document.body.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 h=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",h);var l=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",h);this.window.destroy();l.destroy()};this.window.addListener(mxEvent.RESIZE,
mxUtils.bind(this,function(){l.update(!1);l.outline.sizeDidChange()}));this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){l.suspended=!1;l.outline.refresh();l.update()}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){l.suspended=!0}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){l.suspended=!1;l.update()}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){l.suspended=!0}));var m=l.createGraph;l.createGraph=function(a){var b=
-m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=h.pageScale;b.pageFormat=h.pageFormat;b.background=null==h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;b.pageVisible=h.pageVisible;var c=mxUtils.getCurrentStyle(h.container);g.style.backgroundColor=c.backgroundColor;return b};l.init(g);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",
-function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var p=a.actions.get("zoomIn"),n=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?p.funct():n.funct(),mxEvent.consume(a))})}},LayersWindow=function(a,c,d,b,f){function e(b){if(g.isEnabled()&&null!=b){var c=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),
-mxUtils.bind(this,function(a){null!=a&&g.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var f=document.createElement("div");f.className="geToolbarContainer";f.style.overflow="hidden";f.style.position="relative";f.style.padding="4px";f.style.height="22px";f.style.display="block";f.style.backgroundColor="whiteSmoke";f.style.borderWidth="0px 0px 1px 0px";f.style.borderColor="#c3c3c3";f.style.borderStyle="solid";
-f.style.whiteSpace="nowrap";var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(f,"dragover",function(b){b.dataTransfer.dropEffect="move";n=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){p=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(f,"dragend",function(a){null!=p&&null!=n&&g.addCell(c,g.model.root,n);n=p=
-null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var r=g.view.getState(c),u=null!=r?r.style:g.getCellStyle(c);"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,
-"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";
-l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);f.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position=
-"absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<q-1&&(k=document.createElement("a"),k.setAttribute("title",
-mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",
-function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="#e6eff8",f.style.fontWeight=g.isEnabled()?"bold":"",t=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
-b));w.setAttribute("title",mxResources.get("removeIt",[t.value||mxResources.get("background")]));v.setAttribute("title",mxResources.get("moveSelectionTo",[t.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("duplicateIt",[t.value||mxResources.get("background")]));u.setAttribute("title",mxResources.get("renameIt",[t.value||mxResources.get("background")]));g.isSelectionEmpty()&&(v.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect=
-"none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":"#e5e5e5";m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";k.appendChild(m);
-var p=null,n=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";n=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,t=null,r=document.createElement("div");r.className="geToolbarContainer";r.style.position="absolute";r.style.bottom="0px";r.style.left="0px";r.style.right="0px";r.style.height=l;r.style.overflow="hidden";r.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";r.style.backgroundColor=
-"white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;r.style.borderWidth="1px 0px 0px 0px";r.style.borderColor="#c3c3c3";r.style.borderStyle="solid";r.style.display="block";r.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(r.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();
-try{var b=g.model.root.getIndex(t);g.removeCells([t],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");r.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
-mxEvent.addListener(v,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,t)});r.appendChild(v);var u=l.cloneNode();u.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';u.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(u,"click",function(a){g.isEnabled()&&e(t);mxEvent.consume(a)});g.isEnabled()||(u.className="geButton mxDisabled");r.appendChild(u);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
-mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCells([t])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");r.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));
-mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");r.appendChild(l);k.appendChild(r);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?v.className="geButton mxDisabled":v.className="geButton"});
-this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=h;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)-
+m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=k.pageScale;b.pageFormat=k.pageFormat;b.background=null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background;b.pageVisible=k.pageVisible;var c=mxUtils.getCurrentStyle(k.container);g.style.backgroundColor=c.backgroundColor;return b};l.init(g);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",
+function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var n=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?n.funct():p.funct(),mxEvent.consume(a))})}},LayersWindow=function(a,c,d,b,f){function e(b){if(g.isEnabled()&&null!=b){var c=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),
+mxUtils.bind(this,function(a){null!=a&&g.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function k(){function a(a,b,c,d){var f=document.createElement("div");f.className="geToolbarContainer";f.style.overflow="hidden";f.style.position="relative";f.style.padding="4px";f.style.height="22px";f.style.display="block";f.style.backgroundColor="whiteSmoke";f.style.borderWidth="0px 0px 1px 0px";f.style.borderColor="#c3c3c3";f.style.borderStyle="solid";
+f.style.whiteSpace="nowrap";var h=document.createElement("div");h.style.display="inline-block";h.style.width="100%";h.style.textOverflow="ellipsis";h.style.overflow="hidden";mxEvent.addListener(f,"dragover",function(b){b.dataTransfer.dropEffect="move";p=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){n=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(f,"dragend",function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=
+null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var t=g.view.getState(c),u=null!=t?t.style:g.getCellStyle(c);"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,
+"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});h.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";
+l.style.marginTop="4px";h.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(h,b);f.appendChild(h);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position=
+"absolute",b.style.right="6px",b.style.top="6px",0<a&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toBack")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<q-1&&(h=document.createElement("a"),h.setAttribute("title",
+mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",
+function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="#e6eff8",f.style.fontWeight=g.isEnabled()?"bold":"",r=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),k())});m.appendChild(f)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
+b));w.setAttribute("title",mxResources.get("removeIt",[r.value||mxResources.get("background")]));v.setAttribute("title",mxResources.get("moveSelectionTo",[r.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("duplicateIt",[r.value||mxResources.get("background")]));u.setAttribute("title",mxResources.get("renameIt",[r.value||mxResources.get("background")]));g.isSelectionEmpty()&&(v.className="geButton mxDisabled")}var g=a.editor.graph,h=document.createElement("div");h.style.userSelect=
+"none";h.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;h.style.border="1px solid whiteSmoke";h.style.height="100%";h.style.marginBottom="10px";h.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":"#e5e5e5";m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";h.appendChild(m);
+var n=null,p=null;mxEvent.addListener(h,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(h,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,r=null,t=document.createElement("div");t.className="geToolbarContainer";t.style.position="absolute";t.style.bottom="0px";t.style.left="0px";t.style.right="0px";t.style.height=l;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";t.style.backgroundColor=
+"white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();
+try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");t.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
+mxEvent.addListener(v,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,r)});t.appendChild(v);var u=l.cloneNode();u.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';u.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(u,"click",function(a){g.isEnabled()&&e(r);mxEvent.consume(a)});g.isEnabled()||(u.className="geButton mxDisabled");t.appendChild(u);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
+mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCells([r])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");t.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));
+mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");t.appendChild(l);h.appendChild(t);k();g.model.addListener(mxEvent.CHANGE,function(){k()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?v.className="geButton mxDisabled":v.className="geButton"});
+this.window=new mxWindow(mxResources.get("layers"),h,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=k;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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeKNzGAFJgWOKBdVznGCrFreM/HKITETdyKkM/N9DIDf2cRv0kkURtlU9wqmbZi0/PyWLbc1lyFPVML+0A1ISRx9xkOHMcnWTLiNmB8o4kjikjlm8b+zuQa+bh2qVmG/Gis+HAYE2zZHj9dAqLgPvJXahkWNuP0g0zcIlzrGtpFoK369Qp4fI78Vsse53lGDRGrMlOTTcK/GLUGcjKBk0xzyUesPi+L0VaKqwwAyJsZa1QTJg91Gn6b9BZebsYZ4EWlt2PIafME3WhvvJUC5Te5e2Njdi/n1Ck0qQDos8HmD1qimQAitlmqT6ctQuZDXuvnbYFeZDs2aGrHO/ahjiEB4oTQTESnp0FepuPqhLWeNGFz7OU3sdshlglzYxrUSzgBfmUpPpU8LfSSohuypUtyJVgTLzrapCYpy/3+DL1HLo4Th1tUbgDZjTrfLmYw6DMgpLG2I0PG/UXEiQW/NOdmUJieZWIW7X2uGxpS6pFOc56RJq59+ZiCutggPcaHoJq215aQnIhaXijIqAeoxY7hd6Pc9k/OvTeBi2SZ1U2lbpyNMkVUe2s1qpcEWpG5OW6/NQdOd1ghkTpgtRg1wd2O6nlP+f9Z8vZxfwynOo0yIS1pbu8OYu/Ocu/NVvUEv/5QzTGH+Y/OUEhn0BCXOdv2nZeStgGca+Qv6L7k7ply5yV/GeD8QLo1fUJVis52OdLdW54KDcdgnh5SdDsZ1NSMYB+OZKdzeemUTU5L0JH3kifOr+pplSdm3E9EwTKCDlNXeHjlznnbgWmcIlpZ0X/QQUdT2COw2+VZ0Kd6fBVlGvct2JMGdqdWQlzxMsG9Lo4HwchpO8t1pWzpe2cgxAAVrpeJrPA7zNF9SNx/N87cjBBXSnvLwsp4dPfK3sokXMwDiMauCrQEoVB2i9Bey9fj1h7/HRJWrVmXWaWeIi7ipTkTAdgiPDQphRZj22Bi7lq0fTbl2h0w0Tqg9OxgJ1nM/N6pIbiuZFE7liXfNo+vgERvfzSXkOrzSvVyFHBcuMJ6842apogGJHR51E2SWhBdl+REqP2OxKZIIDgS1TvqL5thqqCp6rgOvhBuYDTzwWmGsXEa71wwPk6zVcaZ47FkIjrJ6EqIZWLa7GMGIMmfmrW7EkNyArDMx8JmnhXlRB+321oo7PVnGvtapXsMwFw7kK/T2OSkWUpKp6+rYKrf/QRJeC6XD9w7ZpIF8CKtBcndvXI4uwewNXTBbHgYD5lo7YSR8sXymxhuVQrDNd4QtSB57RDp0K6Mm0O58nzb3DPoRyycB6JGn8MI7Anx2JPz8S/7kvXgpa79KqQ9HSTcBQ/4Dq0CotVVIe+nbu0/xkKWrPqZS05LyFLzx75yLJzx01EPRQJJW0vr5Ab1tYrMEaHdBdYnvoZrEA9Gg9ZohAmVtHhi359DlmAzyd92ievajkqEH/qHu+GnJYvo0JiMiv9m2vyT6h9WtStVreDrmUaYqylUmW9stWHl2ZhEr0QArLCm8gZwSuUij6ur3sc1PQFH7uT92evohejWaqqiltuElXXLmm/j+A3FjIVhsDuAQF1ydoG5BfGf87K1xIBdNpVK4S5xSjiyiSqXUn+oTtLzTmgdat7X4fNUyTY5imMgjIJXajR7XrgFU4I1Yj9z1PktyDoh1a69DRhEJPs9MSNoQvnJbIC5I5i82MfOy0OrWPXxSlbhwbwJ6vXeg7gIOHiil9HgQiTuwsYHWjr8NPeuOloiEoiV5XaDXoLAyNw1gWeda9L4NqX7NyvM/wpG3jZMXLa0aqbhGSsAFn0UuozURaL35jQQYGiTYcOKvsWCqRo2sRiYS26NxI6cPaVypx9ktnQdhXoNENLhtzM0/kZ3aeyLjHkczYqnhzu9ph/Z6liSi5G+P6TyFokoHR3FRfd9ie9YiCNrGY5SezVumCvRCoMEGUr5BFNCpS1oeBfqvWtnoQpKSAWhFK3EnQpJrNw+T0/cv401zY3LzE1TG/bT23nQQGnZGvh73YYAcmnIx/bsw2i+oq1JX6WLqFriXpUPlYSTZEfrYSf1BG9KKdg180DntLtdt48jVOf1iCvzLhveoeWqIBnV8syacIb5f7q8qNJMaS60e0sM8le6A9vkYOrShobmsmEhgugo691r1yQrtqXCtFI4+uD6aMOhRWwTjHybOe4lhwLxn0ANpM+Z2Yib+G2aAcpGvuSvAABIZafAJ2Et22IcEVW4us6wfq+C6S7kDBQsCcas+wbYINImS/0R7YcrQGi10FbJvU4Ua6m3mxj9J+pQVnCqd2rEttYr9oSL+eB7bmXeu/IU+ZTzZPf+Ir4x9kPrpAF1cLSNL6C1tPo2LHhSPNww7N3t7JPmyTMb3VZPywRzZoIt+enuYfnYbdoTEY6187mW23DfShmYyLPT4DEf5l0UfT/bwu08B8uRnq9mGCZWRP+GSoDsZpvH57U5ppvhet7F6MNzSYt1dTGkgx8LsuqYaeVNrCuL+tIwxz53URloZcHchRr/00+20P07A7cftJPgO3BzSObqMkNTPyh4nQhoxi6C+Kh7umeGXIdYrzyrTE4d5rV+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg837JK1nNA2OOekn+dT/fCb2WwBbrLizezlPixWZ8bSBMBkfKP5KGDE8MncwhpdhPvfPzKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvPK59fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hI4CU1LD5pjsLmKV+V7LRWsksxg1IcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng/2Y6I//yONAG9BDsy/0hb98H4T2Hv7QJtJBMyPfgD54Nn9XzMNV9SGpaSsqKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIARPglobh11LlMYfykB2l7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCsCUTpGAQ6tuLe/08bUXGeA7Ms1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjECUbNApnkPOgUeM/X3eCrRwyjB44eY2kUW34pDKElvowWzyKrfPim8g6prYrSdGFbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWAbhqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgtxO0xUsg9OYDJGlyEbzSFpS1HaoA990z06HU8knhzZKFZAVIpoVV/L92CjS6WtHnxx8r5FZ4xmPbZPYSMdQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRiF2Sk8FlPjIwyemeTOGHtHJCIiCOR0sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEra2FrFD0fVEJwXKwldJ25PbrDKdG6T+y2FbhlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPBLSTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiypwg8lxB5eMgqVVuZanqbKm6MWRxY9lBCxLhk9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPG5yYKpu6aZ3cv+m5HAb00cnVgRBzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C0URSHz/MioFee56VEdMY8L6Zn4/H4j64J+jq/IUgmzp+b6y6wEYxlgxIykG1Rnohhky3pFde0sAJNcHzJEg7bJCks5iZrXimpI5rC90ezHIe2hvdxLPtLT+vGRajDkGp7CYT67+hf/B0KezcseyPicb7Q//TPKq5zGD7AVEZwdULma3qeVjJ2S57b61YwSp+Hph8BE1dXDgpQOjcGb+4p2SrbAdM3KdPcbjaf3VnymLd5WP3beUk+j7fsaqrn9TkFJPQrFsNcGBZy1fn98ihC1q+7DaDQ1oZqouwycRukFLu3dNmOgkittj46JoQQiBge6qE3zdklpmeydmfxSwdGCKWYi9Gw3aQOW5ZhVeZyJcFB35Yvc2AIX5xYT8lmDuyBqGnbgCttmK3uIAKaf9iKlahB3CBCP+hRsMARW0IkMy8dzS7A6PXFWtBxF0yb1JJOhojg6IqKWFkNZDzMIFCirvAwwaIr7K+WkNhVLLocKNmlbjNx2x6lKob77NeplWVXkmbJ2kgP6LoxmMDQJnrgRQixmXBHdhgHEO11GMbJcYxPF0YqWeLWYzXYy6PrBOx6MQuYNYk40E8+lv7so+hhS5RdIZybEIxJ7RrQAY/HYuYJYxPmN93Ro2mOpaLKnJtIDclkCBLIdnpKBu809V/B2YEQ9rFnzXF120k+DyHVvWn16MhY4oLxfZEUdGfgX8JJf4YhBSXl2riksJ0fl+Yc48rnacYyEc5p+kJbKDRMIc8YJ5TJ09OQexsW4VeTUzoFaZFHC9vWOfu40N3JzE/yubPiqi/fPEs25XHeA/R8EazqB3igGIZaadjY2JH9+y67VkgNe3SbuSkWPY1MtR4aXPYK/r7SC+6df/o6upieXkyJMbcictOiI9GslqgwW9z5ZkOSYUybzp1tCT0ZXwoa49uuqi/bZWEsrawB1RVvovH2ws8u9jK2wqZ0J6uoPkfyHdSigq/G1G2hFKsVV/nu8OOqwlXkqfcYV+Ujr4MSNvBv4piSv5N90S+6GISHsyroG8kqHFXr0GiLkSlkrztjR7cWaQxpYQKduHV8lTxnA/F8PoaHds5r9cvtqwllZuaP5Jr04rKxrai0aiNdteNB6XEtitG9YVy6dGx/u3UO7+rqXgt8BIeZbHRmSDrxBfxX7ozPnDnQxIkSZtd4ALvjNdHoOktsECndRI7iwMLi3LlRVZLgaGiZyIC7t85KovOjpLkNggwW7MwhRJdZAPMhwn4LrDY4HH4u6YFOaWCQOcp6yyXKyXaX2jBOBmREmsMMILbD/OiTDw8ch6gm5l5rEsfQm0o6QBIyWfE0gbKjyxM4p6UhNEcFdjSjpRyY14cFqO+L6ytY9Xg42RmGgd0b7Qfb70kNm9lKo61e1DnZ7XQgYXcZB5UR1hDw/AxdgV+HFHW+R3ysxA+nFlYqrk8nDQPyXoyTwRnPBmc8H5zx8+CMX45hnNeVde1ESC/GyeCMZ4Mzng/O+Hlwxi/9GaEI+vYPk8F1Qg3jETqhhvEInVDDeIROqGE8QifUMB6hEyaD64QaxiN0Qg3jETqhhvEInVDDeIROqGHsoxNknMoXM58ZCS8ZfcX127U5iH2Wh61O+Fvt8V59WXNf/tm8lILPPRGSP8XhGV1Oqf1Z8w6RqHUU6Eu6+womgePf4O5qtjcK46FI7Xmfh4sMHUgnA5MC1SnzUnR9wVj7UwjOkHgUfiQwR7Tlnl8wxY6ztXuTfE6pfddfnHoyi8mDDH4v7vqVK1Li6qZIaAYNHtn5oh/xfCNTabM1hpvqbK7le9GjQwwIhWPQ3eXYDmuvceC9BMz3uYIjmnUBfc/SOLNRNdvOdnYimvQmGkCW3lLAHouXRLcBs6wtjQtO6YtjuEY3T9+L5tDeEMz8W5rhMRpytYKbzbsytdA52dubqe2n7RkdmJbhR7+g1HxX4u/+fiahyYcn9IBud7c3l8V7JVmwm9pSxJIO16tsuv3SmvwX0zr7L6Z1/rFpzR/m/7Xy2knrg8trJ60PLq+dtD64vEBF2cjozv119wQmH5jArfXCwy1oVdqmnlFxyjr09OTdev1ErHWH/JLkcYfpqh98hCu2C8vAYC3RTAF75tSxHqSzEqk5mQOXy4dknXwI69lArM8YbPtNBmlb7O4GDlzfPZpj0p0k3cA+LbApXyhkLjoaNZ1d40BB1qnx4LbGaaVDdyVfrm6SOuXjit+Ztvhn5XTSf1wnqVpoJwPQzqul7TrsbqHsMyOyZW8c1qjRj9lcN2KFTL6OQInikrRX6yS+//ToApuTp3ibs0IZg4FVMCYjRjJIRUgRfEIR+U3L1iWOS4pZo3iMDlXOmK3ZLat01ZcZaXk4OMWRAEbHyQbdepby8BD7ShA1JGaiyXR7SylfMSnZdCJ3BQxEKyITQKzeRvfFMlYJvjKn3KVSBlWvWQOdsoBHvomT7l4dphsME+CLxMuSuvNoKoG79cfmsANQhrpFYVgNXzSPEXdQaKTQuBCnSsyR43ownoqKMwoqSTDc2X/YG3NN1pw20RyYrxLIjY+CrnKyRXeUYcWhIJ6MnRuXhWGHVFDELGnyJNkh2OKMnw11g4Ygd622V/bY+cn4H1dhnL7j7ss8brDizK2Jl3lM2GFgyqJKhjqSd7TIMX64iWZRLOk3nS1T4rgOWLLZceFwTf1aBqRfpFqzSPx2LnkCGte1ljM3dmDKaNXIxFtn+wc41SBvWIalAw242V4ogwI6tnGtP2t3cB6gvnE6eWjDtSVdtxPoECVRszSFIjnA3JXcTA6dXOigrHLNaKWLMDhbOXaomxw2eFN+ylHr5p9d9CuOxmLmGzVbeTBsNVa+klvSjTkTqSZcfA3+3kSKz1svt42yCP7eRpFjPepdikOenMHJjgyGxwFdjlPyJskyh+TpZEut1OQ6EnkQdyXa+IozQvPFCzdBJG2YyE/Ii/6HPnXBRNJ0uWmmlq08CcyoPgu+5XRoBzo61vWBMqbth22kb6Bj8RyhXGExPDHH+QUfJHYtekSFORtmCfouAkUgKs6QOyD4rm2dKD8L7M7E1dLGLK49KZlHcKjM+SpG3MZEGyx4hVFZh1IcnZ+9vQx0MDOq6cQb80Ba44HuJMQjz7vdleIJncQXc6z1iqfK4e0fi+cLipzVkYIe6y/Eopxp1fm6n58eur+vuTmvpZJ1Q2EGs9i8j1OeLvRQISZVOKX+Z5k5V++F7oTNWW0p6RITC84nS6kNrkcM+b7oxu3jh9AUc0JVO2XWgmS8LaJxtljmNQwHAxZfsZqzfA/hGTZVbKaOtlcVjTndDjV3w2Elhzh5MDZwwylt6Hm4CV33De8U3XYpnPv5H3HnavmDgt3AYbLMhv5gnlv3lkckbNf/u83PgdQsSMuMuoOKyNBV4J8soGhI1LbM8NwBJ66h7y1t+W6BYdiHqT0vsDhC0AlmZix3gmrStI6LSYccnQd0hCJtYU/oc4Fc/YrJWLGg1pJAmDnLt0tKd7rWGv1o8zUxh0e5ETzarPB5q0d+CWVsoi6iLuyZYf/4JpX4DU0mgKFhzXlhDjzP0Ga8niw42wdtd8MrzPIaUDe9jhhUL035tEYAnVM4Yj5s/RIJ8dccDVqB88zUEW3lzqeRHHAKxmbB6EEPPU+1HfV2sjO5507QBwvHclIoEjydTFtegtsjbu1nO0sxrWQuXVAwowseJnbKxVy6QPVzGUm9zNIUp160/j6hKMPgQ6Z/hwalvzSWRkjftNAaNZfgfq0LU2Pi3CDuSPCNNFBX/A03PRrO1PIUNZfpqk5aOqdKQjMYtaZAMSBsFkZXCFwOYUtYqG2JVRXjYYixMOe0Fhu88o5CSRNpm0drEXGudhtwmWkyHNWIwZ5Os7JjryE/U6F7s0qrrAI7urBIrfOmSibJ6SVnIYYAgztQFFXn0TqwXcMi+OllwPDA1znz/QCn6xri2N4UlHHMtCrUbcG5HRVgDPokVhlNExR37UAZxnAooglbkd91AdLa8IUwEQsKhk6rxPukU/sSuDOnxDsZn+r/T5laCjzNdqbHl+SdqdrWpPbSeDl9EYns+N4qSzYQZ26ta6qJU4zfnZTPBcMf7SfFPCKcG+doCt+gJQJZe2OTgvDBNok9wlqBda7QLCpe4Od70xAGMNQWi1YJ7yYbfRZKqNGVWfkDcaVpGhfTP/pUiCbKGVK6L8KX+TDcNBtGth2uPkKtOLcT3XjVWqS0ldtxU3cJMLoTf2cCD2MlnBb4UkjcNEt231I0x/Qgsnyktcp9dFsggdy+JDxKrB9j5NLUNpylL/wXLEGv6XXzmxOcOk/zC3eW0bX4Rb7AqWJmt+ZTtuSwR/gbME3GV6VU0mzZrlL2kzjggZ5G4smcmNQfQxJfw/jEL94CFMY1iwZNYz+vepP/gIzfsLgscO9s77VzHYChrgJYn/DC8fHRbXR6Rz3Oo9QjF3Cwvzd4EQVt/vuVRAuwg7zuRGRQlYiOxePknteJIiMPcPh0e1j3tj7OIxmIXzGptINKOFpEVmeYm9bEEl2/9Nu9mN6YDoSxvWYz9A2Oh8axD125AkYzmS1xpgwCcCqOu4ifmF0qS5mggacnILxwy2tbTsRjc362whzHdbQsureQMv1jCKJSPkH02qE4oR8DSqlHkuHApI9Srj6AUn/A2HJgod/0YNIfkotq4mDlPxPaePWHzNUdRpL2QyrENQswYMaQlIG0kTMGy449ziOKTzHv1cQjtSGipyxlwTuuw9rRbh4a7Ww8GeuPFU2bwNazDd8GPCX3G++VfDMGSuvTsWl1BYHbLB24s8bTzSIaNOQn/b2HS5wxM79X40csgk14OI0Rme14qcwUrRLTVVj+sZlmhIEVZnJtzi1bCt9v2RBJ+JWUfk3SrbjRlGFQ30J3kY8OLR0t8d6J55ph2V6TLCFvcaIpIR95krJMschu0lo1cLQSTLoRkOeOR8uwuRtPyH3hkaWxkUl8GHKulkXnJ27WvMNjMzx9A7GTxO+mGMk1TLcYXfk3s3OLonTfjWkhPQqA5hyXvIboaTaD6gWrBHuxn3NvcZ+zlXlmP2z2Hq9ub5nmvGIK8zyGyDUYrFW33tY6Z8D/zHTh0BkbFr7Gste1UcGI+L2CsJrqnlEczzt6Ad0AmN/sTrkHR/v2eDG48jL1PggVueokeoAdBKJlGWsH+cDjNKPQ58cKMQ8y9Pw/mmjBzL7F45kiuV0F7BWe3DYtBFRh8Vgf3MiUtiyrVeAmPXFnPXHnnXE/tBrNBqnIz/xYIqdw+oeA0TXX3SkWruyEuydUR4ytDybNTrhJZ9xPfCXTT/J+2EkXbMJWHI8Y2LDfVSZVHQKsmW5mTIHTHVVIzp5g165p7Q0+tXXX2jMknoA5kJHugSXONIDwQcUpVhXQWCo6hxEuSp8OKAgrKdGA1WZtGJLwsaxdd61g+Bd7Z7j9RG7NSrckL1MWybrACTsEj3juzTJgZkEjPwdH5T+0Z5+l2prU96VxQj+foN8RbOAh++CNb4TXbkoa/IIJGu5hiom+a5ue3oNHwkztQRQNmZDxk69WFodopeAmBZricENBDbXHI5zqA8dVG3vjTZvdLqaC5XjVPbLOTWWKKcnvO3BEWECK1hkSe1e+bgx9uEtma6zdatal1pbAE3dwyr1N7Wk0VcZjA8veYXB0RmRYOkBy99jFtDiUrpbTfX3+APq4gMOCYAkI2oCgQKVkfSVwNAHqoyaCp/ztTXE0nD7TCJ4cAz47Bnx+DPhzFzDscoR6WGrQb9ycJgGn2HYjGF2gr3iR9XjdVYwyy2QQlrNBWM4HYfk8CMuXQVi+9me5xHDCWMjZMsCKkj/Ri2oyHNXZcFTnQ1BNWR68Ww/mHLy+G1gmg7CcDcJyfiQLHNeYqgw9JVcCp5DsbReaG4V7TSbjpwptVlNgraQLWo295AGaUPpuSZcdecySE1Mh+QLBJ87PO1p0+3SKiWiohmfJBml6lmyQxqfJwgHfMhzuJaF6kmBHVC5LMxmG5mwYmvNhaD4PQ/NlGJqv3WmMAVSzCFAHGZFz7WT8cHWCx8qkm1NOe27xhjfuv61m+pkzbXnBZK67MC1ApkRmhUx400Omxc+cyciBNx1kumTrNQ0GgsxeOUPVEl1xFrSdZMOE8lriye0SQOiGyfgCu4uFzN70aLTEByEdktJl2nh6xA4zbSXx3ksePCcYI85tkcCwXAX8zXh3BGLV4cVwZzB5AdvtWo5InC+aM2Xmi7rMOBmGudnq6dksqDzRrBoLGY8zRpTrXXL8R6zHpIK8YuzF3r//Aw==";
Sidebar.prototype.searchFileData="7Z1rU+O4s/A/zVbNeQGVe8LLXLjtEiZ/HGDqeaNSHJHo4Fg+sj3Afvoj+RJiBWbOY3VIO5mtLSCB3fjXklrdrVb3X83hX82L15X3V6P2k8mQC/+v5uivRqN+WlNf1bvMd8Wc+4v07fvpxUlP/6J58Vfz/K9a/6/mMFzSgIXFl+o/DKM3j6X/VfpWc7R6XUgaLE+plOIlPO3rb2QkXtRnDpaReojmqK5+VA8ScZd6N3TGvIkIeZQ+1kxEkVht/EHf4wv9i0gE6t0wkuKZPfJ5tFTvNdbvDIUnZPIgzVryj/pNyvaSPl43Q12mL8+6ycuL0kQ37CnaL1GGkBNlgOWJ7vhieWBI98GhTLoB86NkzpGEDNUw2WIlE+8Aue4DhFC9ZmmoIfU8EUdKmcczj2Fga4Otr5ztPzGdYyCDm4o5GY7Z2DFGrFeea8l+SuFjgDrrFKA65betIZdu7FGJgqo4BTtnpan+jlfBCc+GitRRDdYZFFbjULASK4P6cyQawwTr2IE5SyoDcj5fsDm5YiiVvYX+uBWRu1Rkjnou6q0nJ6oRbJbHO7zdObV982HDgFYcLAsXbHOlYQADW2S4FlcXanE5HvPnTGL1Mm0GLCObvgjySN8OE049BCNTyj0kyw3MJnYiyQMkUGDxKUf9BQ8VFV7VbzFkU8lRbtSd8u5mQXeQKyH5v8KPqHcwQ1bge8geE1ewoLzpf0+mscS4X1sEQDImfbSCEKzTsAXDYodkJADGfgaGJt4NToYkYmA/E0P1IOEp9fmKejqaT6UZtnrinvfRkxSf0Rc+Ky8Bmr1ymR8xuYXZ2wVmAxtmvVYvcpbYBYqcI8YQDmfPWIwlNoYPMNENJ0DoxMAUC/Jd7xY0XGKHrVvDxu4zNsh6rV30ikqcMBYpL3i4JFdUO0byDRuueZ7atqX9h/k+85BjnrVsMcdChAwdpbGHWg/mrVAG+SJEzmm/uTjMdA73D1mvGf6itUXkeCLCt6mcFRWQ9abi+PQZ+8oEmLERnXmHjzll8/kb0aY8NtROcd6WOaFOUZ+EmJ8O8AGCjWUCOKR+mBzDD9QzeQzdltJtgdKKpyeGfXV2SqvahHEkuf/M/QV5pBFKDxR0RA1adI5otwNJe0HDiFyon7BhGlO4V9rfTjHVFzKVCL1Qg7Nd4iRkg/Mfnz/h00ZFl6xup43uWBjRWFI/wqeJmm3ItblBik4LtYtRv3qttJ+9VB5ZtHSpZKd9T32STyP+k5Exm3OX+/gms2ENlva8N7l9NdJLFnKKjtbQwiC0YcjDZIxv1Hfm673WeVM/rbDR96C22g36gaTcxwa6i2EeUjnn6tkX+CKhhr9T2rQo0jKiXPWnJ9KXDN86tj+9/wA5WhL1lOhYi8ObR9csYfUfoIscdqHO3jZIR4w+oeM82wWnXNEIp4IycEufHG/icvWEEb5wjOn/QGw952/YzUYoTPKI8fS4WZy+pQOmG6wXdMW9NzKR1FXPg294oUKom8hchhHpc+yhGRDYS+Yz9SDY1RPIXL5KfiTn89il6TPiZoYYX8UsEQZs6jVDV0GEMVJWdCEbc1hLp7tsooow4BH18I3sTiZxTotubHtQgccN2uvVKvb5v4mKwqeXd+ARXPtPTFkXIg7JiIeMok/7AaIO1BCrj0MHu4Po27X6ID/UsUcdsEFHvJPhTWLqHtqAercOD/0Pn/sMnVu/C9Kb2EeYtWeAQhjNY7paCfU7dIcEu1i0yVpVazZZvIFk6cfiwjay+SACGjn2DZ9JijCDeocjfcdcIef4VvJOkPX9U5J6wdiAwXKJNoHvrrFh7sIXvGWxRBlO38WY3saR5CiDN1DZqhuw330X5cDuQjt9jyMywekQte1LZW3hTpZUrqiLbmjbTfihnSzfwmSznS6Z+gt0zKZJBTG+d2zBFQHOOPMOHHxd44jcUH8R0wU6V9e8EtyDiDY7wuVqTjtM/uQuwvPdHQTqnFguEN6w3LrHBcE6HY2wce7CnpoKhDfWesXxzJevHem9p9RxKGIf37muMX0h9p/HJWOeu6Rckr6r1FPIdQlmdKdFve5XoeM7OtpBauDH6E1s6OZVmtKj7tMo1gk5VOJTYmBOUgb5dxxwhPHIHlTSUYY5poGasjcIkyF7wAM6phKf1QjNyKQb47MYzUJW1pNW4PPyoJXsLQuiGN8xJtg2mmFOvDgS2CA7UFGZDNLR39DNWLN8o+2MdXzx8uQhrFUBPWed2Mdn2oMFxDcg0Rnxu4BEZ65DGwUasnXokNMw9umKo8M0Yt22mPeS+jE6M7bTgl2WDwwjJFTuacCE8rlOB3T2hm8bMczYeq0BgYluI+lCBcIyyuGS+ovkhneE8wwKKpad8wpfPXzsYmQ1Awe2Y3vBVhRfZTKw+jgZ5Rgho3ltJX9tQ4nQdG9C+ScbkOg0bhMqPpJDxqsVukCXWRjHFnLC5kw9Paf4lCxU8CAjdZbiBWPRNTOXwXpxZqDo1qfpkNnafY56cs/Dd4BiZi+Uz+jOQO99HrJXbJhmpMR243yk6rGUfXsnxArfKjXMeYtaKB/holurPahkozWtp0tBYsNsA++mj2KF0fxrgRXyKXCim7UtqOEM6ROL3k4HXCzpv1SiSzCq1wxbt3TlrYx0SGOMjjZYND7HXLJVkrj8yGiAH7e01s1wL6jnpXuM+4wu2glWEGQDVre5d5bMQ5hWAz2VLyRdcHwBlS5U9lCGeUX9ucfII4+WOG+aQ93QzXn5YkkehBfRBcLszhawgirQ4jMnoCIQH9HiOxSGOkjMaP9hLCAjfKliYPmNGectuuQi6K3mVvgn18Ln/ya2BJ1znAdQRund0vGINTU59yN88xd+dImzEhi9c2hz+D3WTYZShCFGZKiklQwZ7WrNj/3t68VlpI7HA3KF0lvvgoVfctZISJZ1Eb4P8JmJXWDDyeBFZyjCrVqXM99lp+rphKSKGt/uA406pgufoasQYPa2Kj+Dc0zuqi3HFQE6DxYstS5HvY1dD2e/bDAPxyBFr5Csx/SR+/OVwsIGatbtLw8aCBmFp/1VsOQRoxgDiGCHGxmqRNldGawTQ4Y5oCGbUXwztw22RDNO7gs39g75CmJOKpSN/0I9fB3ooBIm30EjckNj38V+F7pdOpcnQx3SVYAxOcswGbq2qzTjxG4wtCE4nzjC4xrg3UVzLiTKGiSGsVs+vpKT+gLhiRRYd9MCJrr1aeapt6wXaFJT5IY/oXO9wYoi5aQeX80whnrB4vgZpw5pk6HSRZF8I84z16c12NerRdj3F9Tolq851tbm0pvrYZzShjK2HdwRlxEZcHz3/c3xtAf9iXE4wSKDGaV48ZeKCq9yMobV1pgwgbHrJesFe/7KpMsRtnsBXq8XyrV5EQKd0b91l6j8SWMOGi5RLtWtEqHl0z2KpPjWqHF6XLfVSjnphCMMcgMb/5qVDD1GfYz7a3FkO7ZT+FJ46GrsmYWubG0IzYhwKMEuEq0x/bnwKDZMsMLqGeYVVXro0uNzhENqsHZK947OWZUfg07fgtWhe4fEOJRQTVpySiH1oaL7TKaScnRHi9CRpWuXkcxoOAZU55lGGFGLW4xNFmHGqrYYIYnzwlcrjLzAe83fLNJ+OHZM223mH/pG8Z2MAy/TG/7EyN9KAePLHNxyTG1ZxyIScqZTAdA54cawWh9KvaPi88KLqE3bZTrhrs9dtJdVgU9pMtopRdmzwrT0bY3gAi32mWx9Yn6nfDgm87KECEcXOOXD4MU3vlBVRHNeofwcrIfoYDUKC7C6rBTKwpPgczkpoDXzKMoADPDx45140bYFOkxDH5dujZVjxj7GYLd5J8x66j5gIzTNCNskD4dyjwwwztgG7MJ0qM8jKt/IiKt3Qt2DEWmNY2DTyVEfowzFB85eAsHx9ckFK8G55o1nlCBNdjHG1jZG7DAW0hfklG1bx85h3hO5jJMDnOMIhlfEY7cNDusgOJvpmzYI12oH2Op3njn5O14F2DjPgE/nHI/NMY6nmTdqG1xTnCxIeiUgXaxnwIt1Rb3UVER6XQw8W0t3Aku0E/7Btd5wFOpKzBDW+jNNJutprEjVkhUMoYoyb6VYj2osMeYxmVdYrTGzw2WEYeHintO19tZzUnwBYeOUrnQ5+ndShBMXrsZSSjllvs/x3aUH3lyOwmXT8RVsjGAdQzPGR5whfLAKfjml+pAwuUxz8KhL6rEkNIgRFrh4iS4vFCK1iKDHVYg5uaTRkkmMtFAHjBFzl6d9jDlLUFM3J8Ru752VtvcSwiFdMUnRj2P5q4ublNjHsryXklIyzyOTZfq8qDhbUOZQyilWK4q+JIul6lGQQYwxuAlV7iullAJfWB50HM//m7noTn7N6Ejpk+4UUVs7CKu8mpERu6maXArHWPMK6gpmQjnGHzDo2lk8E90+Ex0iVJPQBFGXhcfetqJd+hQwRXQcdICgrseUeSzQthw+27xV9CItgrEGKTr73Ow5bbcs30HRdQcyCqLnhUbsSVvoSKE6ehmgbWygsHP33hlgA2xBpc8kgA98zgRJAwXYSI2dpWWnbx9pWiBmTF31HZ0924W64BJJ6idR2STZ+LRFHpeMIWwobjpj5VVvEbjP5YyiC0GbpU7PytuBW7iBRzHaS+bl0vL+yyfE6Owms/1Tu3yA4RNkdBbUGViI8xNidJYUnM/6CTE6kwrs7uVnxB10xMVZbeMXfILcxYZsJrO2yh89GcirWayQXXQWF9gFeRPYd5cCY9cHsFPwD3nR7cZgVRc/5sW3FUPldHzMi28jBjuSK/IOuPvmYnSYdrQNZ7wIFRbU1eNPgPFpLLCzgo+Bsaus8g16PgHGp7MMYOg1jM93MFowQVmVgzhEr7DgNLSCxa6sGmDKSsFiV1TN0jf9PoBFp6R6xQiHzUFnkXZ40P1zP4BFt2hNLx9sImta9KsWcmjRrVqw6+YfwN4IF1/1VeP8COp4QRdymbM5ueKL5QtF10kYrJGcgX3BJL62yWYvCSj/QCc1RjJGOKkNjQUVd74Q8tlD2BYRrNGlwXtJEboHYG0JPoBFZ2nsKp9Bw+IzNHZ0Cqph0RkaOxvZpOOwrre18S42eHNHgopJXlE5E/hCzlD1t0xa5nFXBAjv+ZgOUvn2VSYyTnOys6NDlL8ZC/DtwGY0EmpwE1p0WzDcRaAi7Y2aytFSxCHGM6MdzecNZnTjbLZpg2Iei0D5wdiHGCzJLsVFN7q7OkFJ2pIkp0bIicv3qDOIJ1Q9C/W8N+LEsxWTCzXcj5IhjAIYoS0oAegLclSNOkkqziCnLt+exaB2XCEw4hrZDWC4jEZkwDx0sZ7ejhJnFTCZ6KRKbMC7SjB0lrwCtjWUZ5zQ4tuVd3TUP6U+uu3I9InbUGGAKX3F17lwR7vQVLyQPsIAgMELduIwldSNUKZBG2UVoIyrHBi7qgI7KNVVNhF2RmvvyMxIcdGNrtk1AOqINMXFd9Kyo5zgFBdrhx6wEhtb0Ct8C9g0JAF3pBW+9WtmBMNN6Nh9Rji4Z7saXI2LfXTL9xL+EBefdjYqNoAZzwkuupPwXWUFp7j4cvmNjG+owHuKi+4ScHdXLn6Ci+4CsKmqoDTzvc9+Mp/cCYq9dClYgO6BLbm+jYMzp9KAtvF/fzLvtC9l0vqQXHj6jBRdc4mtGl82FlYGLF7IOQ3RRdjNbEqb/eid9PYcHSegZt7gVOsXXY+xHmDO6AbqIzZOyLyNd04H39TdDaeIj2XqOkcydR8Zwv0FqptwRjqgiwVd4Du3NbZRW4NhgPBMzxxKWytwQOWMSd3nMECHWtRDdtdZE1ZG4+iNONRDGCruQMMK8Uz6/lzvMcqP40jH2NDBtktWX3q8U59E0VWFN25f2JUmS1HDJUefHmV15pFg6j7CwyXCbD8zvcKqEmqCGkvJfPeNnL+6S+oj3GCNsbW1I4ZxqB4GXeTB3GNtouEacyRe/DCiXKIntR3QkeT+cxJTErFSwhzdNpvZhHBaeJQF0aYixqeKi7DWqvjcYz91GjI2zo65tdraTuehegKMpHCNkAxQonUUOlpDO1nP3zXtPT5D2NharadwLNG11OmBtXjIGF85vlCL4dDY7qhXymxwY3SYbbAG5zmniBg6n808cgOBJNf+k5ArnAlrRpEaW417vVpx9fZRoL6PKsLsLeBQ9yYsutytNvApoy6ihS/O0gXMLU0pwyiJF2rXDXvGh0UX6ZR2HIcsXqGjBLzDoilvBZlQ+YyxsztwlDDDxKd5u4Bl3zZB0Wld6C1mIrgfke9PylxSn4b/UNV+CmPUu5BlZhJINZLqg7BhdoE9U33Uhi/Ya4yl7R7q4AxpA+fSTbmy/iKs3Qd70H54hjuJpbukITpe6Dk8jX0fX9wBOlB2HyA9fjLWaonRXLjB6YwvyJxG9HTAF/+J2W9St1vNXvdipN5X/4M5V8+1+btOr3ne/1IZ1BtFO6JeL6GxClIYeiKek5H68ckTL39kkcrCo7M/okhFEUj26/OPo5KFcP/IYq42/JkTH/kK0fOBOFE8578+Ojt4QVwyX6y4+2t74VCl4IpVEEfstB8E5Nxf/M7oP3QxpOrhIvZd/XjHPSWG6fc/00KLIsnvYvKPMDaF8T2I+Ir/y+bku/NHJIlI7tiCK5DjdMpycVxO7o+Sf85+Mk8EahpEQnhhtptM9c/kSUgyES9MOkvm/ToGc6zieeBhTL1jtklNCY1Y4Im3lfpQMqY+XfzmYP5QxcJeI0nD04EXM3LFXuniNwk2By4H5bAwyV1yOZxUWwwlTvw3xSDEwmMk8+g9GuksnUoJpG6eZ+xAIMQT7nNcqQhYo1m8atQoGSnPxDKRbM4Tf470J9dVEgSY4uBz9f/n0Ruh/pyEzI2lenE6YG/Cnw+FrNTsqDd6uxTKe7CU3IgwJGr2/NR/92f2fCio6/642jIpqXJ/KZP8d/0XKpmaQeL1OP3BXwlpvT852ft/JLSWUC4S8g97I+c6+9hlq98lEh2qiFZpLgrxGJU+9xfZ/MlSVMhN9vYf2bzL5kFNK5GkEnrqOZjvsqPdu7Yk9LeYhX+kkUvjlkaxpB65of4iposDmCcl9/MtyTgBY+6y+vKAmilJw1OPHrUhvCWUBx4etzx0TDIJT25GdJU4jvPk9BN5nPvzQOf3/xFKFtSexYvKh7JL7zNb0vgT4v9ILudSCn2cqusVV968h5osN2KxqLwwoGbIWPg8EvKPPDJ5OBF1n+eS//yjQlKB6F5Xx5mq47PoRSRXJzMTZDi6/SOIJLB/e5yZSluCOH9VH+cr1/96QvrzuWRhyCpuoJbcZbdEc8Ele6GeR+5i749MsjMN/XGu8H3mHmcYeksiN4LOifp06rvHaoJsyeQ2feOPMJITLiojnRL6Z+mYkrkTcVR1IxVKsSay+LPJZOdWMtIZoH/UyKZQJhU33UvOjlD59vpESt/RmlFlnGbyGPCFesM7TsfuM6HofCX9uz9S2ZSKE1C161Z8o4GWyX9u/shjUx7p+39kkshkwmTIw0jH0EY8PL4dWFL3+ZQG7ml/MiTOSlnw5H7ikHqtVjvRNUPIQ580jMtNnkEhdYPBjcf12JN+GQZUO4o3yatRXfdNndNwyebqVVKIZEnnuoBF8sIQ9VPyzxZxx8iTLlGU6xPgdsbaxsrahRvcbjtBrWNFLWNAJaguD11xOtRfSf2s1iYOk1xH/NTyUX8Wsbl+5yd3WfihS3ZoEmjUq4deek0X0Vv1ZPAV7XFKoHFWq+Dgg8z7xlm9guhlmrJ/gF7FJQ+E3j5W9OZZo3206K1t9KMg73ZqTdyYbYh9TGG2cGN2gUazgxuzXivrgBicZ7g5m/USNVY/4KwjX52NToneslucvWarRvpB4HE3yZQ/+S51YIStT0Z1MfPk99Q3U5PQiAJEH/edPmm3e+2TH6Q/p0HEf7L1TT/0EgBxOfrOnY4b1XHPexAXI0Nt4EaFHNWGmtdHA4vc4gAxrDJU5FZHr0Rt7E9QsW/I9TLdsT9kPVNKGCkk2CpVjB2kjPUW1KQ9q9VrSCEbTbCRPFP/H5yQnXaJ/sFbkIpnrmzBFx65S9KsNdEMqdFtFoJ1SKVyACSZ0KTPRHKHVl9oIo0aGuxdqKRPudtYsUHs4E+xO2iHG8SiGOqOA29hRFpqHxpnaxspMND8XgM3esqYIpd8QWc8IufRkklfjT1qGQBN9rUMWn9koGVwRLyddq15co6MuNWF9ws3iVvYiUFi75vEHezE9W4XGPkMN3CjAeEWbwDX1TrGynoGEZNfsxqOR6OWFJ2+mmChN8paNiAOXj6DbzYS+NFWKXI0+C3QeW7gt2rI8YG8zw/p6zXs9Dsd/PoxL/x68zjGfl2CdZ3881HjlsMyzq8nDmm11eJ2mB8KrHF9EP87O00nfVcNbUh0+xUp0EzoXQzuLXuNQ31sU1vfklxPbezH6YAC0KcJU3JBZ7r/gS5h4c/xnmABYjcaremEXJ4fI3qzMZmomX+s8NPx0cK3epP/HDH8ka74Zq3eQRaE2SXsUQSOc9hO63hg20c0sm0FOzki2rPOFCkmkH+VY94jH1VA3I5O1kUNCziFOzqtEzUsyPFdCtvVt9nrtRPHE/mpNBkuaRjyECk8zLWLTfpelei7wPStCsGX6gL4K/izCsE3ahDnud9vHVJvN2ttMo69iIdpoIwM4zASKybzsOHHPSPRyAJE22eiUMpveEOc77fn06JMjksG4z5xRleoJdBrFwQAkp+XCqDVbqUz4GRbBlL8TFqZ6PtpyASyNSXaEFkBqUiUFVQURKokEUpBJwwXFGUd4oR4snwLdZ2l96t5rfuPK2KhGX4Qs3Cb+0OVcOA1gf6vUji8gldlpNDCKgWQFXE/dEhbZ4bgtg9BtkPN2mm0eveTPLj+eYlmNOQgKz4lT6I61SEHWeWafNhokHEzOTc/7HOUDLZ2TLQt9LCA87iFf2gBaTvHRNuqwLIFpNVj28BNC2JfPfbPT9p1rDd7QfSwRuwcAWK3hRQRZFlqxG6zddAVE1LG7oEzPpyTxhnWuQq0HBVj+wgYO0fA2G0futJJII9A6/QOfSTZ7INadsSpd2tIsWFW6SfYTbTYOx3tzuFhz5nnneqrYWQiXpg8ny/YAR6BfER5eEccH1Ee3hFGQpkAEieSPEDKZzdX3wdwrBvRMHLuu54IY7PbFyLcssc0Jm+rgUbJFq+pNttAhG2shKWvoJuEnXrtFSdi+bvGW4wHP4o9rIRwg3iWPN1BIS6D06sJ6dQb7cv3ulybJQGQApeugZACJ4TOWxixFXGTvm3Yt8zSiQ0fAHerAFxvwQ1x2GlXgLi0kZsCX/tP3OcD6s/JxegO9fJtWI7tRIob5WUrTXWjNlY3Ox5Mhxwnsa3C2iTuHB1xr42SuNnZDfHoRqkGctlDggnmrG5hNhvKWT0Gzs7RcAZHwdnDPJ6lQ4IfcSIeT0jO9lFwtjFvK1CYzk2jWQvxcPZ2o4UUZhsxpuVo5jXMhmnmObnw2OtJvab+HSHhBTN3+Wx1ej0Yk7qO3T/0dctxLIhQrRvXiMoNP9FX1VBjlp66a8xuu0VuhJvO31B4jIypTxdoM1hL66Q18b1aoTQiE+qzd+h/eHSowE3sa7V0k8acsIOdsHS4LCecvyp/BSmctQ5S46b3E6x8pcPZG3xtHca+ekBKaL0AFWG3fbgD+NpU9isZt5DyWe8Qr81288D5Dnz8Onr8mkj5rDeIjA/r+EHwYZ6fEHxnWDcHALgu2k6AIHDtg9YsPbXyfqDJlYH2G16bZwfJJ9RXj53eskjSLAfoR/OkMUB2+xYq7lbAHU6a+hp5fzrs5+lPqKAN46behILuHh309KyGmNk0Y0v3r9uGrh0FapYnojUXUtDSG2yRM6DSJdPWSR33sELT5tsRGYt57GFJBdrNrrSmPtQKGAXaHy29G6EGhZnMPzrvoIc9jdMJfK5riAWSh/rCDvp9qHRk81PmNnrm8heyCtCHvxsd2z5UlR2o9GmLydnCzVk6BSPnjP3M7elU4xKIrV4yePMrTnmDyPPXQOpS7+kiJo1WQOo1cjk7xyIQ6PVclEeWZsX/ZXPSSrg/kczBi+MIIl0bsIkBuq6rd/hjPKIRHTJtkmXXpGb6mlTe9LiDhRzqDHODPF/O9Zpe3BlxtxEcAfJ/Rnebl+IuacRe6Buyi3E74M8jYI0TrIef1tZagRJLBvQubDX80UzIGasob5BiWjuOGjNtnEEaOg1a7b59KenbAfP+vwtnzdyt46kPsWvUJlpU20CtQr3gkpFpHW9qKYBCShh/NOqIGOu7YWxhYtzROLbwZtFCrccfrc5BMQZ8fkoXPKJKpYan/eynvxpDpWS5lKaLnjO5iYun3lDWRKR79twYQpiJKBKrjT/oZ/9lJAKTvABlXuIr45R+DEW+9X13KeR/HRLSUIowPBkwujoorBEP3b0Dlaks9xmQvrTFTtKg0ITO5x7bO16Z0jCf4V0mV9JQYEFOwyvm6UfZO1MTkOl6FTDPY/tXg5BQEyn2RHXWMKgacFTTWM64v/8lVVoRBgGVNIpDwjy2Uo8bno6pvxRmBHz3RHWjaWf+GgLJEe4zi7TJlN2hV89KbsW//349ZtOI/gFCxkEgZEQG2ihm0dePnzF84GA3bPHVUI327uZkRnWnPI59r7UGnPbIsZxnLvcwB4F0iH5EyZ/iBQtPh+uftQIZMZcmZ2ffHFeyl8QNEx6fE2epdrcv3wfqW8sOlFjZV8pVJk7A2Pzr2czRLKtTPmObMPkk1Pxlexu9nRPG6qO/3uLa+axcr739D+HOUVmiY5WxuRePe+dTVG0Uq9VBztF9bgtgoyZWSeqT8nrICeGhOB14ugi4XnsX1N87V+lB2+Iart/RbA/UjeMVmcSr4CAZybf1VN1D8OSLEEdc/Z2ki68PvH4R4Pl/K192D+HyL8Kb8DAS/qHSacfvYNmEjvQpLbqH0NiXIUZUvh0qXWJgHyqcDtqKCsPJxKsLyUJyf660yOkwfWffRB1oIGWlCAQaZAdcV3Q/Ts/uya5XAXWjQyT7m+5fI+4AK92rD41MR9WVH3eZvUnG1FXv7f1UC45yzD0viYDFnnoo/u8hqf9ttgPUmB9BHpzy1JAHqGJSrAc+k1Q/ZGXJ5pIrrtOR/rZvhtLZTpsQOo0r5vPkEucAw5kVDFTmTytr+Cd7Uy7MgHn71xL2bG96Z/7+k/nJyWr6crikq1kaYNax8yf9fvUn5xWjUVILPl4hgCnreWYwaehDDUy8IqnqUIM1jVczTw/gQSgTJ5D07TBQkmjH+zjpU8T3V2PxU49ZvtKqjPvE2FzzXiTf8wAdmdLZHlJe67UWzJLLqXT6pJD6sahHUsS9j9QOmMi3MVOPv4/QeNPAa++CLpuUD1TZ/PvfwG0HMNWS+0mkNGFKDxePIjXdwtOB2r3miXr8apQWlAZco0hGn6OlFPFi+eXLqAc0x3KYoUdXgTLnLzzqL5gyouLA20POZBtq7ay5hMLyw+Qy134nXM8e5UDGRM2xFdN30Vm4h2HZMQ75NmKR2o30Y56o3Uk8VXgH+gzx/DXw1IMeMKG+5Hpyx0IeRtRHEAXYMWCadH2I81btZvONCylfzdQAtp9yolG8Wr0prp97uJncBkaK1eB4X04BbQ5eifDrzXODouxVwjXEtZ8mu+15NKwH41o/qLvUa0VHJtJ4zLd35+PLdRu49/Ex4Xdl7KY/XvtELSx3Lwcn4LBrrOqTSP7EXUYm+h585Wnu2Dx2v34H6gJvqndxEMWS7WWGgbsjDvOeTtSC0Yem/oLcMY/RkKXBsK+36MwAbYkSO0U67jF/D1Oubq4d+3FSX5XeTg26L591sAvIiSTl/tePCnSIJefYU0okNM6DetLK29UPnL1oRXbp0TDct0tqvVIKNOTbja6RVekrCkt95s5eU0tU6iilP2d+uPeCWWUXj8kzErE2ryc8YCTJLzjPf/fVgGcwU9EEPPeUxye5m9BVeGM1uS74q76vrDW6WmNkGs9YuOcRNBddWd1ool5RLgPu73FqFotFlg1DbHHtZUbuSJEUp562MLiXzsq9K3/I8dpEvOC+r9bg8UBmF7b3zgqmRLdgPZG6leoX+8/73NWQJsGZg6VzAi6rfB39t3yFLX/vnFDDmExKovtKXEh9lIfLlCldbtLEvGMztTHu34Qp0fr3I5ykMkkyano2GoNG6l9NaVRKLnuj4f+PsnEUlM1DoUzjkhMdn0Dl8EIp0nT/Q6Y/z0oWBzThpkvun1xwb0XOf9JAyH0kvkFVIjbZ7k8+WHf73ieg2Iij/2qOMk5RFnLFXzXbtX9yw31GsrTssX73y5HOgKxPg8mJlD/k7okJyqLOmP7xlVO3B4wuLIYaC+2hTmj05WnZ5p5cGiWIV0F4OqQ/efS2n/pojWZRBZTcnzKQ9zJoCc3XG77GHOt0QXG+3sJtFHC6sDhfbsqCjo6+BYSipmDZ8H6KcUlDkpWB/OrRaACOhsbYqPq47/NbKzV2yajcy8xqd4vOQt2G4kpI/q/wo2y1f/mQtI1y73UrmopnrKYQEyZ1Hr6nnmDfUYSSvbNSjqSg3V5mlbmDdGAwvn5nNw0vu4nlxLOVsol5ksKwly2xSFOmQ+0mjRoRDBj1ntX8yvrZfHnoonhptGzAMGXYY+3ms7PiCrFSWQ/Zh+/JyzKz5WzmFTkhc+5vmvP7Nrfs/N+MZ11g+iBozt20lL1LHoU8EKQkg0ys6MJne7BgdsKkTf2DALl6m0saewcyLDf8f2I+J3/vo/PWDnDumMsDKdwkp+YwiNIYf1pU/iCI0i44VSfR1bnVqkmdmm/pMtp7agwIVUp0EI02trEOoLnGNpTeWw+J5/BWU/p4P5MbkYFH3aTt4EEBSrHQEWnNmJ6yHRJdwawgVW/wss1X8b4ZYd5sLjy9lOkR77r/XFKRlUWRt1mltaL5OxucacntDczqIxWHjD/t/6YKKJUyqd5cbx+3YHdLZQQrDpMuTLOSJlJvBGkX9aMB1cvxkX29tbJb3gmTK+qrhyfjZOYeGJ6+qR5LTtTOHs9me+hisFs8NR8PC013XeVPSdX8oSfCPfQA2DGVrjh0EExJ8eB87lUWSL2nDeJV2l8oPD1/jWSc1Hrel3djNDYue5j6C7I9eTm7Apswz1MW179J94I9FFqC6uayDaYDCWj6qEJjVbyr0BaWk72RtSoj397T4Q4YMs9yqCziTzUZmReeDui+61+Xvam1QUC+XTvfv3wowDmkZF7aUyj+8kQGIwG+dCzuY5r9DBDU5ZE1U+w/Z7XMkgynQfJge1cB1lyKR5lGESNT6j9/OY0xSl3LZTTUW09SO0+3d9JA6vtQ2RJM7v38vGs/UJ+ykW8DIfZ/plS2us//FfFgVtwvKG/YYv9lNuo1qIWoPC8dCEiK+aRHu8mPlzTcRzURY9cuW/Utp8zK2R2UCk12bJE0btxP6UGgO+E5z4WQLpufjCR90u0MRXIWON3HTTAj0/qsZKb1GiyWPnW/PO/diEIBUXz5zRAzmGar1JMLhuphvC8fkGbxBpitJ6JBroS3h6vrXViX6op6T2ml0ewO+0Pyi71vrd2SxZByrmtfl4nHodGKd2BsLdy/qfusttE5tgErec0qx/rHF+7ziYijvfj27TroqtpLbQ7jYk+vZ82QFvOn+7jrakaOSl5SymGSbh6D2HsmjoKhX1/9Hqqqdw6UhMpjmfRDx6EBGrbGge6rSvqLLKWi2otnT6umBWscrLMC9+KyAYdNEHX+tkZJdRhxgiWT+/ZtrJ2CPLiDQ43Zmmf7WCrAy14jIImVli07UkRZh54GNNxDkeXGjpgO6oSlSHWHoRnoGThSUsl1byNW9HHqtiZojqceZA/JeFt6G0TpZTR6O0Kh/3ogVCOuPw/JooImSs6FkCnDBgjkBfVCti8ms0dOvQGClDdzQDEXIWw9gwmP5rBl20eotF7s3XhWsgxggYE88mhJJtR93kfBA2CgtIrT3qIkzU4RxzJIr69gKEdjPxd9CyRls8SLJIn1UH0U/V1vsU9PyhZSXCNOV8p7kl+fimBGgS2XzztaYj2kO2tylzKWT9Rl5Nqfc32Fef8NrHuwqOd+mlEykMnp0dePZAfWCvwEL28smPVa2EeXS+CU109AM7qT/GAzPRT8etjGV8DuJdnLtH8blvbvJ2x3e5mjXzJszjOXe9A0XzRw06W+HuupLSOMvf1sGbsaRrH6+iDpmdEeHIjlIva89xYumxpT98LceyjY1gHNMSf863X/jkbMYSuOacTq9iPm8tAVp7OYe/OkIbcywnx3Sb4/PXEzM7HwIE/c84bC026e+t82a81OT1nAzUEYSfHMNn7zlPyz/s0jn+s+JKNGWYH8IjOmTJjV5FcqtCrwRfe9XSILxYS/ZD7TpVgH2TvYRWA2MWpCyED7yb4u8FUZMdRrxX4I3RIJIqYYxqN77NidYsCnTFDRpHaU1eSpcQ/1tdEQuwCM5M12iSxHUwBTprxUsVrFassiVyIO0avBeq2oB8tkR/1eCmQyPEZB3Pv8p+6XEL2hp28WWxK0S4R/U3o18IEe+DA5EA/UhqgzmajO2x6MyZhy/0k3HMYukDaUbfgbeXCfk77TqtWwC6RVnCCdEq73/0UgH5xNIZRF0Tsv0y/td7K4oUHqv6AWhGFBdkqkP/1OEGPqcj8S4RK9LIq32zqlzYlfyIK7UgRLYTZ7wScM85Jcac/ic2HgNym69reDfi8E0p8rVaEMrSGVc+wS6Rg21k6mBbkT+lduBeTxFTNEcn+rmCw+SZiXnnegPR2X+j5+SRiqs3xU7heSCBh9xi+JdtHkPNvFnIh93TnpOan8arYYwSeRXjEwX6aX6u8lol7lv0YvD2OGlLiL/zt5TOnMM/sD4ROEoT7L5H//VhBMrrhvdoHDJ4qOIYodaI17/LanMSF2YWk98DkTyuxcqZfYxdExWh6XDu59Lo5HNiMDKV62KsYglEYxfrELV7VKmypcZMtXT6cLnKbyWIl57LHwtF67PCcXQ3GOXRKme2axSj6WRLPebZFvIxY+q4/+LzL04jBxXdd/jl1C3aIeaYLPleYPLaELTwh5APIp0zj71/LRotCHy84Lj9wlGSdvY5dKrwOmbz+WygWX7EWfvTpM/uQuy+SiJtKLM/4v7OIx/LwyF+N+LZ6iVNCLo77jNeS8Ka2yqpBWMU168H3pgcsopl6uVd4lQ749OMNmrVZDv4ha9vd3UhnNlS5xk24Pua499xdJ2e8hdZe6iV/6e/QSMQ+nSmvdd4nk7CdDj4YhueAzyXRfNd9n3low2OVi6pfSQZNNuajn5LNY1y6rihgMDxlietwI9XnzivAbZw/t0me37/za6VtIEQeVmQSm71c6oLqMZ+mWsqCRMsXetNdX0zVJpuQqnmEXg6EqW6UtsG0xDPX7VZCBkQ9Z3sjYlkGeGHyZvlExSZQp//iZJI57Hoz7TlXmQNvYHUobCdtSSLOEKzATdqgVs8xQ5XJUZT5AXZfYlsXD5LYqUjBsxlZp3bBSX0/r7Qb+vM8zKHWYIHe6tZoOUnGG/nqAEQwv7x8k4N12rUZlSL512/UmetfZzEuyG/S+6+rmbxPBffQH6d1ihkX5PKSUfIj+zAcsSpIBO9iBjREuf9MhBR6N0QNDOfopsNMn7Tb+fattpGOX9uxT6jDpCy60IsMf1TCM957lFHfuSL1WmX27Z8CXtlRT+GkfO7BZ/bN88ldGPCbNHv4FbqT0lM+TTakf0G9cwDv1jwl2YNMKtQMeDBz0W7W5lFul80tSZMnos+67MhCv2NGN+4WWy3kg+dzsBIKPuQsVVEmZp47apysQUjDv1toN9VBHE8fUp4vKJTI07fzqIcUPXLTCm3ZWuALWPT6SC166bFCayIJdBrDBlOFodE0u1Bfs2MBm6RC/o31m1FAofWaSAicHp9rxws5t5O+17LaxlHuI3u0CSx3YoL73efRGzl8DWYH6OWauL4QAkmsD2MHBbuGl4LpTtBuRvvs/MZf4bZgzqGTmAv2QVeGWcgcqNXfNrvMrp5L64ZOQq+S6zHu65fQc/UGRUUPLdjI4J+P+HfpAjHmCYGnYOOMT9MjmzSBLl825JyMHfYU85UwXDRtL6vsB+tNAswqa5enYiEWVSAM1TJnyd4ZTahGdzAX6o+5mEdrOLR1Npth5jb3KMnln5Nz00XukxqUQy6Pfkb4iMxZz/HHVNuhyfhyNyQX3KmCfmhWd7SwTHWVKuhhgx64bzYssl/aFFMmtp3l1TvyNioSWCz3JV1drvR8EHqc+/mLehnlqmaSYp+tXZvRh8z2uqD9fMg998TQjAcDybOFqkhRjxQ5tnJ1Zbm1XpNlookeuQ+q26yF6q80wzMuXl82A0UcXujVQYB1J9FlEnEgyXZ0IO369VjwltUx0uf7uEOdmgJ3avEthF1y5Rp/NZNgoXbvUnuvJFH0Nsq0TYLtwuUJ+IHnMvCIJH7C519cTxb9axbojdgWiaqZbZqvXJmTk3GCHNvYyyxOR6yl6vWZOcTvn4+/B9xF24oZxtcBOk//D0F97bBWHuG6X2KKA0R/xG5mZ5QvLJsQ3/VsSCaK+Yec2D7jt9qsbvlhGL0x/JX30igzYXLkR/kL5H7qc1AT9uZ9ZYctuvo/76M92e8WAacNurMdD9MBt0LSd8Xm9jj8xEfa6/pjNeRXMbmPv6tmZJ2PGdK514FH8xwAtUNt7zMLl8W1bY6YekdQrcMMXrFBPyq07sT30f2CnNg4ALMNmYzHjHqtQpNQIotkdcI8d9IYZWJPSFPge/fw24ieW4YTxD/QjbBYqsHO5bvvD6hzbm3Wx7Xau22MrtnKrtmrqVyEKbuRjWU5xFoXCr8DdRyMpyW6nVtQvQj5nBx+6wTp2fkOxWW5dt+w1DitxHQ56kWvuhq6/ckFnOi3p/DVi/hz/qge+AJoKol2BCbAT8G4FwMEqiyfc392Ioe82ZgRbLK2377dOvQrFtcwr7XYhpu9B8mGkv1J26xPHr9mMzENLeybHT64BBkKi39i7oPlpk/6I1LEjG0XFLOMOGrmBHrlotFsGzyfKaCXXLv5ucMZZt+UeNhmgD7iYlb4tx3lIHPEUvVCJPvoA1iIzB08aYmKnNk967eJrkxH6Oh3d4klvbpyXJh7jz7tsFJFtN2gpIuGKzEDxqnAEaihxywpjkx8X2IHN+/l2BvkdjdgqRl8yELZ83h0LGK3AHU9jqC1LROpSaizve1eZC2/mdLcc+Ymj/sXODJtKnrXERJ+IaaQtWQaR80agWYNH7PCGgrN0wRwWkakIqlAMtl4HVXKOg95mM7sR2plsjnNDpkyuuF8Fa828vW3ncjtT9FffjHNvy5vLDv47ImDdxFLgimQrGfVALQ8CnQf8oSRQg3zKPObq627KKK9E6LBTdLstQysaX9cBZRVI5Kk3jQVuFx+fqudDP9qweVvTCanAJQIjlmbpd6UHXlQ/Hm5so4q5pSKfyth9xo68taItlVksJUN/sFnvGJV9Lef3A3Zgo3K35SDfD+7O6uhzF4Czc+7HlxVpjAUNfmwhswcae+hVGKzP8VC5siqWJonuRTwUyuL2I3l8oZMHB/2Shh3ux/6RXRl4vMbfBK1XJD4rP8RizlZps/FgKXwWng7pzGNJCVv8XYOKE71Z/gh7WwrM88hE/4xdCE2wup5bQrig+E9BGsbhV3ntvoV/JUQUVGEKmMfdgNrgelKNVWBsARZ2+5YIsvu/WYf2igqkByqQKuwNxQTsRvnzoy3+ZPxPniqgHGudnSmGSiyCHSrGu4tq2EhGER+LLIEtEegk5mrsj1DVPwImAo+d9v25FAvmizgkEybDChy7FaPz5XMfMwmMqUsexYriBy9uA/Va6X1gTe5Xg9xU/vV2afcoQ58M9c1q/NxFpV9vlXYJMu672Pd1K90KwBsNN89KH1Zk6A6Pki7ClZjxRh7kWWmTN4eP1GZXkYFvFLf58vVWTfZKjDwYvdSp3jI8VftE5W4Ylz+ZzKn703HSNxx/2thO0Kd0kWf5V0MKYDdacikMpKBzl4ZRRQQA1jY+F0BeOj9Pgq+kGOxXwyVf0BmP8tWQL45KSsN+Ulz3R9VEt58I1xOS5FgqL/+tmjIofzl9LQNneF0RdjN9pfylzhy+GPyuhhTOjKJa1grgdnheEXRwBXDLoidPvFQF3yg6U9oDzPHzujP5VcCqyMGouFQ6ISKXQ0WwoWd/ik2ufTKIuTevQJtX445cnqJsL4NHHi2Jwz3uCj+zC7HLwsjEL381NBfFkXsFTkArA19vQlXBXtNHQuoCTdXgNw58yqf15vjT0dHGhh7EES/6R/pTOYD+IqpKUAzcBnzkUkmgMt6PGf4ofeAZMjeWPHo7HepMb04ulBxeqIe+IkTLSO8vHRV9F4B+qXyA9CV2fnMClF4Aa/6qjLzZdNB+6l/SiD0zFuBf9kYpyvJ5sO/sMZVz9NhQvT/W2Lo1dFUmvNnMqXRi05r+RuC/d2vcyCx/q3xNnTcOqIqKbxmLvbRnu5bA5PpHZWa9aeHZj38W46iMAIwjDgsLR/5Mjj0TA+fe15XF52SSVdRIop74dz6joorNrp9JY90/XD1JWE0plM9xzaUwUovBjYR8q4gAjGifjQGUCuCCK6+vEuiAHs87ekWG3WC32QpT9isRor/Bbua42myBKfX1ZPpQkREH3P5T9jF3pXhhs2osdnj871cVGXlwPZdip2db1YjuGSWHyp/srkWgLzRK8VqVbd5wfWyiW5kAslYMZEBDZfxWQwodqPYyaynofG8q56QK2x+8HsjO9qox+Iap3yt9xpPjK8cvqsr6N3o7l0/vy+HT0z3t81Vj/wd39B4fHysy9ka3UAtPP13vWdwj8XbO/QXHf5MVrNLNWgKeiNEH+etGMej8aqMF94iHzyyK0A94G6oeXQ5+MSTZbocd3XB0WuW3uRydz5SZN1xS32ce0TOAOPEsfAsj/Nf44UyetTCU0hvSmVJ66O09s2eqNfwd85LgLlXTgEZ0pix/7DIw9r7yiT25DKbql6QvJcV/2gU99x/ZjAy9OKyAvw+59SVJuyy963ihL/nl17zOo6UyBCuR09uBymwvSKMa+cxwln/OPvRoGJIWaVdEAkZWa/kb/u8SMC58Zjce63X817/PwJfCWhjVmAxQZU7X/EUD8YLOJHcrIoytm3/2s+GS+SwRgHiKqrE5GLGh8rcf1zK4VgvC83j6WjlOFH92lBkkKR8gWwvBGd1WZBmANVFaw9/QNyZJg9yxlVh3gcQuBrgy9oYcmhURALyZOL78QXq1Wo2MYy/iYcFcwC4NsIoI79LQQjjJd8j0FLUasjCKRAHsEYksvGR5VEpJmPYT0KzI9soR0wsEuwxMRQmgKCaDHxWZAOZmWT6ktGaXQr2/WiUl5CsiBHCnusrqEAKfr94VYkWEYCwEe0347jORyeUjGV+ib65rTAQARfjAZRRTj9xUaCbAxxTS9IJjDjKmEqgG/Q4cp0chnxdSxMHRieAluzh92tdhRZ9iJzfuEuZJ1jbkl2rg/XneZxz9xSKjcla9UfqobS2BOzrngkzFC/6ztqZZK7x0avWa3qFJ/BB/nolZL6VV2i/eZtepFujVnjH1y8fP1/yP/OSC67qZ2NHBqoVtoKc/YCc3Vnz5hMItcjKQfF6BHCujma+9xlsL4EakFyhJPwg8TivQof0MqpbAtjDSNt5Cok+1Mm8XAcjgpp/0C1XP6nn4jYAt89d0gNTPCXGYvvO/";
@@ -4159,14 +4164,14 @@ this.addDataEntry("bootstrap skills",800,480,"Skills","7Zpbc6IwFMc/DY/tEAJeHtdbH
this.addDataEntry("bootstrap chat",400,660,"Chat","7VpRc+I2EP4tfWD6BCPbmCOPCSTX6TTTm+ShzwIvWHOy5ZNkQvrru5JlDrDvoI2VGKZmQqy1JMv77bf+tMMgmmXbz5IW6aNIgA+i+0E0k0Lo6izbzoDzQUhYMojmgzAk+DcIH35wNbBXSUEl5PqcAWE1YEN5CZWlMij9yp0h1Rkuax4MojuV0kS8YINgI6EqhcQ18Eph+mfbtXmW0QKfQGk8HUlYatNBS/EVZoILaaeNqgOvrBjne/aVPdD+kjINzwVdmnlfcCq0udWC1LD94RNbk3vczyAy0PIVu7ywRKdVjzGpvEJSYOvUDZtMnJGqyrDejf3uQDxxPmz3Z9Q7f+7sbf6UoNjf8JfzTHCuh8P/5uHY2SRwqtkGDuZ/i9fHDa//LtIcLXdCNPxfuxanYIWChi9zkUNLWBLzQTunC+BfhGKaiRyvyer57ihna9PmsLL4oKNZvv7DtuaBGbkSuW6bcS8gzvJ+1O79V8f3UVwN2UMjagEj+rdguDt+EQwXEpJ6fe5u7u7Dul3PIFYrBboB5m7dZ+Ebe2dVqUCeGQk39jgXrHE7WNsjsH4CXtgCXtgNeMOAHKFHPKA3aaD3yJYpBdPnSSxYrpBInlnqWFmTtCatY+mT8+x70PRwwMeQdjh+D9Z+ulzWTv5n7bSBngkS8gyFhmyBfg9JSIKoc3nj9I18RmGCPeJzmZ+YT5O+O9w/Xv68lbwO7k8+uHrTQPs3hu2M5r/0BeF78kDmk5NKK37L1uE0stMWYMfd8Do8pHUQ+QC6zhV7SE8H0W2Mjr0NUKyQ28fOAW/bsbRgXJsOCZzYw9ldyNj39FEYeMQ8aGNzR8n8GHQv7A6CJr2xB+6NiE5Bwmg06gvL5zf384fpGVLNB88PB5yKgI5oPwyOY+DGSww0Sz0XTvw6Mj42CjoTdUdREPpJ/80C1bxkytym1GA65qU0/xMLhGnbZyskpJAnIJmujRvBy0JTO2oD3F4ApUxzyTgrs3oWY4ESv1blmlHTLS85pxUYaChlb7LPCY3xDvpil1X2Y2zq5V0Txl4irFmMu/A8c1UCI/KTVpoVuiegnOPwB9xAkBnNfzVrWmCegA1Y3WEywaxne4xT6uPdhUfoU3g0YsNPQmjW/y48IVy38Ij8yM9mNfA2T4wy2IBREzk1eoGzBUi7LYGssMrBZIil1RIK9YY2qiEXC6tYQFnJgaCgMjHVClFoJqr+30qTZHKWMruIrIDECpRvpemQocpR1eKsKbFpaMsyM6jgCKiVKSs8seqlEEqxzAwxyxFZbu/vBJCiSpUZLoHWa9rvZBVQb/JbT/XNLr67fdeNvZS1g2Zl9MLz2VUJnNgP6M0C6Z9fcdtC5ihzekPv3skXj9XS4S6mauC9KNvw6uql161eYi8F1LClgFqm/amavuG97jHrT/yx/xh1L5o1vLqS6VW96SddJHxsfv+1ZdV9/8eY/wA="),
this.addDataEntry("bootstrap log in",240,220,"Log in","7ZhLj9owEIB/TY4gJ04CHAtst5W2EupW6tmQgVjrxMjx8uiv7zgxgZAAUZVsD60RUmbs8WO+mbESh86Sw7Ni2/ibjEA49MmhMyWlLp6SwwyEcDzCI4fOHc8j+He8zzd63byXbJmCVLcx8AqDHRPvUGhmMtVKmjELluKG8v5MH4Xtj3WCu5y7Dp1mMYvkHgWCQsSyGCIrYM/WjE8OG3O04RIPlGl8HCoFK9zZdM2FmEkhVT4rXecN9UzwTYq6FR4AsHOqXvkvM1VgpsWdvcGFGckb9uxAab5i4pM113Jrxm/ZiqebH0aYe2bcGk9nJ3T9k2wPZ460j7mGVzQzij1uGHXWRbgCHG66OVdZHz+DTECrIw7Z80jH1tV+gYLEwDexNTvxISwrFJvS9kwNHyy4Zoi0BvEpYbw3dHeJTPJ2B3ATgYtxUd4uAkHAWp9RvuTS3Cc3WCnIcO6f1utuW3reQ3rupIEetToFgmm+g8r8TUTtEgvJcWWPHKrTHAsxvAoJuV5noGsBUe6zVYz4tRjpOjwMqOm71jL94xiJzK+k+OXk6dYY6UOMtAuKbfMy6N3neZo3eLj05JWHS88XFmWeDGlbF/vNLrYGZBhUQrmULzMprCNwvU4SaTCurD4Ie0iksAZ1wbJsL1X00Vdlyxz7X28f1FuX9FFwR/9CwQ0/puBeYeyU07h3TttTfbhHplqQW5fjUT/lOOylHI97SLNJDd93SCBZ4ruDRxLomuUqhtXbUh4uMo42cQ3zdqd4C7YEsZAZ19zk71wV3r9fhoOrek46rLd+Qxj4nYTBiFbLrd9HHLikFggvcoOKr2lf9/LtkpvKFOrsg/F0EozqV/DdV6NHL6fdXsDHisHfuY4HQQfXMYrnjyjF8MtvLL8B"),
this.addDataEntry("bootstrap log in",240,260,"Log in","7Vhtb5swEP41fJnUyJiXJB+b0HaVOilaJ+2zAw54NTgzbl7263cGE0ghadRCVWmjqorPd+Z8z/OcC5YzT3d3kqyTbyKi3HJuLGcuhVDlXbqbU84tjFhkOYGFMYJfC9+emLWLWbQmkmbqkgBcBmwIf6alZS4yJYX2WZAMEirmc7XnZj5RKWQZ2JYzyxMSiS0MEAwikic0MgOYWWv/dBfrrY2WsKFcwe1IShpCZrMV43wuuJDFqs6quMBOOIszsIWwAQqTM/nI/uilPL0sZPZEG2GouGBmQ6ViIeHXJlyJtfZfk5Bl8Q89CLD2W8HuzIK2W43N5vSWtglT9BHCtGELCYPNlAieQHcny1yYTI3vqEipkntw2bJIJabUbgkFSiiLExOGfWMkeWmID7E1anBjgOsG0WmBaGGf6yorsoStYRRCwJpEERSjcPB/P2uGzVB9a7xMyc541VyojGaT1zZAgTVO1Q5rS3MFPzZ/yxRlyxLpehgg60DDiGYqm7ZXyqJIb7nhVWNQGb0iq1ZK91koSn5q1ZTJLKvJm5QwXlkBkWWdNgI6dkQsSJ5vhYy6gw42vd22sVUVbSzRrOzDCPO03jKR0bZyb3FwE9waKTXswczD7hzsApSz4kU6OvSEyCTN4bk/DVT2pbLDr8rOnnbIrpKipJwotqFH63dJ0TxiIVim2WEScswy+3LovdCyWK1yqlpKPuR5kbjdlrh/iSSzXBRrQo5CkX48EwDeaXF1NPJI/3R02kqqnK5U3ZofilHgok9BC2cQWhRNsHdeeB1Nv18eaKRmz0qJ7M1kqE71EsavVakvxtF9FUenDxgvPWj9wWteHDIdFa5ldVzhQ+XLiINQRs6lJfa6S2wC0Mg74vJh3JSS34bAxr0o6Wpy9PQrfwAhjVugfjHX/8b6yRurO0RjnfwLjXX8uRrrdPCar6t/xs9V+biJXtxCJ8O0UH+QFjoZQDI2auH3naY0Xer3NZTSvsEMExo+LcWuIR+nC1i/uM7Ih5Ml5QuRM8W0GANZlv98T/VeNGH0zua5PwpossLtYIXbCyvGzjErxngIWtgtWjyIGAz32ccfrd1vr95kNvXG7bfXA0Pe8sGo37P1ND0+7qS96uPVFob1h83Svfnd8y8=")];
-this.addPalette("bootstrap",mxResources.get("bootstrap"),!1,mxUtils.bind(this,function(a){for(var b=0;b<d.length;b++)a.appendChild(d[b](a))}))}})();(function(){var a=Sidebar.prototype.addBpmnPalette;Sidebar.prototype.addBpmnPalette=function(d,e){a.apply(this,arguments);var b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;",c="bpmn business process model gateway ";this.addPaletteFunctions("bpmnGateways","BPMN Gateways",!1,[this.createVertexTemplateEntry(b+"outline=none;symbol=exclusiveGw;",50,50,"","Exclusive Gateway",null,null,c+"exclusive"),
-this.createVertexTemplateEntry(b+"outline=none;symbol=parallelGw;",50,50,"","Parallel Gateway",null,null,c+"parallel"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","Inclusive Gateway",null,null,c+"inclusive"),this.createVertexTemplateEntry(b+"outline=none;symbol=complexGw;",50,50,"","Complex Gateway",null,null,c+"complex"),this.createVertexTemplateEntry(b+"outline=standard;symbol=general;",50,50,"","General Start Gateway",null,null,c+"general start"),this.createVertexTemplateEntry(b+
-"outline=throwing;symbol=general;",50,50,"","General Intermediate Gateway",null,null,c+"general intermediate"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","General End Gateway",null,null,c+"general end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=message;",50,50,"","Message Standard Gateway",null,null,c+"message standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=message;",50,50,"","Message Interrupting Gateway",null,null,c+"message interrupting"),
-this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=message;",50,50,"","Message Non-Interrupting Gateway",null,null,c+"message non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=message;",50,50,"","Message Catching Gateway",null,null,c+"message catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=message;",50,50,"","Message Boundary Interrupting Gateway",null,null,c+"message boundary interrupting"),this.createVertexTemplateEntry(b+
-"outline=boundNonint;symbol=message;",50,50,"","Message Boundary Non-Interrupting Gateway",null,null,c+"message boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=message;",50,50,"","Message Throwing Gateway",null,null,c+"message throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=message;",50,50,"","Message End Gateway",null,null,c+"message end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=timer;",50,50,"","Timer Standard Gateway",
-null,null,c+"timer standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=timer;",50,50,"","Timer Interrupting Gateway",null,null,c+"timer interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=timer;",50,50,"","Timer Non-Interrupting Gateway",null,null,c+"timer non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=timer;",50,50,"","Timer Catching Gateway",null,null,c+"timer catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=timer;",
-50,50,"","Timer Boundary Interrupting Gateway",null,null,c+"timer boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=timer;",50,50,"","Timer Boundary Non-Interrupting Gateway",null,null,c+"timer boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=escalation;",50,50,"","Escalation Interrupting Gateway",null,null,c+"escalation interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=escalation;",50,
-50,"","Escalation Non-Interrupting Gateway",null,null,c+"escalation non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=escalation;",50,50,"","Escalation Boundary Interrupting Gateway",null,null,c+"escalation boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=escalation;",50,50,"","Escalation Boundary Non-Interrupting Gateway",null,null,c+"escalation boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+
+this.addPalette("bootstrap",mxResources.get("bootstrap"),!1,mxUtils.bind(this,function(a){for(var b=0;b<d.length;b++)a.appendChild(d[b](a))}))}})();(function(){var a=Sidebar.prototype.addBpmnPalette;Sidebar.prototype.addBpmnPalette=function(d,e){a.apply(this,arguments);var b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outlineConnect=0;",c="bpmn business process model gateway ";this.addPaletteFunctions("bpmnGateways","BPMN Gateways",!1,[this.createVertexTemplateEntry(b+"outline=none;symbol=exclusiveGw;",50,50,"","Exclusive Gateway",null,
+null,c+"exclusive"),this.createVertexTemplateEntry(b+"outline=none;symbol=parallelGw;",50,50,"","Parallel Gateway",null,null,c+"parallel"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","Inclusive Gateway",null,null,c+"inclusive"),this.createVertexTemplateEntry(b+"outline=none;symbol=complexGw;",50,50,"","Complex Gateway",null,null,c+"complex"),this.createVertexTemplateEntry(b+"outline=standard;symbol=general;",50,50,"","General Start Gateway",null,null,c+"general start"),
+this.createVertexTemplateEntry(b+"outline=throwing;symbol=general;",50,50,"","General Intermediate Gateway",null,null,c+"general intermediate"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","General End Gateway",null,null,c+"general end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=message;",50,50,"","Message Standard Gateway",null,null,c+"message standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=message;",50,50,"","Message Interrupting Gateway",
+null,null,c+"message interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=message;",50,50,"","Message Non-Interrupting Gateway",null,null,c+"message non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=message;",50,50,"","Message Catching Gateway",null,null,c+"message catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=message;",50,50,"","Message Boundary Interrupting Gateway",null,null,c+"message boundary interrupting"),
+this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=message;",50,50,"","Message Boundary Non-Interrupting Gateway",null,null,c+"message boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=message;",50,50,"","Message Throwing Gateway",null,null,c+"message throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=message;",50,50,"","Message End Gateway",null,null,c+"message end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=timer;",
+50,50,"","Timer Standard Gateway",null,null,c+"timer standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=timer;",50,50,"","Timer Interrupting Gateway",null,null,c+"timer interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=timer;",50,50,"","Timer Non-Interrupting Gateway",null,null,c+"timer non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=timer;",50,50,"","Timer Catching Gateway",null,null,c+"timer catching"),this.createVertexTemplateEntry(b+
+"outline=boundInt;symbol=timer;",50,50,"","Timer Boundary Interrupting Gateway",null,null,c+"timer boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=timer;",50,50,"","Timer Boundary Non-Interrupting Gateway",null,null,c+"timer boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=escalation;",50,50,"","Escalation Interrupting Gateway",null,null,c+"escalation interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=escalation;",
+50,50,"","Escalation Non-Interrupting Gateway",null,null,c+"escalation non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=escalation;",50,50,"","Escalation Boundary Interrupting Gateway",null,null,c+"escalation boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=escalation;",50,50,"","Escalation Boundary Non-Interrupting Gateway",null,null,c+"escalation boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+
"outline=throwing;symbol=escalation;",50,50,"","Escalation Throwing Gateway",null,null,c+"escalation throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=escalation;",50,50,"","Escalation End Gateway",null,null,c+"escalation end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=conditional;",50,50,"","Conditional Standard Gateway",null,null,c+"conditional standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=conditional;",50,50,"","Conditional Interrupting Gateway",
null,null,c+"conditional interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=conditional;",50,50,"","Conditional Non-Interrupting Gateway",null,null,c+"conditional non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=conditional;",50,50,"","Conditional Catching Gateway",null,null,c+"conditional catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=conditional;",50,50,"","Conditional Boundary Interrupting Gateway",null,
null,c+"conditional boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=conditional;",50,50,"","Conditional Boundary Non-Interrupting Gateway",null,null,c+"conditional boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=link;",50,50,"","Link Catching Gateway",null,null,c+"link catching"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=link;",50,50,"","Link Throwing Gateway",null,null,c+"link throwing"),this.createVertexTemplateEntry(b+
@@ -4179,7 +4184,7 @@ null,null,c+"multiple standard"),this.createVertexTemplateEntry(b+"outline=event
"outline=boundInt;symbol=multiple;",50,50,"","Multiple Boundary Interrupting Gateway",null,null,c+"multiple boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=multiple;",50,50,"","Multiple Boundary Non-Interrupting Gateway",null,null,c+"multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=multiple;",50,50,"","Multiple Throwing Gateway",null,null,c+"multiple throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=multiple;",
50,50,"","Multiple End Gateway",null,null,c+"multiple end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=star;",50,50,"","Multiple Start Gateway",null,null,c+"multiple end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=parallelMultiple;",50,50,"","Parallel Multiple Standard Gateway",null,null,c+"parallel multiple standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=parallelMultiple;",50,50,"","Parallel Multiple Interrupting Gateway",null,null,c+"parallel multiple interrupting"),
this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=parallelMultiple;",50,50,"","Parallel Multiple Non-Interrupting Gateway",null,null,c+"parallel multiple non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=parallelMultiple;",50,50,"","Parallel Multiple Catching Gateway",null,null,c+"parallel multiple catching"),this.createVertexTemplateEntry(b+"outline=boundInt;symbol=parallelMultiple;",50,50,"","Parallel Multiple Boundary Interrupting Gateway",
-null,null,c+"parallel multiple boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=parallelMultiple;",50,50,"","Parallel Multiple Boundary Non-Interrupting Gateway",null,null,c+"parallel multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=end;symbol=terminate;",50,50,"","Terminate Gateway",null,null,c+"terminate")]);b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=ellipsePerimeter;";
+null,null,c+"parallel multiple boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=parallelMultiple;",50,50,"","Parallel Multiple Boundary Non-Interrupting Gateway",null,null,c+"parallel multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=end;symbol=terminate;",50,50,"","Terminate Gateway",null,null,c+"terminate")]);b="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=ellipsePerimeter;outlineConnect=0;";
c="bpmn business process model event ";this.addPaletteFunctions("bpmnEvents","BPMN Events",!1,[this.createVertexTemplateEntry(b+"outline=standard;symbol=general;",50,50,"","General Start",null,null,c+"general start"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=general;",50,50,"","General Intermediate",null,null,c+"general intermediate"),this.createVertexTemplateEntry(b+"outline=end;symbol=general;",50,50,"","General End",null,null,c+"general end"),this.createVertexTemplateEntry(b+"outline=standard;symbol=message;",
50,50,"","Message Standard",null,null,c+"message standard"),this.createVertexTemplateEntry(b+"outline=eventInt;symbol=message;",50,50,"","Message Interrupting",null,null,c+"message interrupting"),this.createVertexTemplateEntry(b+"outline=eventNonint;symbol=message;",50,50,"","Message Non-Interrupting",null,null,c+"message non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=catching;symbol=message;",50,50,"","Message Catching",null,null,c+"message catching"),this.createVertexTemplateEntry(b+
"outline=boundInt;symbol=message;",50,50,"","Message Boundary Interrupting",null,null,c+"message boundary interrupting"),this.createVertexTemplateEntry(b+"outline=boundNonint;symbol=message;",50,50,"","Message Boundary Non-Interrupting",null,null,c+"message boundary non interrupting noninterrupting"),this.createVertexTemplateEntry(b+"outline=throwing;symbol=message;",50,50,"","Message Throwing",null,null,c+"message throwing"),this.createVertexTemplateEntry(b+"outline=end;symbol=message;",50,50,"",
@@ -6756,275 +6761,275 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})();
-DrawioFile=function(a,d){mxEventSource.call(this);this.ui=a;this.data=d||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,d,e,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,d,e){};DrawioFile.prototype.saveFile=function(a,d,e,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
-DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,e){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,d,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||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};
-DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){var e=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
+DrawioFile=function(a,e){mxEventSource.call(this);this.ui=a;this.data=e||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,e,d,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,e,d){};DrawioFile.prototype.saveFile=function(a,e,d,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
+DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,e,d){};DrawioFile.prototype.isMovable=function(){return!1};
+DrawioFile.prototype.move=function(a,e,d){};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};
+DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){var d=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,d,e,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<d?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=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!=e&&e(a)}),
-mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=e&&e(null)}),a)};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.close=function(a){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 e=a.lastIndexOf("."),b=0<e?a.substring(e):"",e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return a==d};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,d,e,b){DrawioFile.call(this,a,d);this.title=e;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};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,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};
-LocalFile.prototype.saveFile=function(a,d,e,b){this.title=a;this.updateFileData();d=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,g?"image/png":"text/xml",g);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)+
-(g?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(d)};LocalFile.prototype.rename=function(a,d,e){this.title=a;this.descriptorChanged();null!=d&&d()};
-LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,d,e){LocalFile.call(this,a,d,e)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,d,e){DrawioFile.call(this,a,d);this.title=e};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;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,e){this.saveAs(this.getTitle(),d,e)};StorageFile.prototype.saveAs=function(a,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,d,e)};
-StorageFile.prototype.saveFile=function(a,d,e,b){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=e&&e()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(e){this.isRenamable()&&this.getTitle()!=a&&null!=e?this.ui.confirm(mxResources.get("replaceIt",
-[a]),g,b):g()}))}else null!=e&&e()};StorageFile.prototype.rename=function(a,d,e){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(g){var k=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)}),e)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),k,e):k()})):d()};
-StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,d,e){StorageFile.call(this,a,d,e)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,d,e){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,d,e){StorageFile.call(this,a,d,e);a=e;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,e){return!1};UrlLibrary.prototype.saveAs=function(a,d,e){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,d,e){function b(b,q,t,n,v,u){function g(){mxEvent.addListener(x,"click",null!=u?u:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,c.checked);d()})):(a.setMode(t,c.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",q);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";if(null!=b){var w=document.createElement("img");
-w.setAttribute("src",b);w.setAttribute("border","0");w.setAttribute("align","absmiddle");w.style.width="60px";w.style.height="60px";w.style.paddingBottom="6px";x.appendChild(w)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");x.appendChild(y);mxUtils.write(y,q);if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(y),mxUtils.write(y,v[b]);if(null!=n&&null==a[n]){w.style.visibility=
-"hidden";mxUtils.setOpacity(y,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var l=window.setTimeout(function(){null==a[n]&&(k.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[n]&&(window.clearTimeout(l),mxUtils.setOpacity(y,100),w.style.visibility="",k.stop(),g(),"drive"==n&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else g();
-p.appendChild(x);++f>=e&&(mxUtils.br(p),f=0)}e=null!=e?e:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=a.addLanguageMenu(g,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
-"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";k.appendChild(l);mxUtils.write(k,mxResources.get("help"));g.appendChild(k)}var m=document.createElement("div");m.style.position="absolute";m.style.cursor="pointer";m.style.fontSize="12px";
-m.style.bottom="28px";m.style.color="gray";mxUtils.write(m,mxResources.get("decideLater"));a.isOfflineApp()?m.style.right="20px":(mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)"),m.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)m.style.marginLeft=-Math.round(m.clientWidth/2)+"px"};g.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var c=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
-!0);Editor.useLocalStorage=c});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";p.style.padding="12px 0px 12px 0px";var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;var f=0,h=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop=
-"4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);"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");mxClient.IS_IOS&&"device"!=urlParams.storage||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);g.appendChild(p);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(c);l=document.createElement("span");l.style.color="gray";l.style.fontSize="12px";mxUtils.write(l," "+mxResources.get("rememberThisSetting"));k.appendChild(l);mxUtils.br(k);var t=a.getRecent();if(null!=t&&
-0<t.length){var q=document.createElement("select");q.style.marginTop="8px";q.style.width="140px";var u=document.createElement("option");u.setAttribute("value","");u.setAttribute("selected","selected");u.style.textAlign="center";mxUtils.write(u,mxResources.get("openRecent")+"...");q.appendChild(u);for(u=0;u<t.length;u++)(function(a){var c=a.mode;c==App.MODE_GOOGLE?c="googleDrive":c==App.MODE_ONEDRIVE&&(c="oneDrive");var f=document.createElement("option");f.setAttribute("value",a.id);mxUtils.write(f,
-a.title+" ("+mxResources.get(c)+")");q.appendChild(f)})(t[u]);k.appendChild(q);mxEvent.addListener(q,"change",function(c){""!=q.value&&a.loadFile(q.value)})}else k.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(t=document.createElement("div"),t.style.cursor="pointer",t.style.padding="18px 0px 6px 0px",t.style.fontSize="12px",t.style.color="gray",mxUtils.write(t,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(t,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(t),p.style.paddingBottom="4px");p.appendChild(k);mxEvent.addListener(l,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
-document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(h.style.padding="8px",h.style.fontSize="9pt",h.style.marginTop="-14px",h.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(h))},5E3);this.container=
-g},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";a.addLanguageMenu(d,!0);var e=null,e=a.getServiceCount();if(!a.isOffline()&&1<e){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title",mxResources.get("help"));e.setAttribute("target","_blank");e.style.position="absolute";e.style.fontSize="12px";e.style.textDecoration="none";e.style.cursor="pointer";e.style.bottom="22px";e.style.left="26px";e.style.color=
-"gray";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";e.appendChild(b);mxUtils.write(e,mxResources.get("help"));d.appendChild(e)}e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.paddingTop="2px";e.style.margin="0px";e.style.color="gray";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="40px";
-b.style.height="40px";b.style.marginRight="12px";b.style.paddingBottom="4px";var g="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",g=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",g=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",g=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+"/github-logo.svg",g=mxResources.get("github")):a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+
-"/trello-logo.svg",g=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",g=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(k.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):
-(e.appendChild(b),mxUtils.write(e,g),d.appendChild(e),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",l.style.marginBottom="8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(l);mxUtils.br(k);l=document.createElement("button");
-l.className="geBigButton";l.style.marginBottom="22px";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram"));mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});k.appendChild(l);e="undefined";a.mode==App.MODE_GOOGLE?e=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?e=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?e=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?e=mxResources.get("github"):
-a.mode==App.MODE_TRELLO?e=mxResources.get("trello"):a.mode==App.MODE_DEVICE?e=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(e=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(g=function(b){l.style.marginBottom="24px";var e=document.createElement("a");e.setAttribute("href","javascript:void(0)");e.style.display="block";e.style.marginTop="6px";mxUtils.write(e,mxResources.get("signOut"));l.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(e,"click",
-function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(e)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(l.style.marginBottom="24px",g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="6px",mxUtils.write(g,mxResources.get("changeUser")+" ("+b.displayName+")"),l.style.marginBottom="16px",k.style.paddingBottom="18px",mxEvent.addListener(g,"click",function(){a.hideDialog();a.drive.clearUserId();
-a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),k.appendChild(g)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?g(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?g(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
-a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&g(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&g(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="8px",mxUtils.write(g,mxResources.get("notUsingService",[e])),mxEvent.addListener(g,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
-k.appendChild(g));d.appendChild(k);this.container=d},ConfirmDialog=function(a,d,e,b,g,k,l,m,p){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,d);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var h=document.createElement("input");h.setAttribute("type","checkbox");
-k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(h.checked)});k.className="geBtn";null!=m&&(k.innerHTML=m+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(h.checked)});f.appendChild(g);null!=l?(g.innerHTML=l+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",
-g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);p?(f.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(h),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f),mxEvent.addListener(l,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=
-c},ErrorDialog=function(a,d,e,b,g,k,l,m,p,c,f){p=null!=p?p:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=d){var t=document.createElement("div");t.style.padding="0px";t.style.margin="0px";t.style.fontSize="18px";t.style.paddingBottom="16px";t.style.marginBottom="16px";t.style.borderBottom="1px solid #c0c0c0";t.style.color="gray";mxUtils.write(t,d);h.appendChild(t)}d=document.createElement("div");d.style.padding="6px";d.innerHTML=e;h.appendChild(d);e=document.createElement("div");
-e.style.marginTop="16px";e.style.textAlign="center";null!=k&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),d.className="geBtn",e.appendChild(d),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var q=mxUtils.button(b,function(){p&&a.hideDialog();null!=g&&g()});q.className="geBtn";e.appendChild(q);null!=l&&(b=mxUtils.button(l,function(){p&&a.hideDialog();null!=m&&m()}),b.className="geBtn gePrimaryBtn",
-e.appendChild(b));this.init=function(){q.focus()};h.appendChild(e);this.container=h},EmbedDialog=function(a,d,e,b,g){b=document.createElement("div");var k=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);mxUtils.write(b,mxResources.get(5E5>d.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);var l=document.createElement("div");l.style.position="absolute";l.style.top="30px";l.style.right="30px";l.style.color="gray";mxUtils.write(l,a.formatFileSize(d.length));b.appendChild(l);var m=document.createElement("textarea");
-m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");b.appendChild(m);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(m.value=d,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=d.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};l=document.createElement("div");l.style.position="absolute";l.style.bottom="36px";l.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>d.length?"preview":"openInNewWindow"),
-function(){var c=5E5>d.length?m.value:d;if(null!=g)g(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==e||0<e)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),e||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+d+"</body></html>");b.close()}}),p.className="geBtn",l.appendChild(p));if(!k||7500<d.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",d,"text/plain")});c.className="geBtn";l.appendChild(c)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(c)}catch(t){a.handleError({message:t.message||
-mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";l.appendChild(f)}7168>d.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+
-encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(c)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",f.appendChild(c),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign=
-"bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",l.appendChild(f))}c=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.appendChild(c);f=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?
-c.className="geBtn gePrimaryBtn":(l.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(l.appendChild(p),c.className="geBtn",p.className="geBtn gePrimaryBtn");b.appendChild(l);this.container=b};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,d){function e(){var a=null!=z.getTitle()?z.getTitle():this.defaultFilename;if(G.checked&&""!=t.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=q.value&&"0"!=q.value&&(b+="&border="+q.value);""!=h.value&&(b+="&height="+h.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+
-(n.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+p;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else z.constructor==DriveFile||z.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?b+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(b+=z.getHash().substring(1),b=z.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
-encodeURIComponent(a)),""!=h.value&&(a=parseInt(h.value)+parseInt(f.value),b+="&height="+a),c.value=b):c.value=""}var b=document.createElement("div"),g=a.editor.graph,k=g.getGraphBounds(),l=g.view.scale,m=Math.floor(k.x/l-g.view.translate.x),p=Math.floor(k.y/l-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";b.appendChild(c);
-mxUtils.br(b);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=m;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var h=document.createElement("input");h.setAttribute("type",
-"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/l);b.appendChild(h);mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=d||"";
-b.appendChild(t);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";b.appendChild(q);mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";b.appendChild(u);mxUtils.write(b,mxResources.get("pan")+" ");var w=document.createElement("input");
-w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";b.appendChild(w);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);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 n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="16px";b.appendChild(n);mxUtils.write(b,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("fit")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft=
-"8px";b.appendChild(G);mxUtils.write(b,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),z=a.getCurrentFile();mxEvent.addListener(u,"change",e);mxEvent.addListener(w,"change",e);mxEvent.addListener(n,"change",e);mxEvent.addListener(v,"change",e);mxEvent.addListener(x,"change",e);mxEvent.addListener(y,"change",e);mxEvent.addListener(G,"change",e);mxEvent.addListener(h,"change",e);mxEvent.addListener(f,"change",e);mxEvent.addListener(q,"change",e);mxEvent.addListener(t,"change",e);e();
-mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";k.appendChild(l);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,d,e){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 k=new Graph(d);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";k.cellRenderer.installCellOverlayListeners=
-function(a,c,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){c.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){c.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
-!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=k.getDefaultParent(),p=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,b){k.connectionHandler.reset();k.clearSelection();var f=k.getCellGeometry(a),n;h(function(){n=k.insertVertex(m,null,"Entry",f.x,f.y,80,30,"rounded=1;");p(n);k.view.refresh(n);
-k.insertEdge(m,null,"",a,n,l)},function(){k.scrollCellToVisible(n)})});c.addListener("pointerdown",function(a,c){var b=c.getProperty("event"),f=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var n=mxUtils.convertPoint(k.container,mxEvent.getClientX(b),mxEvent.getClientY(b));k.connectionHandler.start(f,n.x,n.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(m,null,"Start",
-0,0,80,30,"ellipse"),p(c)}finally{k.getModel().endUpdate()}var f;"horizontalTree"==e?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==e?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==e?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==e?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==e&&(f=new mxCircleLayout(k));if(null!=f){var h=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(n){throw n;}finally{var h=new mxMorphing(k);h.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));h.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,c,b,f,q){t.apply(this,arguments);h()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);h()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){h()})}var q=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});q.className="geBtn";a.editor.cancelFirst&&b.appendChild(q);var u=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),b=a.editor.graph.view,f=b.getBounds(c);f.x-=b.translate.x;f.y-=b.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(c);null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(q)};this.container=b};
+DrawioFile.prototype.autosave=function(a,e,d,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<e?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=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!=b&&b(a)}))}else null!=d&&d(null)}),a)};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.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var d=a.lastIndexOf("."),b=0<d?a.substring(d):"",d=e.lastIndexOf(".");return b===(0<d?e.substring(d):"")}return a==e};
+DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,e,d,b){DrawioFile.call(this,a,e);this.title=d;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};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,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};
+LocalFile.prototype.saveFile=function(a,e,d,b){this.title=a;this.updateFileData();e=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=d&&d()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(e)};LocalFile.prototype.rename=function(a,e,d){this.title=a;this.descriptorChanged();null!=e&&e()};
+LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,e,d){LocalFile.call(this,a,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,e,d){DrawioFile.call(this,a,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;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,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(a,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,e,d)};
+StorageFile.prototype.saveFile=function(a,e,d,b){if(this.isEditable()){var h=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=a&&null!=d?this.ui.confirm(mxResources.get("replaceIt",
+[a]),h,b):h()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,e,d){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(h){var k=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,e)}),d)});null!=h?this.ui.confirm(mxResources.get("replaceIt",[a]),k,d):k()})):e()};
+StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,e,d){StorageFile.call(this,a,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};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,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,e,d){StorageFile.call(this,a,e,d);a=d;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+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,e,d){return!1};UrlLibrary.prototype.saveAs=function(a,e,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,e,d){function b(b,q,t,l,v,u){function w(){mxEvent.addListener(h,"click",null!=u?u:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,c.checked);e()})):(a.setMode(t,c.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}var h=document.createElement("a");h.style.overflow="hidden";h.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";h.className="geBaseButton";h.style.boxSizing="border-box";h.style.fontSize="11px";h.style.position="relative";h.style.margin="4px";h.style.padding="8px 10px 12px 10px";h.style.width="88px";h.style.height="100px";h.style.whiteSpace="nowrap";h.setAttribute("title",q);mxClient.IS_QUIRKS&&(h.style.cssFloat="left",h.style.zoom="1");var A=document.createElement("div");A.style.textOverflow="ellipsis";A.style.overflow="hidden";if(null!=b){var x=document.createElement("img");
+x.setAttribute("src",b);x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width="60px";x.style.height="60px";x.style.paddingBottom="6px";h.appendChild(x)}else A.style.paddingTop="5px",A.style.whiteSpace="normal",mxClient.IS_IOS?(h.style.padding="0px 10px 20px 10px",h.style.top="6px"):mxClient.IS_FF&&(A.style.paddingTop="0px",A.style.marginTop="-2px");h.appendChild(A);mxUtils.write(A,q);if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(A),mxUtils.write(A,v[b]);if(null!=l&&null==a[l]){x.style.visibility=
+"hidden";mxUtils.setOpacity(A,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(h);var m=window.setTimeout(function(){null==a[l]&&(k.stop(),h.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(m),mxUtils.setOpacity(A,100),x.style.visibility="",k.stop(),w(),"drive"==l&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else w();
+p.appendChild(h);++f>=d&&(mxUtils.br(p),f=0)}d=null!=d?d:2;var h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var k=a.addLanguageMenu(h,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
+"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";k.appendChild(m);mxUtils.write(k,mxResources.get("help"));h.appendChild(k)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";
+n.style.bottom="28px";n.style.color="gray";mxUtils.write(n,mxResources.get("decideLater"));a.isOfflineApp()?n.style.right="20px":(mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)"),n.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=-Math.round(n.clientWidth/2)+"px"};h.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var c=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
+!0);Editor.useLocalStorage=c});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";p.style.padding="12px 0px 12px 0px";var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;var f=0,g=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop=
+"4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");h.appendChild(k);"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");mxClient.IS_IOS&&"device"!=urlParams.storage||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);h.appendChild(p);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(c);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));k.appendChild(m);mxUtils.br(k);var u=a.getRecent();if(null!=u&&
+0<u.length){var q=document.createElement("select");q.style.marginTop="8px";q.style.width="140px";var t=document.createElement("option");t.setAttribute("value","");t.setAttribute("selected","selected");t.style.textAlign="center";mxUtils.write(t,mxResources.get("openRecent")+"...");q.appendChild(t);for(t=0;t<u.length;t++)(function(a){var c=a.mode;c==App.MODE_GOOGLE?c="googleDrive":c==App.MODE_ONEDRIVE&&(c="oneDrive");var f=document.createElement("option");f.setAttribute("value",a.id);mxUtils.write(f,
+a.title+" ("+mxResources.get(c)+")");q.appendChild(f)})(u[t]);k.appendChild(q);mxEvent.addListener(q,"change",function(c){""!=q.value&&a.loadFile(q.value)})}else k.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(u=document.createElement("div"),u.style.cursor="pointer",u.style.padding="18px 0px 6px 0px",u.style.fontSize="12px",u.style.color="gray",mxUtils.write(u,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(u,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(u),p.style.paddingBottom="4px");p.appendChild(k);mxEvent.addListener(m,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
+document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(g.style.padding="8px",g.style.fontSize="9pt",g.style.marginTop="-14px",g.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",h.appendChild(g))},5E3);this.container=
+h},SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";a.addLanguageMenu(e,!0);var d=null,d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";d.style.left="26px";d.style.color=
+"gray";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";d.appendChild(b);mxUtils.write(d,mxResources.get("help"));e.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="40px";
+b.style.height="40px";b.style.marginRight="12px";b.style.paddingBottom="4px";var h="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",h=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",h=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",h=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+"/github-logo.svg",h=mxResources.get("github")):a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+
+"/trello-logo.svg",h=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",h=mxResources.get("browser")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",h=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var m=document.createElement("button");m.className="geBigButton";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(k.style.padding="42px 0px 56px 0px",m.style.marginBottom="12px"):
+(d.appendChild(b),mxUtils.write(d,h),e.appendChild(d),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",m.style.marginBottom="8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(m);mxUtils.br(k);m=document.createElement("button");
+m.className="geBigButton";m.style.marginBottom="22px";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){a.actions.get("open").funct()});k.appendChild(m);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):
+a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(h=function(b){m.style.marginBottom="24px";var d=document.createElement("a");d.setAttribute("href","javascript:void(0)");d.style.display="block";d.style.marginTop="6px";mxUtils.write(d,mxResources.get("signOut"));m.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(d,"click",
+function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(d)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(m.style.marginBottom="24px",h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="block",h.style.marginTop="6px",mxUtils.write(h,mxResources.get("changeUser")+" ("+b.displayName+")"),m.style.marginBottom="16px",k.style.paddingBottom="18px",mxEvent.addListener(h,"click",function(){a.hideDialog();a.drive.clearUserId();
+a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),k.appendChild(h)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?h(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?h(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
+a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&h(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&h(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="block",h.style.marginTop="8px",mxUtils.write(h,mxResources.get("notUsingService",[d])),mxEvent.addListener(h,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
+k.appendChild(h));e.appendChild(k);this.container=e},ConfirmDialog=function(a,e,d,b,h,k,m,n,p){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,e);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");
+k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(g.checked)});k.className="geBtn";null!=n&&(k.innerHTML=n+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(g.checked)});f.appendChild(h);null!=m?(h.innerHTML=m+"<br>"+h.innerHTML+"<br>",h.style.paddingBottom="8px",h.style.paddingTop="8px",
+h.style.height="auto",h.className="geBtn",h.style.width="40%"):h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);p?(f.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(g),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),c.appendChild(f),mxEvent.addListener(m,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=
+c},ErrorDialog=function(a,e,d,b,h,k,m,n,p,c,f){p=null!=p?p:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var u=document.createElement("div");u.style.padding="0px";u.style.margin="0px";u.style.fontSize="18px";u.style.paddingBottom="16px";u.style.marginBottom="16px";u.style.borderBottom="1px solid #c0c0c0";u.style.color="gray";mxUtils.write(u,e);g.appendChild(u)}e=document.createElement("div");e.style.padding="6px";e.innerHTML=d;g.appendChild(e);d=document.createElement("div");
+d.style.marginTop="16px";d.style.textAlign="center";null!=k&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),e.className="geBtn",d.appendChild(e),d.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",d.appendChild(c));var q=mxUtils.button(b,function(){p&&a.hideDialog();null!=h&&h()});q.className="geBtn";d.appendChild(q);null!=m&&(b=mxUtils.button(m,function(){p&&a.hideDialog();null!=n&&n()}),b.className="geBtn gePrimaryBtn",
+d.appendChild(b));this.init=function(){q.focus()};g.appendChild(d);this.container=g},EmbedDialog=function(a,e,d,b,h){b=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);mxUtils.write(b,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);var m=document.createElement("div");m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,a.formatFileSize(e.length));b.appendChild(m);var n=document.createElement("textarea");
+n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");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>e.length?(n.value=e,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),
+function(){var c=5E5>e.length?n.value:e;if(null!=h)h(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>");b.close()}}),p.className="geBtn",m.appendChild(p));if(!k||7500<e.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",e,"text/plain")});c.className="geBtn";m.appendChild(c)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(c)}catch(u){a.handleError({message:u.message||
+mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";m.appendChild(f)}7168>e.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+
+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(c)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",f.appendChild(c),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign=
+"bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",m.appendChild(f))}c=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.appendChild(c);f=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?
+c.className="geBtn gePrimaryBtn":(m.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(m.appendChild(p),c.className="geBtn",p.className="geBtn gePrimaryBtn");b.appendChild(m);this.container=b};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,e){function d(){var a=null!=y.getTitle()?y.getTitle():this.defaultFilename;if(F.checked&&""!=u.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<D.length&&(b+="&s="+D);""!=q.value&&"0"!=q.value&&(b+="&border="+q.value);""!=g.value&&(b+="&height="+g.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(x.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+
+(l.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+p;h.mathEnabled&&(b+="&math=1");A.checked?b+="&edit=_blank":w.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else y.constructor==DriveFile||y.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?b+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(b+=y.getHash().substring(1),b=y.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
+encodeURIComponent(a)),""!=g.value&&(a=parseInt(g.value)+parseInt(f.value),b+="&height="+a),c.value=b):c.value=""}var b=document.createElement("div"),h=a.editor.graph,k=h.getGraphBounds(),m=h.view.scale,n=Math.floor(k.x/m-h.view.translate.x),p=Math.floor(k.y/m-h.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";b.appendChild(c);
+mxUtils.br(b);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=n;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type",
+"text");g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(k.height/m);b.appendChild(g);mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=e||"";
+b.appendChild(u);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";b.appendChild(q);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 x=document.createElement("input");
+x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,mxResources.get("zoom")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";w.setAttribute("title",window.location.href);b.appendChild(w);mxUtils.write(b,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";b.appendChild(A);mxUtils.write(b,
+mxResources.get("asNew")+" ");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;l.style.marginLeft="16px";b.appendChild(l);mxUtils.write(b,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("fit")+" ");var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft=
+"8px";b.appendChild(F);mxUtils.write(b,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),y=a.getCurrentFile();mxEvent.addListener(t,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(F,"change",d);mxEvent.addListener(g,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(u,"change",d);d();
+mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";k.appendChild(m);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,e,d){var b=document.createElement("div");b.style.textAlign=
+"right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);b.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";k.cellRenderer.installCellOverlayListeners=
+function(a,c,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(l){c.fireEvent(new mxEventObject("pointerdown","event",l,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(l){c.fireEvent(new mxEventObject("pointerdown","event",l,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
+!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=k.getDefaultParent(),p=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,l){k.connectionHandler.reset();k.clearSelection();var b=k.getCellGeometry(a),f;g(function(){f=k.insertVertex(n,null,"Entry",b.x,b.y,80,30,"rounded=1;");p(f);k.view.refresh(f);
+k.insertEdge(n,null,"",a,f,m)},function(){k.scrollCellToVisible(f)})});c.addListener("pointerdown",function(a,c){var b=c.getProperty("event"),l=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var f=mxUtils.convertPoint(k.container,mxEvent.getClientX(b),mxEvent.getClientY(b));k.connectionHandler.start(l,f.x,f.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(n,null,"Start",
+0,0,80,30,"ellipse"),p(c)}finally{k.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(k));if(null!=f){var g=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(l){throw l;}finally{var g=new mxMorphing(k);g.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));g.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,c,b,l,f){u.apply(this,arguments);g()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var q=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});q.className="geBtn";a.editor.cancelFirst&&b.appendChild(q);var t=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
+var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),b=a.editor.graph.view,f=b.getBounds(c);f.x-=b.translate.x;f.y-=b.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(c);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(q)};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){var e=document.createElement("div");e.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";e.appendChild(b);mxUtils.write(e,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(e);var b=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
-null!=b?b.src:"";var k=!1,l=function(){k||""==g.value||a.isOffline()?(m.value="",p.value=""):a.loadImage(mxUtils.trim(g.value),function(a){m.value=a.width;p.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";m.value="";p.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=e.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=
-b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,b,f,h,e){g.value=a;l()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(g.value=decodeURIComponent(f),l())}c.stopPropagation();c.preventDefault()}),!1)}};e.appendChild(g);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("width")+":");var m=document.createElement("input");
-m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=b?b.width:"";e.appendChild(m);mxUtils.write(e,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=b?b.height:"";e.appendChild(p);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";m.value="";p.value="";k=!1});mxEvent.addListener(b,"mousedown",
-function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";e.appendChild(b);mxUtils.br(e);mxEvent.addListener(g,"change",l);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&&(g.value=a.url,l()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+var BackgroundImageDialog=function(a,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";d.appendChild(b);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var b=a.editor.graph.backgroundImage,h=document.createElement("input");h.setAttribute("type","text");h.style.marginTop="4px";h.style.marginBottom="4px";h.style.width="350px";h.value=
+null!=b?b.src:"";var k=!1,m=function(){k||""==h.value||a.isOffline()?(n.value="",p.value=""):a.loadImage(mxUtils.trim(h.value),function(a){n.value=a.width;p.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));h.value="";n.value="";p.value=""})};this.init=function(){h.focus();if(Graph.fileSupport){h.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=d.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=
+b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,b,f,g,q){h.value=a;m()},function(){},
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(h.value=decodeURIComponent(f),m())}c.stopPropagation();c.preventDefault()}),!1)}};d.appendChild(h);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var n=document.createElement("input");
+n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.width:"";d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=b?b.height:"";d.appendChild(p);b=mxUtils.button(mxResources.get("reset"),function(){h.value="";n.value="";p.value="";k=!1});mxEvent.addListener(b,"mousedown",
+function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(h,"change",m);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&&(h.value=a.url,m()));h.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
f.className="geBtn";b.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=mxUtils.button(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.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=g.value?new mxImage(mxUtils.trim(g.value),m.value,p.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);e.appendChild(b);this.container=e},ParseDialog=function(a,d){function e(c,b){var f=c.split("\n");if("plantUmlPng"==b||"plantUmlSvg"==
-b||"plantUmlTxt"==b){var f="plantUmlTxt"==b?PLANT_URL+"/txt/":"plantUmlPng"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/",h=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var e=function(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?"_":"?"},q=function(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)},n=new XMLHttpRequest;n.open("GET",f+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+q(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+q(a.charCodeAt(k),0,0):r+q(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);"plantUmlTxt"!=b&&(n.responseType="blob");n.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==b){a.spinner.stop();h.getModel().beginUpdate();try{cell=h.insertVertex(null,
-null,"<pre>"+this.response+"</pre>",g.x,g.y,1,1,"text;html=1;overflow=fill;"),h.updateCellSize(cell,!0)}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())}else f=new FileReader,f.readAsDataURL(this.response),f.onload=function(f){var b=new Image;b.onload=function(){a.spinner.stop();var n=b.width,e=b.height;if(0==n&&0==e){var d=f.target.result,q=d.indexOf(","),d=decodeURIComponent(escape(atob(d.substring(q+1)))),d=mxUtils.parseXml(d).getElementsByTagName("svg");
-0<d.length&&(n=parseFloat(d[0].getAttribute("width")),e=parseFloat(d[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,c,g.x,g.y,n,e,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(f.target.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};b.src=f.target.result},f.onerror=function(c){a.handleError(c)};else a.spinner.stop(),a.handleError(f)};n.onerror=
-function(c){a.handleError(c)};n.send()}}else if("table"==b){for(var v=null,d=[],t=0,k=0;k<f.length;k++)if(n=mxUtils.trim(f[k]),"create table"==n.substring(0,12).toLowerCase())n=mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=n.substring(0,n.lastIndexOf(" "))),v=new mxCell(n,new mxGeometry(t,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
-v.vertex=!0,d.push(v),n=a.editor.graph.getPreferredSizeForCell(m),null!=n&&(v.geometry.width=n.width+10);else if(null!=v&&")"==n.charAt(0))t+=v.geometry.width+40,v=null;else if("("!=n&&null!=v&&(n=n.substring(0,","==n.charAt(n.length-1)?n.length-1:n.length),"primary key"!=n.substring(0,11).toLowerCase())){var l=n.toLowerCase().indexOf("primary key"),n=n.replace(/primary key/i,""),m=new mxCell(n,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-m.vertex=!0;n=sb.cloneCell(m,0<l?"PK":"");n.connectable=!1;n.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";n.geometry.width=30;n.geometry.height=26;m.insert(n);n=a.editor.graph.getPreferredSizeForCell(m);null!=n&&v.geometry.width<n.width+10&&(v.geometry.width=Math.min(220,n.width+10));v.insert(m);v.geometry.height+=26}0<d.length&&(h=a.editor.graph,
-f=h.view,n=h.getGraphBounds(),h.setSelectionCells(h.importCells(d,Math.ceil(Math.max(0,n.x/f.scale-f.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(n.y+n.height)/f.scale-f.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==b){if(0<f.length){h=a.editor.graph;v=new mxCell(f[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-v.vertex=!0;n=h.getPreferredSizeForCell(v);null!=n&&v.geometry.width<n.width+10&&(v.geometry.width=n.width+10);m=[v];if(1<f.length)for(k=1;k<f.length;k++)"--"==f[k]?(n=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;"),n.vertex=!0,v.geometry.height+=n.geometry.height,v.insert(n),m.push(n)):0<f[k].length&&";"!=f[k].charAt(0)&&(t=new mxCell(f[k],
-new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),t.vertex=!0,n=h.getPreferredSizeForCell(t),null!=n&&t.geometry.width<n.width&&(t.geometry.width=n.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t),m.push(t));h.getModel().beginUpdate();try{v=h.importCells([v],g.x,g.y)[0],h.fireEvent(new mxEventObject("cellsInserted",
-"cells",[v].concat(v.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(v);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var m=function(a){var c=p[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,p[a]=c,d.push(c));return c},p={},d=[],k=0;k<f.length;k++)if(";"!=f[k].charAt(0)){var H=f[k].split("->");2<=H.length&&(t=m(H[0]),l=m(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,t.insertEdge(H,!0),l.insertEdge(H,!1),
-d.push(H))}if(0<d.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);h=new Graph(f);h.getModel().beginUpdate();try{d=h.importCells(d);for(k=0;k<d.length;k++)h.getModel().isVertex(d[k])&&(n=h.getPreferredSizeForCell(d[k]),d[k].geometry.width=Math.max(d[k].geometry.width,n.width),d[k].geometry.height=Math.max(d[k].geometry.height,n.height));v=new mxFastOrganicLayout(h);v.disableEdgeStyle=!1;v.forceConstant=120;v.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();
-m=[];a.editor.graph.getModel().beginUpdate();try{m=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());h.destroy();f.parentNode.removeChild(f)}}}function b(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
-"table"==m.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==m.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"==m.value||"plantUmlTxt"==m.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(),k=document.createElement("div");k.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height="354px";l.style.marginBottom="16px";
-var m=document.createElement("select"),p=document.createElement("option");p.setAttribute("value","list");p.setAttribute("selected","selected");mxUtils.write(p,mxResources.get("list"));m.appendChild(p);p=document.createElement("option");p.setAttribute("value","table");mxUtils.write(p,mxResources.get("table"));m.appendChild(p);p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));m.appendChild(p);p=document.createElement("option");p.setAttribute("value",
-"plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(m.appendChild(p),m.appendChild(c),
-m.appendChild(f));var h=b();l.value=h;k.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){l.value=a.target.result};c.readAsText(a)}},!1));k.appendChild(m);mxEvent.addListener(m,"change",function(){var a=b();if(0==l.value.length||
-l.value==h)h=a,l.value=h});p=mxUtils.button(mxResources.get("close"),function(){l.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&k.appendChild(p);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();e(l.value,m.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(p);this.container=k},NewDialog=function(a,d,e,b,g,k,l,m,p,c,f,h,t,q,u){function w(){for(var a=
-!0;D<M.length&&(a||0!=mxUtils.mod(D,30));)a=M[D++],n(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function x(){if(O)e||a.hideDialog(),q(O,N,A.value);else if(b)e||a.hideDialog(),b(T,A.value);else{var c=A.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(f){a.createFile(c,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
-null,f)})}}function y(a,c,f,b,n){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");F.removeAttribute("disabled");T=c;V=f;R=a;O=b;N=n;R.style.backgroundColor=m;R.style.border=p}function n(a,c,f,b,n,h,e,d){var q=document.createElement("div");q.className="geTemplate";q.style.height=S+"px";q.style.width=Y+"px";null!=b&&0<b.length&&q.setAttribute("title",b);if(null!=h)q.style.backgroundImage="url("+h+")",q.style.backgroundSize="contain",q.style.backgroundPosition=
-"center center",q.style.backgroundRepeat="no-repeat",mxEvent.addListener(q,"click",function(c){y(q,null,null,a,e)}),mxEvent.addListener(q,"dblclick",function(a){x()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);q.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(q,"click",function(f){F.setAttribute("disabled","disabled");q.style.backgroundColor="transparent";
-q.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(q,a.getText(),c),v&&x())}))});mxEvent.addListener(q,"dblclick",function(a){v=!0})}else q.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(f)+"</td></tr></table>",n&&y(q),null!=d?mxEvent.addListener(q,"click",d):(mxEvent.addListener(q,"click",function(a){y(q)}),mxEvent.addListener(q,"dblclick",function(a){x()}));
-K.appendChild(q)}function v(){mxEvent.addListener(K,"scroll",function(a){K.scrollTop+K.clientHeight>=K.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,f;for(f in I){var b=document.createElement("div"),n=mxResources.get(f),h=I[f];null==n&&(n=f.substring(0,1).toUpperCase()+f.substring(1));18<n.length&&(n=n.substring(0,18)+"&hellip;");b.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";b.setAttribute("title",n+" ("+
-h.length+")");mxUtils.write(b,b.getAttribute("title"));null!=c&&(b.style.padding=c);P.appendChild(b);null==a&&(a=b,a.style.backgroundColor=l);(function(c,f){mxEvent.addListener(b,"click",function(){a!=f&&(a.style.backgroundColor="",a=f,a.style.backgroundColor=l,K.scrollTop=0,K.innerHTML="",D=0,M=I[c],B=null,w())})})(f,b)}w()}e=null!=e?e:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";m=null!=m?m:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var G=document.createElement("div");
-G.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";e&&G.appendChild(E);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width="40px";z.style.height="40px";z.style.marginRight="10px";z.style.paddingBottom="4px";z.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_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&e&&E.appendChild(z);e&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");z=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?z=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?z=a.dropbox.extension:
-a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?z=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?z=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(z=a.trello.extension);var A=document.createElement("input");A.setAttribute("value",a.defaultFilename+z);A.style.marginRight="20px";A.style.marginLeft="10px";A.style.width=d?"220px":"430px";this.init=function(){e&&(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll",
-!1,null))};e&&E.appendChild(A);var E=!1,D=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");x();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(h||t){var H=[],B=null,L=function(a){F.setAttribute("disabled","disabled");for(var c=0;c<H.length;c++)H[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},E=!0,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);var C=mxUtils.button(mxResources.get("Templates",
-null,"Templates"),function(){P.style.display="";K.style.left="160px";L(0);K.scrollTop=0;K.innerHTML="";D=0;B!=M&&(M=B,w(),B=null)});H.push(C);z.appendChild(C);var J=function(a){P.style.display="none";K.style.left="30px";L(a?-1:1);null==B&&(B=M);K.scrollTop=0;K.innerHTML="";var c=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});c.spin(K);D=0;var f=function(a,f){c.stop();M=a;f?K.innerHTML=f:0==a.length?K.innerHTML=
-mxResources.get("noDiagrams",null,"No Diagrams Found"):(K.innerHTML="",w())};a?t(Q.value,f):h(f)};h&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){J()}),z.appendChild(C),H.push(C));if(t){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxResources.get("search")+":";z.appendChild(C);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(a){13==a.keyCode&&
-J(!0)});z.appendChild(Q);C=mxUtils.button(mxResources.get("search"),function(){J(!0)});C.className="geBtn";z.appendChild(C)}L(0)}var V=null,T=null,R=null,O=null,N=null,K=document.createElement("div");K.style.border="1px solid #d3d3d3";K.style.position="absolute";K.style.left="160px";K.style.right="34px";E=(e?72:40)+(E?30:0);K.style.top=E+"px";K.style.bottom="68px";K.style.margin="6px 0 0 -1px";K.style.padding="6px";K.style.overflow="auto";var P=document.createElement("div");P.style.cssText="position:absolute;left:30px;width:128px;top:"+
-E+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,I={},aa=1;I.basic=[{title:"blankDiagram",select:!0}];var M=I.basic;if(!d){G.appendChild(P);G.appendChild(K);var X=!1;mxUtils.get(f,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var f=c.indexOf("/"),c=c.substring(0,f),f=I[c];null==f&&(aa++,f=[],I[c]=f);f.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),
-title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}v()}})}mxEvent.addListener(A,"keypress",function(a){13==a.keyCode&&x()});f=document.createElement("div");f.style.marginTop=d?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";E=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});E.className="geBtn";!a.editor.cancelFirst||g&&null==k||f.appendChild(E);d||a.isOffline()||
-!e||null!=b||g||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",f.appendChild(z));d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(A.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?
-window.location.href=c:window.openWindow(c))},mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),d.className="geBtn",f.appendChild(d));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(f){a.openFiles(c.files,!0)});c.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(F);a.editor.cancelFirst||null!=
-b||g&&null==k||f.appendChild(E);G.appendChild(f);this.container=G},CreateDialog=function(a,d,e,b,g,k,l,m,p,c,f,h,t,q,u){function w(c,f,b,n){function q(){mxEvent.addListener(e,"click",function(){var c=b;if(l){var f=v.value,n=f.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>n){var c=null!=c?c:z.value,h="";c==App.MODE_GOOGLE?h=a.drive.extension:c==App.MODE_GITHUB?h=a.gitHub.extension:c==App.MODE_TRELLO?h=a.trello.extension:c==App.MODE_DROPBOX?h=a.dropbox.extension:c==App.MODE_ONEDRIVE?h=a.oneDrive.extension:
-c==App.MODE_DEVICE&&(h=".xml");0<=n&&(f=f.substring(0,n));v.value=f+h}}x(b)})}var e=document.createElement("a");e.style.overflow="hidden";var t=document.createElement("img");t.src=c;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace=
-"nowrap";e.appendChild(t);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var u=document.createElement("div");e.appendChild(u);mxUtils.write(u,f);if(null!=n&&null==a[n]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var g=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});g.spin(e);var y=window.setTimeout(function(){null==a[n]&&(g.stop(),e.style.display=
-"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[n]&&(window.clearTimeout(y),mxUtils.setOpacity(u,100),t.style.visibility="",g.stop(),q())}))}else q();G.appendChild(e);++E==h&&(mxUtils.br(G),E=0)}function x(c){var f=v.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),e(f,c)}l=null!=l?l:!0;m=null!=m?m:!0;h=null!=h?h:4;var y=document.createElement("div");null==b&&a.addLanguageMenu(y);var n=document.createElement("h2");mxUtils.write(n,g||mxResources.get("create"));n.style.marginTop=
-"0px";n.style.marginBottom="24px";y.appendChild(n);mxUtils.write(y,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",d);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};y.appendChild(v);null!=t&&null!=q&&"image/"==q.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==
-q&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(t),t=g.getElementsByTagName("svg")[0],q=parseInt(t.getAttribute("width")),u=parseInt(t.getAttribute("height")),t.setAttribute("viewBox","0 0 "+q+" "+u),t.setAttribute("width","120px"),t.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src","data:"+q+(u?";base64,":";utf8,")+t)),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%)"),y.appendChild(g),p&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){x("_blank")})));mxUtils.br(y);var G=document.createElement("div");G.style.textAlign="center";var E=0;G.style.marginTop="6px";y.appendChild(G);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),
-mxUtils.write(g,mxResources.get("googleDrive")),z.appendChild(g),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),z.appendChild(g),a.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
-"function"===typeof window.DropboxClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),z.appendChild(g),a.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),z.appendChild(g),w(IMAGE_PATH+"/github-logo.svg",
-mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),z.appendChild(g),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),
-z.appendChild(g),a.mode!=App.MODE_DEVICE&&m||g.setAttribute("selected","selected"),f&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),z.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");
-m.style.marginTop="26px";m.style.textAlign="center";null!=c&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),g.className="geBtn",m.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&m.appendChild(g);null==b&&(t=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),t.className="geBtn",m.appendChild(t));p&&(p=
-mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),p.className="geBtn",m.appendChild(p));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){x(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",m.appendChild(k));a.editor.cancelFirst||m.appendChild(g);mxEvent.addListener(v,"keypress",function(c){13==c.keyCode?x(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(m);this.container=y},PopupDialog=
-function(a,d,e,b,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});l.className="geBtn";l.style.marginBottom="8px";l.style.width="280px";k.appendChild(l);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=e&&e();a.openLink(d)});m.className=
-"geBtn gePrimaryBtn";m.style.width=l.style.width;k.appendChild(m);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,d,e,b,g,k){k=null!=k?k:!0;var l=a.editor.graph,m=document.createElement("div");mxUtils.write(m,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";mxClient.IS_VML||
-(d.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",e);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition=
-"100% 50%";p.style.paddingRight="14px";e=document.createElement("div");e.setAttribute("title",mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height="14px";e.style.cursor="pointer";e.style.display=mxClient.IS_VML?"inline":"inline-block";e.style.top=(mxClient.IS_VML?0:3)+"px";e.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){p.value="";p.focus()});d.appendChild(p);d.appendChild(e);m.appendChild(d);
-var c=function(c,f,h,e){var q="data:"==c.substring(0,5);!a.isOffline()||q&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(n){a.spinner.stop();a.hideDialog();var q=!1===e?1:null!=f&&null!=h?Math.max(f/n.width,h/n.height):Math.min(1,Math.min(520/n.width,520/n.height));k&&(c=a.convertDataUri(c));b(c,Math.round(Number(n.width)*q),Math.round(Number(n.height)*q))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),f=null==f?120:f,h=null==h?100:h,a.hideDialog(),b(c,f,h))},f=function(f,h){if(null!=f){var e=g?null:l.getModel().getGeometry(l.getSelectionCell());null!=e?c(f,e.width,e.height,h):c(f,null,null,h)}else a.hideDialog(),b(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=m.parentNode,b=null;mxEvent.addListener(c,"dragleave",
-function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,function(a,c,b,h,e,d,q,t){f(a,
-t)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var h=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&f(decodeURIComponent(h))}c.stopPropagation();c.preventDefault()}),!1)}};e=document.createElement("div");e.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";e.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),
-function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&e.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&&(p.value=a.url));p.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(c){a.importFiles(h.files,
-0,0,a.maxImageSize,function(a,c,b,h,n,e){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var t=mxUtils.button(mxResources.get("open"),function(){h.click()});t.className="geBtn";e.appendChild(t)}}document.createElement("canvas").getContext&&"data:image/"==p.value.substring(0,11)&&"data:image/svg"!=p.value.substring(0,14)&&(t=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a,p.value,function(a){p.value=
-a});a.showDialog(c.container,200,180,!0,!0);c.init()}),t.className="geBtn",e.appendChild(t));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(t=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
-t.className="geBtn",e.appendChild(t),null!=a.drive&&"1"==urlParams.photos&&(t=mxUtils.button(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.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),t.className="geBtn",e.appendChild(t)));mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&f(p.value)});t=mxUtils.button(mxResources.get("apply"),function(){f(p.value)});t.className="geBtn gePrimaryBtn";e.appendChild(t);a.editor.cancelFirst||e.appendChild(d);Graph.fileSupport&&(e.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition=
-"center 65%",m.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")),m.appendChild(d));m.appendChild(e);this.container=m},LinkDialog=function(a,d,e,b,g){function k(a,c,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
-c.style.width="26px";c.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(c);x.appendChild(f)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.style.paddingRight="20px");var p=document.createElement("input");
+a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e(""!=h.value?new mxImage(mxUtils.trim(h.value),n.value,p.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},ParseDialog=function(a,e){function d(c,b){var f=c.split("\n");if("plantUmlPng"==b||"plantUmlSvg"==
+b||"plantUmlTxt"==b){var f="plantUmlTxt"==b?PLANT_URL+"/txt/":"plantUmlPng"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var q=function(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?"_":"?"},d=function(a,c,f){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|f>>6;c4=f&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=
+q(c4&63)},l=new XMLHttpRequest;l.open("GET",f+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+d(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+d(a.charCodeAt(k),0,0):r+d(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);"plantUmlTxt"!=b&&(l.responseType="blob");l.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==b){a.spinner.stop();g.getModel().beginUpdate();try{cell=g.insertVertex(null,
+null,"<pre>"+this.response+"</pre>",h.x,h.y,1,1,"text;html=1;overflow=fill;"),g.updateCellSize(cell,!0)}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())}else f=new FileReader,f.readAsDataURL(this.response),f.onload=function(f){var b=new Image;b.onload=function(){a.spinner.stop();var l=b.width,q=b.height;if(0==l&&0==q){var w=f.target.result,d=w.indexOf(","),w=decodeURIComponent(escape(atob(w.substring(d+1)))),w=mxUtils.parseXml(w).getElementsByTagName("svg");
+0<w.length&&(l=parseFloat(w[0].getAttribute("width")),q=parseFloat(w[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,c,h.x,h.y,l,q,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(f.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};b.src=f.target.result},f.onerror=function(c){a.handleError(c)};else a.spinner.stop(),a.handleError(f)};l.onerror=
+function(c){a.handleError(c)};l.send()}}else if("table"==b){for(var v=null,e=[],u=0,k=0;k<f.length;k++)if(l=mxUtils.trim(f[k]),"create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),v=new mxCell(l,new mxGeometry(u,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
+v.vertex=!0,e.push(v),l=a.editor.graph.getPreferredSizeForCell(n),null!=l&&(v.geometry.width=l.width+10);else if(null!=v&&")"==l.charAt(0))u+=v.geometry.width+40,v=null;else if("("!=l&&null!=v&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var m=l.toLowerCase().indexOf("primary key"),l=l.replace(/primary key/i,""),n=new mxCell(l,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+n.vertex=!0;l=sb.cloneCell(n,0<m?"PK":"");l.connectable=!1;l.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";l.geometry.width=30;l.geometry.height=26;n.insert(l);l=a.editor.graph.getPreferredSizeForCell(n);null!=l&&v.geometry.width<l.width+10&&(v.geometry.width=Math.min(220,l.width+10));v.insert(n);v.geometry.height+=26}0<e.length&&(g=a.editor.graph,
+f=g.view,l=g.getGraphBounds(),g.setSelectionCells(g.importCells(e,Math.ceil(Math.max(0,l.x/f.scale-f.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(l.y+l.height)/f.scale-f.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==b){if(0<f.length){g=a.editor.graph;v=new mxCell(f[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+v.vertex=!0;l=g.getPreferredSizeForCell(v);null!=l&&v.geometry.width<l.width+10&&(v.geometry.width=l.width+10);n=[v];if(1<f.length)for(k=1;k<f.length;k++)"--"==f[k]?(l=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;"),l.vertex=!0,v.geometry.height+=l.geometry.height,v.insert(l),n.push(l)):0<f[k].length&&";"!=f[k].charAt(0)&&(u=new mxCell(f[k],
+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;"),u.vertex=!0,l=g.getPreferredSizeForCell(u),null!=l&&u.geometry.width<l.width&&(u.geometry.width=l.width),v.geometry.width=Math.max(v.geometry.width,u.geometry.width),v.geometry.height+=u.geometry.height,v.insert(u),n.push(u));g.getModel().beginUpdate();try{v=g.importCells([v],h.x,h.y)[0],g.fireEvent(new mxEventObject("cellsInserted",
+"cells",[v].concat(v.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(v);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var n=function(a){var c=p[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,p[a]=c,e.push(c));return c},p={},e=[],k=0;k<f.length;k++)if(";"!=f[k].charAt(0)){var G=f[k].split("->");2<=G.length&&(u=n(G[0]),m=n(G[G.length-1]),G=new mxCell(2<G.length?G[1]:"",new mxGeometry),G.edge=!0,u.insertEdge(G,!0),m.insertEdge(G,!1),
+e.push(G))}if(0<e.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);g=new Graph(f);g.getModel().beginUpdate();try{e=g.importCells(e);for(k=0;k<e.length;k++)g.getModel().isVertex(e[k])&&(l=g.getPreferredSizeForCell(e[k]),e[k].geometry.width=Math.max(e[k].geometry.width,l.width),e[k].geometry.height=Math.max(e[k].geometry.height,l.height));v=new mxFastOrganicLayout(g);v.disableEdgeStyle=!1;v.forceConstant=120;v.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();
+n=[];a.editor.graph.getModel().beginUpdate();try{n=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),h.x,h.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(n[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();f.parentNode.removeChild(f)}}}function b(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
+"table"==n.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==n.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"==n.value||"plantUmlTxt"==n.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 h=a.editor.graph.getFreeInsertPoint(),k=document.createElement("div");k.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 n=document.createElement("select"),p=document.createElement("option");p.setAttribute("value","list");p.setAttribute("selected","selected");mxUtils.write(p,mxResources.get("list"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value","table");mxUtils.write(p,mxResources.get("table"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value",
+"plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(n.appendChild(p),n.appendChild(c),
+n.appendChild(f));var g=b();m.value=g;k.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 c=new FileReader;c.onload=function(a){m.value=a.target.result};c.readAsText(a)}},!1));k.appendChild(n);mxEvent.addListener(n,"change",function(){var a=b();if(0==m.value.length||
+m.value==g)g=a,m.value=g});p=mxUtils.button(mxResources.get("close"),function(){m.value==g?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&k.appendChild(p);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(m.value,n.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(p);this.container=k},NewDialog=function(a,e,d,b,h,k,m,n,p,c,f,g,u,q,t){function x(){for(var a=
+!0;z<M.length&&(a||0!=mxUtils.mod(z,30));)a=M[z++],l(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function w(){if(O)d||a.hideDialog(),q(O,N,B.value);else if(b)d||a.hideDialog(),b(T,B.value);else{var c=B.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(f){a.createFile(c,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
+null,f)})}}function A(a,c,f,b,l){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");C.removeAttribute("disabled");T=c;V=f;R=a;O=b;N=l;R.style.backgroundColor=n;R.style.border=p}function l(a,c,f,b,l,g,q,d){var e=document.createElement("div");e.className="geTemplate";e.style.height=S+"px";e.style.width=Y+"px";null!=b&&0<b.length&&e.setAttribute("title",b);if(null!=g)e.style.backgroundImage="url("+g+")",e.style.backgroundSize="contain",e.style.backgroundPosition=
+"center center",e.style.backgroundRepeat="no-repeat",mxEvent.addListener(e,"click",function(c){A(e,null,null,a,q)}),mxEvent.addListener(e,"dblclick",function(a){w()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);e.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(e,"click",function(f){C.setAttribute("disabled","disabled");e.style.backgroundColor="transparent";
+e.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(A(e,a.getText(),c),v&&w())}))});mxEvent.addListener(e,"dblclick",function(a){v=!0})}else e.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(f)+"</td></tr></table>",l&&A(e),null!=d?mxEvent.addListener(e,"click",d):(mxEvent.addListener(e,"click",function(a){A(e)}),mxEvent.addListener(e,"dblclick",function(a){w()}));
+K.appendChild(e)}function v(){mxEvent.addListener(K,"scroll",function(a){K.scrollTop+K.clientHeight>=K.scrollHeight&&(x(),mxEvent.consume(a))});var a=null,f;for(f in I){var b=document.createElement("div"),l=mxResources.get(f),g=I[f];null==l&&(l=f.substring(0,1).toUpperCase()+f.substring(1));18<l.length&&(l=l.substring(0,18)+"&hellip;");b.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";b.setAttribute("title",l+" ("+
+g.length+")");mxUtils.write(b,b.getAttribute("title"));null!=c&&(b.style.padding=c);P.appendChild(b);null==a&&(a=b,a.style.backgroundColor=m);(function(c,f){mxEvent.addListener(b,"click",function(){a!=f&&(a.style.backgroundColor="",a=f,a.style.backgroundColor=m,K.scrollTop=0,K.innerHTML="",z=0,M=I[c],E=null,x())})})(f,b)}x()}d=null!=d?d:!0;h=null!=h?h:!1;m=null!=m?m:"#ebf2f9";n=null!=n?n:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var F=document.createElement("div");
+F.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&F.appendChild(D);var y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="40px";y.style.height="40px";y.style.marginRight="10px";y.style.paddingBottom="4px";y.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_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&d&&D.appendChild(y);d&&mxUtils.write(D,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");y=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?y=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?y=a.dropbox.extension:
+a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?y=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?y=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(y=a.trello.extension);var B=document.createElement("input");B.setAttribute("value",a.defaultFilename+y);B.style.marginRight="20px";B.style.marginLeft="10px";B.style.width=e?"220px":"430px";this.init=function(){d&&(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",
+!1,null))};d&&D.appendChild(B);var D=!1,z=0,C=mxUtils.button(mxResources.get("create"),function(){C.setAttribute("disabled","disabled");w();C.removeAttribute("disabled")});C.className="geBtn gePrimaryBtn";if(g||u){var G=[],E=null,J=function(a){C.setAttribute("disabled","disabled");for(var c=0;c<G.length;c++)G[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},D=!0,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="30px";F.appendChild(y);var H=mxUtils.button(mxResources.get("Templates",
+null,"Templates"),function(){P.style.display="";K.style.left="160px";J(0);K.scrollTop=0;K.innerHTML="";z=0;E!=M&&(M=E,x(),E=null)});G.push(H);y.appendChild(H);var L=function(a){P.style.display="none";K.style.left="30px";J(a?-1:1);null==E&&(E=M);K.scrollTop=0;K.innerHTML="";var c=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});c.spin(K);z=0;var f=function(a,f){c.stop();M=a;f?K.innerHTML=f:0==a.length?K.innerHTML=
+mxResources.get("noDiagrams",null,"No Diagrams Found"):(K.innerHTML="",x())};a?u(Q.value,f):g(f)};g&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),y.appendChild(H),G.push(H));if(u){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxResources.get("search")+":";y.appendChild(H);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(a){13==a.keyCode&&
+L(!0)});y.appendChild(Q);H=mxUtils.button(mxResources.get("search"),function(){L(!0)});H.className="geBtn";y.appendChild(H)}J(0)}var V=null,T=null,R=null,O=null,N=null,K=document.createElement("div");K.style.border="1px solid #d3d3d3";K.style.position="absolute";K.style.left="160px";K.style.right="34px";D=(d?72:40)+(D?30:0);K.style.top=D+"px";K.style.bottom="68px";K.style.margin="6px 0 0 -1px";K.style.padding="6px";K.style.overflow="auto";var P=document.createElement("div");P.style.cssText="position:absolute;left:30px;width:128px;top:"+
+D+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,I={},aa=1;I.basic=[{title:"blankDiagram",select:!0}];var M=I.basic;if(!e){F.appendChild(P);F.appendChild(K);var X=!1;mxUtils.get(f,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var f=c.indexOf("/"),c=c.substring(0,f),f=I[c];null==f&&(aa++,f=[],I[c]=f);f.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),
+title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}v()}})}mxEvent.addListener(B,"keypress",function(a){13==a.keyCode&&w()});f=document.createElement("div");f.style.marginTop=e?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});D.className="geBtn";!a.editor.cancelFirst||h&&null==k||f.appendChild(D);e||a.isOffline()||
+!d||null!=b||h||(y=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",f.appendChild(y));e||"1"==urlParams.embed||h||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(B.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?
+window.location.href=c:window.openWindow(c))},mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",f.appendChild(e));Graph.fileSupport&&t&&(t=mxUtils.button(mxResources.get("import"),function(){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(f){a.openFiles(c.files,!0)});c.click()}),t.className="geBtn",f.appendChild(t));f.appendChild(C);a.editor.cancelFirst||null!=
+b||h&&null==k||f.appendChild(D);F.appendChild(f);this.container=F},CreateDialog=function(a,e,d,b,h,k,m,n,p,c,f,g,u,q,t){function x(c,f,b,l){function q(){mxEvent.addListener(d,"click",function(){var c=b;if(m){var f=v.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:y.value,g="";c==App.MODE_GOOGLE?g=a.drive.extension:c==App.MODE_GITHUB?g=a.gitHub.extension:c==App.MODE_TRELLO?g=a.trello.extension:c==App.MODE_DROPBOX?g=a.dropbox.extension:c==App.MODE_ONEDRIVE?g=a.oneDrive.extension:
+c==App.MODE_DEVICE&&(g=".xml");0<=l&&(f=f.substring(0,l));v.value=f+g}}w(b)})}var d=document.createElement("a");d.style.overflow="hidden";var t=document.createElement("img");t.src=c;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.className="geBaseButton";d.style.position="relative";d.style.margin="4px";d.style.padding="8px 8px 10px 8px";d.style.whiteSpace=
+"nowrap";d.appendChild(t);mxClient.IS_QUIRKS&&(d.style.cssFloat="left",d.style.zoom="1");d.style.color="gray";d.style.fontSize="11px";var h=document.createElement("div");d.appendChild(h);mxUtils.write(h,f);if(null!=l&&null==a[l]){t.style.visibility="hidden";mxUtils.setOpacity(h,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(d);var A=window.setTimeout(function(){null==a[l]&&(u.stop(),d.style.display=
+"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(A),mxUtils.setOpacity(h,100),t.style.visibility="",u.stop(),q())}))}else q();F.appendChild(d);++D==g&&(mxUtils.br(F),D=0)}function w(c){var f=v.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),d(f,c)}m=null!=m?m:!0;n=null!=n?n:!0;g=null!=g?g:4;var A=document.createElement("div");null==b&&a.addLanguageMenu(A);var l=document.createElement("h2");mxUtils.write(l,h||mxResources.get("create"));l.style.marginTop=
+"0px";l.style.marginBottom="24px";A.appendChild(l);mxUtils.write(A,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",e);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};A.appendChild(v);null!=u&&null!=q&&"image/"==q.substring(0,6)&&(v.style.width="160px",h=null,"image/svg+xml"==
+q&&mxClient.IS_SVG?(h=document.createElement("div"),h.innerHTML=mxUtils.trim(u),u=h.getElementsByTagName("svg")[0],q=parseInt(u.getAttribute("width")),t=parseInt(u.getAttribute("height")),u.setAttribute("viewBox","0 0 "+q+" "+t),u.setAttribute("width","120px"),u.setAttribute("height","80px")):(h=document.createElement("img"),h.setAttribute("src","data:"+q+(t?";base64,":";utf8,")+u)),h.style.position="absolute",h.style.top="70px",h.style.right="100px",h.style.maxWidth="120px",h.style.maxHeight="80px",
+mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),A.appendChild(h),p&&(h.style.cursor="pointer",mxEvent.addListener(h,"click",function(){w("_blank")})));mxUtils.br(A);var F=document.createElement("div");F.style.textAlign="center";var D=0;F.style.marginTop="6px";A.appendChild(F);var y=document.createElement("select");y.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GOOGLE),
+mxUtils.write(h,mxResources.get("googleDrive")),y.appendChild(h),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(h,mxResources.get("oneDrive")),y.appendChild(h),a.mode==App.MODE_ONEDRIVE&&h.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
+"function"===typeof window.DropboxClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(h,mxResources.get("dropbox")),y.appendChild(h),a.mode==App.MODE_DROPBOX&&h.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GITHUB),mxUtils.write(h,mxResources.get("github")),y.appendChild(h),x(IMAGE_PATH+"/github-logo.svg",
+mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_TRELLO),mxUtils.write(h,mxResources.get("trello")),y.appendChild(h),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)h=document.createElement("option"),h.setAttribute("value",App.MODE_DEVICE),mxUtils.write(h,mxResources.get("device")),
+y.appendChild(h),a.mode!=App.MODE_DEVICE&&n||h.setAttribute("selected","selected"),f&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),y.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");
+n.style.marginTop="26px";n.style.textAlign="center";null!=c&&(h=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),h.className="geBtn",n.appendChild(h));h=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});h.className="geBtn";a.editor.cancelFirst&&n.appendChild(h);null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){w(null)}),u.className="geBtn",n.appendChild(u));p&&(p=
+mxUtils.button(mxResources.get("openInNewWindow"),function(){w("_blank")}),p.className="geBtn",n.appendChild(p));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){w(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",n.appendChild(k));a.editor.cancelFirst||n.appendChild(h);mxEvent.addListener(v,"keypress",function(c){13==c.keyCode?w(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});A.appendChild(n);this.container=A},PopupDialog=
+function(a,e,d,b,h){h=null!=h?h:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=b&&b()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";k.appendChild(m);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=d&&d();a.openLink(e)});n.className=
+"geBtn gePrimaryBtn";n.style.width=m.style.width;k.appendChild(n);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,e,d,b,h,k){k=null!=k?k:!0;var m=a.editor.graph,n=document.createElement("div");mxUtils.write(n,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||
+(e.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",d);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition=
+"100% 50%";p.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){p.value="";p.focus()});e.appendChild(p);e.appendChild(d);n.appendChild(e);
+var c=function(c,f,g,w){var q="data:"==c.substring(0,5);!a.isOffline()||q&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(l){a.spinner.stop();a.hideDialog();var q=!1===w?1:null!=f&&null!=g?Math.max(f/l.width,g/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(c=a.convertDataUri(c));b(c,Math.round(Number(l.width)*q),Math.round(Number(l.height)*q))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),f=null==f?120:f,g=null==g?100:g,a.hideDialog(),b(c,f,g))},f=function(f,g){if(null!=f){var q=h?null:m.getModel().getGeometry(m.getSelectionCell());null!=q?c(f,q.width,q.height,g):c(f,null,null,g)}else a.hideDialog(),b(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=n.parentNode,b=null;mxEvent.addListener(c,"dragleave",
+function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,function(a,c,b,g,q,w,d,e){f(a,
+e)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var g=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(g)&&f(decodeURIComponent(g))}c.stopPropagation();c.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),
+function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);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&&(p.value=a.url));p.focus()};if(Graph.fileSupport){var g=document.createElement("input");g.setAttribute("multiple","multiple");g.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(g,"change",function(c){a.importFiles(g.files,
+0,0,a.maxImageSize,function(a,c,b,g,l,q){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var u=mxUtils.button(mxResources.get("open"),function(){g.click()});u.className="geBtn";d.appendChild(u)}}document.createElement("canvas").getContext&&"data:image/"==p.value.substring(0,11)&&"data:image/svg"!=p.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a,p.value,function(a){p.value=
+a});a.showDialog(c.container,200,180,!0,!0);c.init()}),u.className="geBtn",d.appendChild(u));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(u=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
+u.className="geBtn",d.appendChild(u),null!=a.drive&&"1"==urlParams.photos&&(u=mxUtils.button(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.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),u.className="geBtn",d.appendChild(u)));mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&f(p.value)});u=mxUtils.button(mxResources.get("apply"),function(){f(p.value)});u.className="geBtn gePrimaryBtn";d.appendChild(u);a.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
+"center 65%",n.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),n.appendChild(e));n.appendChild(d);this.container=n},LinkDialog=function(a,e,d,b,h){function k(a,c,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
+c.style.width="26px";c.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(c);w.appendChild(f)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var p=document.createElement("input");
p.setAttribute("placeholder",mxResources.get("dragUrlsHere"));p.setAttribute("type","text");p.style.marginTop="6px";p.style.width="400px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";var 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=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){p.value="";p.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
-h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var t=document.createElement("select");t.style.width="380px";if(g&&null!=a.pages){null!=d&&a.editor.graph.isPageLink(d)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(p.setAttribute("value",d),f.setAttribute("checked","checked"),f.defaultChecked=!0);p.style.width="380px";m.appendChild(f);m.appendChild(p);m.appendChild(c);mxUtils.br(m);m.appendChild(h);g=!1;for(c=0;c<a.pages.length;c++){var q=
-document.createElement("option");mxUtils.write(q,a.pages[c].getName()||mxResources.get("pageWithNumber",[c+1]));q.setAttribute("value","data:page/id,"+a.pages[c].getId());d==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);t.appendChild(q)}if(!g&&h.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");t.appendChild(u);mxEvent.addListener(t,
-"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}m.appendChild(t)}else p.setAttribute("value",d),m.appendChild(p),m.appendChild(c);l.appendChild(m);var w=mxUtils.button(e,function(){a.hideDialog();b(h.checked?"pageNotFound"!==t.value?t.value:d:p.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){h.checked?t.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(t,"focus",function(){f.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});mxEvent.addListener(p,"focus",function(){h.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var c=l.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",
-mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
-x.style.marginTop="20px";x.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.style.verticalAlign="middle";e.className="geBtn";a.editor.cancelFirst&&x.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c=
+c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){p.value="";p.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";
+g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="380px";if(h&&null!=a.pages){null!=e&&a.editor.graph.isPageLink(e)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(p.setAttribute("value",e),f.setAttribute("checked","checked"),f.defaultChecked=!0);p.style.width="380px";n.appendChild(f);n.appendChild(p);n.appendChild(c);mxUtils.br(n);n.appendChild(g);h=!1;for(c=0;c<a.pages.length;c++){var q=
+document.createElement("option");mxUtils.write(q,a.pages[c].getName()||mxResources.get("pageWithNumber",[c+1]));q.setAttribute("value","data:page/id,"+a.pages[c].getId());e==q.getAttribute("value")&&(q.setAttribute("selected","selected"),h=!0);u.appendChild(q)}if(!h&&g.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");u.appendChild(t);mxEvent.addListener(u,
+"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}n.appendChild(u)}else p.setAttribute("value",e),n.appendChild(p),n.appendChild(c);m.appendChild(n);var x=mxUtils.button(d,function(){a.hideDialog();b(g.checked?"pageNotFound"!==u.value?u.value:e:p.value,LinkDialog.selectedDocs)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?u.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){f.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){g.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var c=m.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",
+mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,x.click());a.stopPropagation();a.preventDefault()}),!1)}};var w=document.createElement("div");
+w.style.marginTop="20px";w.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&w.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c=
"https://"+c+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(c=DriveClient.prototype.newAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+a.docs[0].id);p.value=c;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(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 c=gapi.auth.getToken().access_token,f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
-c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(f).addView(b).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&c.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+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 c=gapi.auth.getToken().access_token,f=(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).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
+c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(f).addView(b).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&c.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.linkPicker=c.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){p.value=a[0].link;p.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,c){p.value=c.value[0].webUrl;
-p.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],f=a[1],b=a[2];a=a.slice(3,a.length).join("/");p.value="https://github.com/"+c+"/"+f+"/blob/"+b+"/"+a;p.focus()}})});mxEvent.addListener(p,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(h.checked?t.value:p.value,LinkDialog.selectedDocs))});x.appendChild(w);a.editor.cancelFirst||x.appendChild(e);l.appendChild(x);this.container=
-l},AboutDialog=function(a){var d=document.createElement("div");d.style.marginTop="6px";d.setAttribute("align","center");var e=document.createElement("img");e.style.border="0px";mxClient.IS_SVG?(e.setAttribute("width","164"),e.setAttribute("height","221"),e.style.width="164px",e.style.height="221px",e.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(e.setAttribute("width","176"),e.setAttribute("height","219"),e.style.width="170px",e.style.height="219px",e.setAttribute("src",IMAGE_PATH+
-"/logo-flat.png"));d.appendChild(e);mxUtils.br(d);e=document.createElement("small");e.innerHTML="v "+EditorUi.VERSION;e.style.color="#505050";d.appendChild(e);mxUtils.br(d);mxUtils.br(d);e=document.createElement("small");e.style.color="#505050";e.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';d.appendChild(e);mxEvent.addListener(d,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
-d},FeedbackDialog=function(a){var d=document.createElement("div"),e=document.createElement("div");mxUtils.write(e,mxResources.get("sendYourFeedbackToDrawIo"));e.style.fontSize="18px";e.style.marginBottom="18px";d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");d.appendChild(e);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),
-function(){var c=(l.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;c.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(b.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+p.value+c),
-function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});g.className="geBtn gePrimaryBtn";g.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(b,"change",
-function(){0<b.value.length&&0<k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});d.appendChild(b);this.init=function(){b.focus()};var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;e=document.createElement("p");e.style.marginTop="14px";e.appendChild(l);
-var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));e.appendChild(m);mxEvent.addListener(m,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("feedback"));d.appendChild(e);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("commentsNotes"));
-d.appendChild(p);e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(e.appendChild(m),e.appendChild(g)):(e.appendChild(g),e.appendChild(m));d.appendChild(e);this.container=d};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,d,e){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
-"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);b.appendChild(l);var m=new Graph(l);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var p=0,c=null,f=0,h=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=c&&null!=c[f]?c[f].getAttribute("name"):"pagenumber"==a?f+1:h.apply(this,arguments)};m.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var t=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),q=a.getCurrentFile(),u=null,w=null,x=null,y=null,n=mxUtils.button("",function(){null!=x&&m.zoomIn()});n.className="geSprite geSprite-zoomin";n.setAttribute("title",mxResources.get("zoomIn"));
-n.style.outline="none";n.style.border="none";n.style.margin="2px";n.setAttribute("disabled","disabled");mxUtils.setOpacity(n,20);var v=mxUtils.button("",function(){null!=x&&m.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var G=mxUtils.button("",function(){null!=x&&(m.maxFitScale=8,m.fit(8),m.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!=x&&(m.zoomActual(),m.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 z=
-document.createElement("div");z.style.position="absolute";z.style.textAlign="right";z.style.color="gray";z.style.marginTop="10px";z.style.backgroundColor="transparent";z.style.top="440px";z.style.right="32px";z.style.maxWidth="380px";z.style.cursor="default";var A=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,f=mxUtils.getXml(x.documentElement);a.isLocalFileSave()?a.saveLocalFile(f,c,"text/xml"):
-(f="undefined"===typeof pako?"&xml="+encodeURIComponent(f):"&data="+encodeURIComponent(a.editor.graph.compress(f)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+f)).simulate(document,"_blank"))}});A.className="geBtn";A.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=e?e(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(c){a.spinner.stop();
-a.replaceFileData(y);a.hideDialog()},function(c){a.spinner.stop();a.editor.setStatus("");a.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var H=null;mxEvent.addListener(F,"change",function(a){null!=
-H&&(H(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),window.openWindow(a.getUrl()))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=e&&(B.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
-"disabled");null!=e&&(L.style.display="none",D.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var C=document.createElement("div");C.className="geToolbarContainer";C.style.backgroundColor="transparent";C.style.padding="2px";C.style.border="none";C.style.left="199px";C.style.top="442px";var J=null;if(null!=d&&0<d.length){l.style.cursor="move";var Q=document.createElement("table");Q.style.border=
-"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var R=d.length-1;0<=R;R--){var O=function(b){var h=new Date(b.modifiedDate),e=null;if(0<=h.getTime()){var g=function(b){t.stop();var d=mxUtils.parseXml(b),g=a.editor.extractGraphModel(d.documentElement,!0);if(null!=g){var u=function(c){null!=c&&(c=
-k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";l.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};F.style.display="none";F.innerHTML="";x=d;y=b;c=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){d=g.getElementsByTagName("diagram");c=[];for(b=0;b<d.length;b++)c.push(d[b]);
-f=Math.min(p,c.length-1);0<c.length&&u(c[f]);if(1<c.length)for(F.removeAttribute("disabled"),F.style.display="",b=0;b<c.length;b++)d=document.createElement("option"),mxUtils.write(d,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),d.setAttribute("value",b),b==f&&d.setAttribute("selected","selected"),F.appendChild(d);H=function(){f=p=parseInt(F.value);u(c[p])}}else k(g);z.innerHTML="";mxUtils.write(z,h.toLocaleDateString()+" "+h.toLocaleTimeString());z.setAttribute("title",e.getAttribute("title"));
-n.removeAttribute("disabled");v.removeAttribute("disabled");G.removeAttribute("disabled");E.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),A.removeAttribute("disabled"),L.removeAttribute("disabled"),B.removeAttribute("disabled"));mxUtils.setOpacity(n,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(E,60)}else F.style.display="none",F.innerHTML="",z.innerHTML="",mxUtils.write(z,mxResources.get("errorLoadingFile"))},
-e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===T?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());e.appendChild(k);e.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+
-(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){w!=b&&(t.stop(),null!=u&&(u.style.backgroundColor=""),w=b,u=e,u.style.backgroundColor="#ebf2f9",y=x=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",m.getModel().clear(),D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),E.setAttribute("disabled",
-"disabled"),G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(n,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(E,20),t.spin(l),b.getXml(function(a){w==b&&g(a)},function(a){t.stop();F.style.display="none";F.innerHTML="";z.innerHTML="";mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){L.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(e)}return e}(d[R]);null!=O&&R==d.length-1&&(J=O)}Q.appendChild(V);k.appendChild(Q)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(l.style.display="none",C.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(l.style.display="none",C.style.display="none",mxUtils.write(k,
-mxResources.get("noRevisions")));this.init=function(){null!=J&&J.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";C.appendChild(F);C.appendChild(n);C.appendChild(v);C.appendChild(E);C.appendChild(G);a.editor.cancelFirst?(g.appendChild(k),g.appendChild(A),g.appendChild(B),g.appendChild(D),g.appendChild(L)):(g.appendChild(A),g.appendChild(B),g.appendChild(D),g.appendChild(L),g.appendChild(k));b.appendChild(g);b.appendChild(C);b.appendChild(z);this.container=
-b},DraftDialog=function(a,d,e,b,g,k,l,m){var p=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,d);p.appendChild(c);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);p.appendChild(f);var h=new Graph(f);
-h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;d=mxUtils.parseXml(e);var t=a.editor.extractGraphModel(d.documentElement,!0),q=0,u=null,w=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[q]?u[q].getAttribute("name"):"pagenumber"==a?q+1:w.apply(this,arguments)};h.getLinkForCell=function(){return null};d=mxUtils.button("",function(){h.zoomIn()});d.className=
-"geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);e=mxUtils.button("",function(){h.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);c=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});c.className="geSprite geSprite-fit";c.setAttribute("title",
-mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var x=mxUtils.button("",function(){h.zoomActual();h.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);g=mxUtils.button(l||mxResources.get("discard"),g);g.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position=
-"relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function b(f){null!=f&&(f=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(f))).documentElement));return f}mxEvent.addListener(y,"change",function(a){q=parseInt(y.value);b(u[q]);mxEvent.consume(a)});if("mxfile"==t.nodeName){var e=t.getElementsByTagName("diagram");
-u=[];for(var d=0;d<e.length;d++)u.push(e[d]);0<u.length&&b(u[q]);if(1<u.length)for(y.style.display="",d=0;d<u.length;d++)e=document.createElement("option"),mxUtils.write(e,u[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),e.setAttribute("value",d),d==q&&e.setAttribute("selected","selected"),y.appendChild(e)}else c(t)};l.appendChild(y);l.appendChild(d);l.appendChild(e);l.appendChild(x);l.appendChild(c);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.className=
-"geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(k.appendChild(d),null!=m&&k.appendChild(m),k.appendChild(g),k.appendChild(b)):(k.appendChild(b),k.appendChild(g),null!=m&&k.appendChild(m),k.appendChild(d));p.appendChild(k);p.appendChild(l);this.container=p},FindWindow=function(a,d,e,b,g){function k(a,c,f){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var b=0;b<c.length;b++)if("label"!=c[b].nodeName){var h=
-mxUtils.trim(c[b].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&h.substring(0,f.length)===f||null!=a&&a.test(h))return!0}}return!1}function l(){var a=p.model.getDescendants(p.model.getRoot()),b=t.value.toLowerCase(),h=q.checked?new RegExp(b):null,e=null;c!=b&&(c=b,f=null);var d=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var l=p.view.getState(a[g]);if(null!=l&&null!=l.cell.value&&(d||null==e)&&(p.model.isVertex(l.cell)||p.model.isEdge(l.cell))&&(p.isHtmlLabel(l.cell)?
-(u.innerHTML=p.getLabel(l.cell),label=mxUtils.extractTextWithWhitespace([u])):label=p.getLabel(l.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==h&&(label.substring(0,b.length)===b||k(h,l.cell,b))||null!=h&&(h.test(label)||k(h,l.cell,b))))if(d){e=l;break}else null==e&&(e=l);d=d||l==f}null!=e?(f=e,p.scrollCellToVisible(f.cell),p.isEnabled()?p.setSelectionCell(f.cell):p.highlightCell(f.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=e}
-var m=a.actions.get("find"),p=a.editor.graph,c=null,f=null,h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("find"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width="200px";t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";h.appendChild(t);mxUtils.br(h);var q=document.createElement("input");
-q.setAttribute("type","checkbox");q.style.marginRight="4px";h.appendChild(q);mxUtils.write(h,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(h);var w=mxUtils.button(mxResources.get("reset"),function(){t.value="";t.style.backgroundColor="";c=f=null;t.focus()});w.setAttribute("title",mxResources.get("reset"));w.style.marginTop="6px";w.style.marginRight="4px";w.className="geBtn";h.appendChild(w);w=mxUtils.button(mxResources.get("find"),function(){try{t.style.backgroundColor=
-l()?"":"#ffcfcf"}catch(x){a.handleError(x)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.className="geBtn gePrimaryBtn";h.appendChild(w);mxEvent.addListener(t,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(c!=t.value.toLowerCase()||13==a.keyCode)try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(y){t.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"keydown",function(c){70==c.keyCode&&
-a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),h,d,e,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.isVisible()?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},
-TagsWindow=function(a,d,e,b,g){function k(a){a=null!=a?a:m.model.getDescendants(m.model.getRoot());for(var c=f.value.split(" "),b=[],h=0;h<a.length;h++)if(m.model.isVertex(a[h])||m.model.isEdge(a[h])){var e=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(p)||""):"",n=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),d=0;d<c.length&&n;d++)var q=mxUtils.trim(c[d]).toLowerCase(),n=n&&(0==q.length||0<=mxUtils.indexOf(e,q));else n=0==mxUtils.trim(f.value).length;
-n&&b.push(a[h])}return b}function l(a,c){m.model.beginUpdate();try{for(var b=0;b<a.length;b++)m.model.setVisible(a[b],c)}finally{m.model.endUpdate()}}var m=a.editor.graph,p="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type","text");f.style.marginTop="4px";f.style.width="260px";f.style.fontSize="12px";
-f.style.borderRadius="4px";f.style.padding="6px";c.appendChild(f);if(!a.isOffline()||mxClient.IS_CHROMEAPP){f.style.width="240px";var h=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");h.firstChild.style.marginBottom="6px";h.style.marginLeft="6px";c.appendChild(h)}mxEvent.addListener(f,"dblclick",function(){var c=new FilenameDialog(a,p,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(p=a)}),mxResources.get("enterPropertyName"));a.showDialog(c.container,
-300,80,!0,!0);c.init()});f.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(c);h=mxUtils.button(mxResources.get("hide"),function(){l(k(),!1)});h.setAttribute("title",mxResources.get("hide"));h.style.marginTop="8px";h.style.marginRight="4px";h.className="geBtn";c.appendChild(h);h=mxUtils.button(mxResources.get("show"),function(){var a=k();l(a,!0);m.isEnabled()&&m.setSelectionCells(a)});h.setAttribute("title",mxResources.get("show"));h.style.marginTop="8px";h.style.marginRight=
-"4px";h.className="geBtn";c.appendChild(h);var t=a.actions.get("tags"),h=mxUtils.button(mxResources.get("close"),function(){t.funct()});h.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");h.style.marginTop="8px";h.className="geBtn gePrimaryBtn";c.appendChild(h);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||t.funct()});this.window=new mxWindow(mxResources.get("tags"),c,d,e,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.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},AuthDialog=function(a,d,e,b){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
-mxResources.get("authorizationRequired"));var l="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";d==a.drive?(l=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(l=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(l=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(l=mxResources.get("github"),m.src=IMAGE_PATH+
-"/github-logo-white.svg"):d==a.trello&&(l=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[l]));var p=document.createElement("input");p.setAttribute("type","checkbox");l=mxUtils.button(mxResources.get("authorize"),function(){b(p.checked)});l.insertBefore(m,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";g.appendChild(k);g.appendChild(a);g.appendChild(l);e&&(e=document.createElement("p"),
-e.style.marginTop="20px",e.appendChild(p),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),e.appendChild(k),g.appendChild(e),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,d,e){e=null!=e?e:a.sidebar.entries;var b=document.createElement("div");if(d){d=document.createElement("div");d.className="geDialogTitle";mxUtils.write(d,mxResources.get("shapes"));
-d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.lineHeight="40px";d.style.height="40px";d.style.right="0px";mxClient.IS_QUIRKS&&(d.style.width="718px");var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
-"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(d.style.width)-202+"px",k.style.height=g.style.height,k.style.marginTop=g.style.marginTop);var l=null,m=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";for(var c=0;c<e.length;c++)(function(b){var f=p.cloneNode(!1);f.style.fontWeight="bold";f.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";f.style.padding="6px 0px 6px 20px";mxUtils.write(f,b.title);g.appendChild(f);for(var h=0;h<b.entries.length;h++)(function(b){var f=p.cloneNode(!1);f.style.cursor="pointer";f.style.padding="4px 0px 4px 20px";var n=document.createElement("input");n.setAttribute("type","checkbox");n.checked=a.sidebar.isEntryVisible(b.id);n.defaultChecked=n.checked;f.appendChild(n);mxUtils.write(f," "+b.title);g.appendChild(f);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
-b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML='<img border="0" src="'+b.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=l&&(l.style.backgroundColor=""),l=f,l.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(f,"click",e);mxEvent.addListener(f,"dblclick",function(a){n.checked=!n.checked;mxEvent.consume(a)});m.push(function(){return n.checked?b.id:null});0==c&&0==h&&e()})(b.entries[h])})(e[c]);
-b.style.padding="30px";b.appendChild(d);b.appendChild(g);b.appendChild(k);e=document.createElement("div");e.className="geDialogFooter";e.style.position="absolute";e.style.paddingRight="16px";e.style.color="gray";e.style.left="0px";e.style.right="0px";e.style.bottom="0px";e.style.height="60px";e.style.lineHeight="52px";mxClient.IS_QUIRKS&&(e.style.width=d.style.width,e.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)d=
-document.createElement("span"),d.style.paddingRight="20px",d.appendChild(f),mxUtils.write(d," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(d,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(d.style.position="relative",d.style.top="-6px"),e.appendChild(d);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var h=mxUtils.button(mxResources.get("apply"),
-function(){a.hideDialog();for(var c=[],b=0;b<m.length;b++){var h=m[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});h.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table"),q=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var u=document.createElement("tr");t.style.width="100%";d=document.createElement("td");var h=document.createElement("td"),w=document.createElement("td"),x=mxUtils.bind(this,function(c,
-b,f){var h=document.createElement("input");h.type="checkbox";t.appendChild(h);h.checked=a.sidebar.isEntryVisible(f);var n=document.createElement("span");mxUtils.write(n,b);b=document.createElement("div");b.style.display="block";b.appendChild(h);b.appendChild(n);mxEvent.addListener(n,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return h.checked?f:null}});u.appendChild(d);u.appendChild(h);u.appendChild(w);q.appendChild(u);t.appendChild(q);for(var m=
-[],y=0,c=0;c<e.length;c++)for(q=0;q<e[c].entries.length;q++)y++;for(var n=[d,h,w],v=0,c=0;c<e.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];m.push(x(n[Math.floor(v/(y/3))],b.title,b.id));v++}})(e[c]);b.appendChild(t);e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,e.appendChild(f),d=document.createElement("span"),
-mxUtils.write(d," "+mxResources.get("rememberThisSetting")),e.appendChild(d),mxEvent.addListener(d,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";h=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<m.length;b++){var h=m[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});h.className=
-"geBtn gePrimaryBtn";e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right"}a.editor.cancelFirst?(e.appendChild(d),e.appendChild(h)):(e.appendChild(h),e.appendChild(d));b.appendChild(e);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<g.length;c++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var e=document.createElement("span");e.className="geSprite geSprite-delete";
-e.style.position="relative";e.style.cursor="pointer";e.style.top="5px";e.style.marginRight="4px";e.style.display="inline-block";h.appendChild(e);mxUtils.write(h,g[c]);b.appendChild(h);mxUtils.br(b);mxEvent.addListener(e,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+g[c]+'"?',function(){g.splice(c,1);d()})}}(c))}}}var e=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();
-e.appendChild(b);d();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var e=b.split(";"),b=0;b<e.length;b++){var q=App.pluginRegistry[e[b]];null!=q&&(c+=q+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){e=a.split(";");for(a=0;a<e.length;a++){var c=e[a],b=App.pluginRegistry[c];null!=b&&(c=b);0<c.length&&0>mxUtils.indexOf(g,c)&&g.push(c)}d()}},mxResources.get("enterValue")+
-" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
-p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(l),c.appendChild(p),c.appendChild(k),c.appendChild(m)):(c.appendChild(p),c.appendChild(k),c.appendChild(m),c.appendChild(l));e.appendChild(c);this.container=e},CropImageDialog=function(a,d,e){var b=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),
-l=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+"...");l.appendChild(m);k.appendChild(l);var l=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();
-f.select()};c.appendChild(f);l.appendChild(p);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";c.appendChild(h);l.appendChild(p);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("right")+
-":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";c.appendChild(t);l.appendChild(p);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";c.appendChild(q);l.appendChild(p);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");
-p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");l.appendChild(p);var u=document.createElement("input");u.setAttribute("type","checkbox");c.appendChild(u);l.appendChild(c);k.appendChild(l);g.appendChild(k);b.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),d=w.width,
-g=w.height,x=parseInt(f.value),k=parseInt(h.value),d=Math.max(1,d-x-parseInt(t.value)),g=Math.max(1,g-k-parseInt(q.value));c.width=d;c.height=g;u.checked&&(b.fillStyle="#000000",b.arc(d/2,g/2,Math.min(d/2,g/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation="source-in");b.drawImage(w,x,k,d,g,0,0,d,g);e(c.toDataURL())});x.setAttribute("disabled","disabled");w.onload=function(){x.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+
-": "+w.height)};w.src=d;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});d=document.createElement("div");d.style.marginTop="20px";d.style.textAlign="right";a.editor.cancelFirst?(d.appendChild(g),d.appendChild(x)):(d.appendChild(x),d.appendChild(g));b.appendChild(d);this.container=b},EditGeometryDialog=function(a,d){var e=a.editor.graph,b=1==d.length?e.getCellGeometry(d[0]):null,g=document.createElement("div"),k=document.createElement("table"),l=document.createElement("tbody"),
-m=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=b?b.x:"";this.init=function(){f.focus();f.select()};c.appendChild(f);m.appendChild(p);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+
-":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=b?b.y:"";c.appendChild(h);m.appendChild(p);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.width:"";c.appendChild(t);m.appendChild(p);m.appendChild(c);l.appendChild(m);
-m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.height:"";c.appendChild(q);m.appendChild(p);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var u=document.createElement("input");
-u.setAttribute("type","text");u.style.width="100px";u.value=1==d.length?mxUtils.getValue(e.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(u);m.appendChild(p);m.appendChild(c);l.appendChild(m);k.appendChild(l);g.appendChild(k);var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e.getModel().beginUpdate();try{for(var c=0;c<d.length;c++){var b=e.getCellGeometry(d[c]);null!=b&&(b=b.clone(),e.isCellMovable(d[c])&&
-(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(h.value).length&&(b.y=Number(h.value))),e.isCellResizable(d[c])&&(0<mxUtils.trim(t.value).length&&(b.width=Number(t.value)),0<mxUtils.trim(q.value).length&&(b.height=Number(q.value))),e.getModel().setGeometry(d[c],b));0<mxUtils.trim(u.value).length&&e.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[d[c]])}}finally{e.getModel().endUpdate()}});mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&w.click()});k=document.createElement("div");
-k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(w)):(k.appendChild(w),k.appendChild(b));g.appendChild(k);this.container=g},LibraryDialog=function(a,d,e,b,g,k){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=q;)a=a.parentNode;var c=null;if(null!=a)for(var b=q.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function m(c,b,h,e,d,g,t,k,y){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&
-null!=t||null==w[c]){var B=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=H.title&&0<H.title.length?H.title:mxResources.get("untitled"));D.style.color=null==H.title||0==H.title.length?"#d0d0d0":""};q.style.backgroundImage="";u.style.display="none";var E=d,p=g;if(d>a.maxImageSize||g>a.maxImageSize){var z=Math.min(1,Math.min(a.maxImageSize/Math.max(1,d)),a.maxImageSize/Math.max(1,g));d*=z;g*=z}E>p?(p=Math.round(100*
-p/E),E=100):(E=Math.round(100*E/p),p=100);var C=document.createElement("div");C.setAttribute("draggable","true");C.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";C.style.position="relative";C.style.cursor="move";mxUtils.setPrefixedStyle(C.style,"transition","transform .1s ease-in-out");if(null!=c){var L=document.createElement("img");L.setAttribute("src",v.convert(c));L.style.width=E+"px";L.style.height=p+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-p)/2)+"px";L.style.paddingLeft=
-Math.floor((100-E)/2)+"px";C.appendChild(L)}else if(null!=t){var A=a.stringToCells(a.editor.graph.decompress(t.xml));0<A.length&&(a.sidebar.createThumb(A,100,100,C,null,!0,!1),C.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",C.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.marginLeft=
-"-22px";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});null==c&&null!=t&&(J.style.position="relative");(function(a,c,b){mxEvent.addListener(J,"click",function(h){w[c]=null;for(var n=0;n<f.length;n++)if(null!=f[n].data&&f[n].data==c||null!=f[n].xml&&null!=b&&f[n].xml==b.xml){f.splice(n,1);break}C.parentNode.removeChild(a);0==f.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(h)});mxEvent.addListener(J,
-"dblclick",function(a){mxEvent.consume(a)})})(C,c,t);C.appendChild(J);C.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="#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var H=null;null!=c?(H={data:c,w:d,h:g,title:y},null!=k&&(H.aspect=k),w[c]=L,f.push(H)):null!=t&&(t.aspect="fixed",f.push(t),H=t);mxEvent.addListener(D,"keydown",
-function(a){13==a.keyCode&&null!=n&&(n(),n=null,mxEvent.consume(a))});B();C.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});A=function(c){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,H.title||"",mxResources.get("ok"),function(a){null!=a&&(H.title=a,B())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();
-mxEvent.consume(c)}else if("true"!=D.getAttribute("contentEditable")){null!=n&&(n(),n=null);if(null==H.title||0==H.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");D.focus();document.execCommand("selectAll",!1,null);n=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";H.title=D.innerHTML;B()};mxEvent.consume(c)}};mxEvent.addListener(D,"click",A);mxEvent.addListener(C,"dblclick",
-A);q.appendChild(C);mxEvent.addListener(C,"dragstart",function(a){null==c&&null!=t&&(J.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=t.xml&&a.dataTransfer.setData("Text",t.xml);x=l(a);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(C,30);J.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(C,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility=
-"",D.style.visibility="");x=null;mxUtils.setOpacity(C,100);mxUtils.setPrefixedStyle(C.style,"transform",null)})}else G||(G=!0,a.handleError({message:mxResources.get("fileExists")}));else{d=!1;try{if(a.spinner.stop(),E=mxUtils.parseXml(c),"mxlibrary"==E.documentElement.nodeName){p=JSON.parse(mxUtils.getTextContent(E.documentElement));if(null!=p&&0<p.length)for(var F=0;F<p.length;F++)null!=p[F].xml?m(null,null,0,0,0,0,p[F]):m(p[F].data,null,0,0,p[F].w,p[F].h,null,"fixed",p[F].title);d=!0}else if("mxfile"==
-E.documentElement.nodeName){for(var Q=E.documentElement.getElementsByTagName("diagram"),F=0;F<Q.length;F++){var p=mxUtils.getTextContent(Q[F]),A=a.stringToCells(a.editor.graph.decompress(p)),X=a.editor.graph.getBoundingBoxFromGeometry(A);m(null,null,0,0,0,0,{xml:p,w:X.width,h:X.height})}d=!0}}catch(Z){}d||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function p(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
-function c(c){c.stopPropagation();c.preventDefault();G=!1;y=l(c);if(null!=x)null!=y&&y<q.children.length?(f.splice(y>x?y-1:y,0,f.splice(x,1)[0]),q.insertBefore(q.children[x],q.children[y])):(f.push(f.splice(x,1)[0]),q.appendChild(q.children[x]));else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,E(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||
-/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){m(b,null,0,0,a.width,a.height);q.scrollTop=q.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];e=document.createElement("div");e.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";e.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",
-d);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==g||g.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};h.appendChild(t);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";
-q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));e.appendChild(u);var w={},x=null,y=null,n=null;
-d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=n&&(n(),n=null,mxEvent.consume(a))};mxEvent.addListener(q,"mousedown",d);mxEvent.addListener(q,"pointerdown",d);mxEvent.addListener(q,"touchstart",d);var v=new mxUrlConverter,G=!1;if(null!=b)for(d=0;d<b.length;d++)h=b[d],m(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(q,"dragleave",function(a){u.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==q||c==u){a.stopPropagation();a.preventDefault();
-break}c=c.parentNode}});var E=function(c){return function(b,f,h,n,e,d,t,g,v){null!=v&&(/(\.vsdx)($|\?)/i.test(v.name)||/(\.vssx)($|\?)/i.test(v.name))?a.importVisio(v,mxUtils.bind(this,function(b){a.spinner.stop();m(b,f,h,n,e,d,t,"fixed",mxEvent.isAltDown(c)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,v.name)?a.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=
-b.status&&(m(b.responseText,f,h,n,e,d,t,"fixed",mxEvent.isAltDown(c)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(m(b,f,h,n,e,d,t,"fixed",mxEvent.isAltDown(c)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",p);mxEvent.addListener(q,"drop",c);mxEvent.addListener(u,"dragover",p);mxEvent.addListener(u,"drop",c);e.appendChild(q);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);h=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(f),b=t.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,
-"_blank")});h.setAttribute("id","btnDownload");h.className="geBtn";b.appendChild(h);var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,"change",function(c){G=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,b,f,h,n,e,d,q,t){E(c)(a,b,f,h,n,e,d,q,t);z.value=""});q.scrollTop=q.scrollHeight}),h=mxUtils.button(mxResources.get("import"),function(){null!=n&&(n(),n=null);z.click()}),h.setAttribute("id",
-"btnAddImage"),h.className="geBtn",b.appendChild(h));h=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=n&&(n(),n=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){G=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}m(a,null,0,0,c,b);q.scrollTop=q.scrollHeight}})});h.setAttribute("id","btnAddImageUrl");h.className="geBtn";b.appendChild(h);this.saveBtnClickHandler=function(c,b,f,h){a.saveLibrary(c,
-b,f,h)};h=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=n&&(n(),n=null);this.saveBtnClickHandler(t.value,f,g,k)}));h.setAttribute("id","btnSave");h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(d);e.appendChild(b);this.container=e},EditShapeDialog=function(a,d,e,b,g){b=null!=b?b:300;g=null!=g?g:120;var k,l,m=document.createElement("table"),p=document.createElement("tbody");m.style.cellPadding="4px";k=document.createElement("tr");l=
-document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,e);k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=g+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};l.appendChild(c);k.appendChild(l);l=document.createElement("td");e=document.createElement("div");e.style.position=
-"relative";e.style.border="1px solid gray";e.style.top="6px";e.style.width="200px";e.style.height=g+4+"px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);l.appendChild(e);var f=new Graph(e);f.setEnabled(!1);var h=a.editor.graph.cloneCells([d])[0];f.addCells([h]);e=f.view.getState(h);var t="";null!=e.shape&&null!=e.shape.stencil&&(t=mxUtils.getPrettyXml(e.shape.stencil.desc));mxUtils.write(c,t||"");e=f.getGraphBounds();g=Math.min(160/e.width,(g-40)/e.height);f.view.scaleAndTranslate(g,
-20/g-e.x,20/g-e.y);k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-e.className="geBtn",l.appendChild(e));var q=function(b,f,h){var e=c.value,n=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(n.documentElement),n=n.documentElement.getElementsByTagName("parsererror");if(null!=n&&0<n.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(h&&a.hideDialog(),n=!b.model.contains(f),!h||n||e!=t){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(n){var d=a.editor.graph.getInsertPoint();f.geometry.x=d.x;
-f.geometry.y=d.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(G){throw G;}finally{b.getModel().endUpdate()}n&&b.setSelectionCell(f)}};e=mxUtils.button(mxResources.get("preview"),function(){q(f,h,!1)});e.className="geBtn";l.appendChild(e);e=mxUtils.button(mxResources.get("apply"),function(){q(a.editor.graph,d,!0)});e.className="geBtn gePrimaryBtn";l.appendChild(e);a.editor.cancelFirst||l.appendChild(g);k.appendChild(l);p.appendChild(k);m.appendChild(p);this.container=
-m},CustomDialog=function(a,d,e,b,g,k,l,m){var p=document.createElement("div");p.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";null!=l&&d.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});l.className="geBtn";m&&(l.style.display="none");a.editor.cancelFirst&&d.appendChild(l);a.isOffline()||null==k||(m=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),m.className="geBtn",d.appendChild(m));
-g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e()});d.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(l);p.appendChild(d);this.cancelBtn=l;this.okButton=g;this.container=p};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+p.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],f=a[1],b=a[2];a=a.slice(3,a.length).join("/");p.value="https://github.com/"+c+"/"+f+"/blob/"+b+"/"+a;p.focus()}})});mxEvent.addListener(p,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(g.checked?u.value:p.value,LinkDialog.selectedDocs))});w.appendChild(x);a.editor.cancelFirst||w.appendChild(d);m.appendChild(w);this.container=
+m},AboutDialog=function(a){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+
+"/logo-flat.png"));e.appendChild(d);mxUtils.br(e);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";e.appendChild(d);mxUtils.br(e);mxUtils.br(e);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';e.appendChild(d);mxEvent.addListener(e,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
+e},FeedbackDialog=function(a){var e=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");e.appendChild(d);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"),
+function(){var c=(m.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;c.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(b.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+p.value+c),
+function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});h.className="geBtn gePrimaryBtn";h.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(b,"change",
+function(){0<b.value.length&&0<k.test(b.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});e.appendChild(b);this.init=function(){b.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(m);
+var n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(n);mxEvent.addListener(n,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));e.appendChild(d);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("commentsNotes"));
+e.appendChild(p);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(d.appendChild(n),d.appendChild(h)):(d.appendChild(h),d.appendChild(n));e.appendChild(d);this.container=e};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,e,d){var b=document.createElement("div"),h=document.createElement("h3");h.style.marginTop="0px";mxUtils.write(h,mxResources.get("revisionHistory"));b.appendChild(h);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height=
+"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);b.appendChild(m);var n=new Graph(m);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var p=0,c=null,f=0,g=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=c&&null!=c[f]?c[f].getAttribute("name"):"pagenumber"==a?f+1:g.apply(this,arguments)};n.getLinkForCell=function(){return null};Editor.MathJaxRender&&
+n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var u=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),q=a.getCurrentFile(),t=null,x=null,w=null,A=null,l=mxUtils.button("",function(){null!=w&&n.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));
+l.style.outline="none";l.style.border="none";l.style.margin="2px";l.setAttribute("disabled","disabled");mxUtils.setOpacity(l,20);var v=mxUtils.button("",function(){null!=w&&n.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var F=mxUtils.button("",function(){null!=w&&(n.maxFitScale=8,n.fit(8),n.center())});F.className=
+"geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var D=mxUtils.button("",function(){null!=w&&(n.zoomActual(),n.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var y=
+document.createElement("div");y.style.position="absolute";y.style.textAlign="right";y.style.color="gray";y.style.marginTop="10px";y.style.backgroundColor="transparent";y.style.top="440px";y.style.right="32px";y.style.maxWidth="380px";y.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=w){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,f=mxUtils.getXml(w.documentElement);a.isLocalFileSave()?a.saveLocalFile(f,c,"text/xml"):
+(f="undefined"===typeof pako?"&xml="+encodeURIComponent(f):"&data="+encodeURIComponent(a.editor.graph.compress(f)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+f)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var z=mxUtils.button(mxResources.get("restore"),function(){null!=w&&null!=A&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(A):a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(c){a.spinner.stop();
+a.replaceFileData(A);a.hideDialog()},function(c){a.spinner.stop();a.editor.setStatus("");a.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)})})});z.className="geBtn";z.setAttribute("disabled","disabled");var C=document.createElement("select");C.setAttribute("disabled","disabled");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";var G=null;mxEvent.addListener(C,"change",function(a){null!=
+G&&(G(a),mxEvent.consume(a))});var E=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=w&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(w.documentElement)),window.openWindow(a.getUrl()))});E.className="geBtn";E.setAttribute("disabled","disabled");null!=d&&(E.style.display="none");var J=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl())});J.className="geBtn gePrimaryBtn";J.setAttribute("disabled",
+"disabled");null!=d&&(J.style.display="none",z.className="geBtn gePrimaryBtn");h=document.createElement("div");h.style.position="absolute";h.style.top="482px";h.style.width="640px";h.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var L=null;if(null!=e&&0<e.length){m.style.cursor="move";var Q=document.createElement("table");Q.style.border=
+"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var R=e.length-1;0<=R;R--){var O=function(b){var g=new Date(b.modifiedDate),d=null;if(0<=g.getTime()){var h=function(b){u.stop();var e=mxUtils.parseXml(b),t=a.editor.extractGraphModel(e.documentElement,!0);if(null!=t){var h=function(c){null!=c&&(c=
+k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";m.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};C.style.display="none";C.innerHTML="";w=e;A=b;c=parseSelectFunction=null;f=0;if("mxfile"==t.nodeName){e=t.getElementsByTagName("diagram");c=[];for(b=0;b<e.length;b++)c.push(e[b]);
+f=Math.min(p,c.length-1);0<c.length&&h(c[f]);if(1<c.length)for(C.removeAttribute("disabled"),C.style.display="",b=0;b<c.length;b++)e=document.createElement("option"),mxUtils.write(e,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),e.setAttribute("value",b),b==f&&e.setAttribute("selected","selected"),C.appendChild(e);G=function(){f=p=parseInt(C.value);h(c[p])}}else k(t);y.innerHTML="";mxUtils.write(y,g.toLocaleDateString()+" "+g.toLocaleTimeString());y.setAttribute("title",d.getAttribute("title"));
+l.removeAttribute("disabled");v.removeAttribute("disabled");F.removeAttribute("disabled");D.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&z.removeAttribute("disabled"),B.removeAttribute("disabled"),J.removeAttribute("disabled"),E.removeAttribute("disabled"));mxUtils.setOpacity(l,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(D,60)}else C.style.display="none",C.innerHTML="",y.innerHTML="",mxUtils.write(y,mxResources.get("errorLoadingFile"))},
+d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):g.toDateString()===T?mxUtils.write(k,g.toLocaleTimeString()):mxUtils.write(k,g.toLocaleDateString()+" "+g.toLocaleTimeString());d.appendChild(k);d.setAttribute("title",g.toLocaleDateString()+" "+g.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+
+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){x!=b&&(u.stop(),null!=t&&(t.style.backgroundColor=""),x=b,t=d,t.style.backgroundColor="#ebf2f9",A=w=null,y.removeAttribute("title"),y.innerHTML=mxResources.get("loading")+"...",m.style.backgroundColor="#ffffff",n.getModel().clear(),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),D.setAttribute("disabled",
+"disabled"),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),mxUtils.setOpacity(l,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(D,20),u.spin(m),b.getXml(function(a){x==b&&h(a)},function(a){u.stop();C.style.display="none";C.innerHTML="";y.innerHTML="";mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){J.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(d)}return d}(e[R]);null!=O&&R==e.length-1&&(L=O)}Q.appendChild(V);k.appendChild(Q)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(m.style.display="none",H.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(m.style.display="none",H.style.display="none",mxUtils.write(k,
+mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";H.appendChild(C);H.appendChild(l);H.appendChild(v);H.appendChild(D);H.appendChild(F);a.editor.cancelFirst?(h.appendChild(k),h.appendChild(B),h.appendChild(E),h.appendChild(z),h.appendChild(J)):(h.appendChild(B),h.appendChild(E),h.appendChild(z),h.appendChild(J),h.appendChild(k));b.appendChild(h);b.appendChild(H);b.appendChild(y);this.container=
+b},DraftDialog=function(a,e,d,b,h,k,m,n){var p=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,e);p.appendChild(c);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);p.appendChild(f);var g=new Graph(f);
+g.setEnabled(!1);g.setPanning(!0);g.panningHandler.ignoreCell=!0;g.panningHandler.useLeftButtonForPanning=!0;g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;e=mxUtils.parseXml(d);var u=a.editor.extractGraphModel(e.documentElement,!0),q=0,t=null,x=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[q]?t[q].getAttribute("name"):"pagenumber"==a?q+1:x.apply(this,arguments)};g.getLinkForCell=function(){return null};e=mxUtils.button("",function(){g.zoomIn()});e.className=
+"geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){g.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);c=mxUtils.button("",function(){g.maxFitScale=8;g.fit(8);g.center()});c.className="geSprite geSprite-fit";c.setAttribute("title",
+mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var w=mxUtils.button("",function(){g.zoomActual();g.center()});w.className="geSprite geSprite-actualsize";w.setAttribute("title",mxResources.get("actualSize"));w.style.outline="none";w.style.border="none";w.style.margin="2px";mxUtils.setOpacity(w,60);h=mxUtils.button(m||mxResources.get("discard"),h);h.className="geBtn";var A=document.createElement("select");A.style.maxWidth="80px";A.style.position=
+"relative";A.style.top="-2px";A.style.verticalAlign="bottom";A.style.marginRight="6px";A.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center()}}function b(f){null!=f&&(f=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(f))).documentElement));return f}mxEvent.addListener(A,"change",function(a){q=parseInt(A.value);b(t[q]);mxEvent.consume(a)});if("mxfile"==u.nodeName){var w=u.getElementsByTagName("diagram");
+t=[];for(var d=0;d<w.length;d++)t.push(w[d]);0<t.length&&b(t[q]);if(1<t.length)for(A.style.display="",d=0;d<t.length;d++)w=document.createElement("option"),mxUtils.write(w,t[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),w.setAttribute("value",d),d==q&&w.setAttribute("selected","selected"),A.appendChild(w)}else c(u)};m.appendChild(A);m.appendChild(e);m.appendChild(d);m.appendChild(w);m.appendChild(c);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.className=
+"geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(k.appendChild(e),null!=n&&k.appendChild(n),k.appendChild(h),k.appendChild(b)):(k.appendChild(b),k.appendChild(h),null!=n&&k.appendChild(n),k.appendChild(e));p.appendChild(k);p.appendChild(m);this.container=p},FindWindow=function(a,e,d,b,h){function k(a,c,f){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var b=0;b<c.length;b++)if("label"!=c[b].nodeName){var l=
+mxUtils.trim(c[b].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&l.substring(0,f.length)===f||null!=a&&a.test(l))return!0}}return!1}function m(){var a=p.model.getDescendants(p.model.getRoot()),b=u.value.toLowerCase(),l=q.checked?new RegExp(b):null,g=null;c!=b&&(c=b,f=null);var d=null==f;if(0<b.length)for(var e=0;e<a.length;e++){var h=p.view.getState(a[e]);if(null!=h&&null!=h.cell.value&&(d||null==g)&&(p.model.isVertex(h.cell)||p.model.isEdge(h.cell))&&(p.isHtmlLabel(h.cell)?
+(t.innerHTML=p.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([t])):label=p.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==l&&(label.substring(0,b.length)===b||k(l,h.cell,b))||null!=l&&(l.test(label)||k(l,h.cell,b))))if(d){g=h;break}else null==g&&(g=h);d=d||h==f}null!=g?(f=g,p.scrollCellToVisible(f.cell),p.isEnabled()?p.setSelectionCell(f.cell):p.highlightCell(f.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=g}
+var n=a.actions.get("find"),p=a.editor.graph,c=null,f=null,g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";g.appendChild(u);mxUtils.br(g);var q=document.createElement("input");
+q.setAttribute("type","checkbox");q.style.marginRight="4px";g.appendChild(q);mxUtils.write(g,mxResources.get("regularExpression"));var t=document.createElement("div");mxUtils.br(g);var x=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";c=f=null;u.focus()});x.setAttribute("title",mxResources.get("reset"));x.style.marginTop="6px";x.style.marginRight="4px";x.className="geBtn";g.appendChild(x);x=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
+m()?"":"#ffcfcf"}catch(w){a.handleError(w)}});x.setAttribute("title",mxResources.get("find")+" (Enter)");x.style.marginTop="6px";x.className="geBtn gePrimaryBtn";g.appendChild(x);mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(c!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=m()?"":"#ffcfcf"}catch(A){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(g,"keydown",function(c){70==c.keyCode&&
+a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(n.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),g,e,d,b,h,!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.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},
+TagsWindow=function(a,e,d,b,h){function k(a){a=null!=a?a:n.model.getDescendants(n.model.getRoot());for(var c=f.value.split(" "),b=[],g=0;g<a.length;g++)if(n.model.isVertex(a[g])||n.model.isEdge(a[g])){var q=null!=a[g].value&&"object"==typeof a[g].value?mxUtils.trim(a[g].value.getAttribute(p)||""):"",l=!0;if(0<q.length)for(var q=q.toLowerCase().split(" "),d=0;d<c.length&&l;d++)var e=mxUtils.trim(c[d]).toLowerCase(),l=l&&(0==e.length||0<=mxUtils.indexOf(q,e));else l=0==mxUtils.trim(f.value).length;
+l&&b.push(a[g])}return b}function m(a,c){n.model.beginUpdate();try{for(var f=0;f<a.length;f++)n.model.setVisible(a[f],c)}finally{n.model.endUpdate()}}var n=a.editor.graph,p="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type","text");f.style.marginTop="4px";f.style.width="260px";f.style.fontSize="12px";
+f.style.borderRadius="4px";f.style.padding="6px";c.appendChild(f);if(!a.isOffline()||mxClient.IS_CHROMEAPP){f.style.width="240px";var g=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");g.firstChild.style.marginBottom="6px";g.style.marginLeft="6px";c.appendChild(g)}mxEvent.addListener(f,"dblclick",function(){var c=new FilenameDialog(a,p,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(p=a)}),mxResources.get("enterPropertyName"));a.showDialog(c.container,
+300,80,!0,!0);c.init()});f.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(c);g=mxUtils.button(mxResources.get("hide"),function(){m(k(),!1)});g.setAttribute("title",mxResources.get("hide"));g.style.marginTop="8px";g.style.marginRight="4px";g.className="geBtn";c.appendChild(g);g=mxUtils.button(mxResources.get("show"),function(){var a=k();m(a,!0);n.isEnabled()&&n.setSelectionCells(a)});g.setAttribute("title",mxResources.get("show"));g.style.marginTop="8px";g.style.marginRight=
+"4px";g.className="geBtn";c.appendChild(g);var u=a.actions.get("tags"),g=mxUtils.button(mxResources.get("close"),function(){u.funct()});g.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");g.style.marginTop="8px";g.className="geBtn gePrimaryBtn";c.appendChild(g);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||u.funct()});this.window=new mxWindow(mxResources.get("tags"),c,e,d,b,h,!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.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},AuthDialog=function(a,e,d,b){var h=document.createElement("div");h.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
+mxResources.get("authorizationRequired"));var m="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";e==a.drive?(m=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?(m=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(m=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(m=mxResources.get("github"),n.src=IMAGE_PATH+
+"/github-logo-white.svg"):e==a.trello&&(m=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var p=document.createElement("input");p.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){b(p.checked)});m.insertBefore(n,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";h.appendChild(k);h.appendChild(a);h.appendChild(m);d&&(d=document.createElement("p"),
+d.style.marginTop="20px",d.appendChild(p),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),h.appendChild(d),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=h},MoreShapesDialog=function(a,e,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div");if(e){e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));
+e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var h=document.createElement("div"),k=document.createElement("div");h.style.position="absolute";h.style.top="40px";h.style.left="0px";h.style.width="202px";h.style.bottom="60px";h.style.overflow="auto";mxClient.IS_QUIRKS&&(h.style.height="437px",h.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
+"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(e.style.width)-202+"px",k.style.height=h.style.height,k.style.marginTop=h.style.marginTop);var m=null,n=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";for(var c=0;c<d.length;c++)(function(f){var b=p.cloneNode(!1);b.style.fontWeight="bold";b.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";b.style.padding="6px 0px 6px 20px";mxUtils.write(b,f.title);h.appendChild(b);for(var l=0;l<f.entries.length;l++)(function(f){var b=p.cloneNode(!1);b.style.cursor="pointer";b.style.padding="4px 0px 4px 20px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(f.id);g.defaultChecked=g.checked;b.appendChild(g);mxUtils.write(b," "+f.title);h.appendChild(b);var q=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
+f.imageCallback?f.imageCallback(k):null!=f.image?k.innerHTML='<img border="0" src="'+f.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=m&&(m.style.backgroundColor=""),m=b,m.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(b,"click",q);mxEvent.addListener(b,"dblclick",function(a){g.checked=!g.checked;mxEvent.consume(a)});n.push(function(){return g.checked?f.id:null});0==c&&0==l&&q()})(f.entries[l])})(d[c]);
+b.style.padding="30px";b.appendChild(e);b.appendChild(h);b.appendChild(k);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=
+document.createElement("span"),e.style.paddingRight="20px",e.appendChild(f),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var g=mxUtils.button(mxResources.get("apply"),
+function(){a.hideDialog();for(var c=[],b=0;b<n.length;b++){var l=n[b].apply(this,arguments);null!=l&&c.push(l)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var u=document.createElement("table"),q=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var t=document.createElement("tr");u.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),x=document.createElement("td"),w=mxUtils.bind(this,function(c,
+b,f){var l=document.createElement("input");l.type="checkbox";u.appendChild(l);l.checked=a.sidebar.isEntryVisible(f);var g=document.createElement("span");mxUtils.write(g,b);b=document.createElement("div");b.style.display="block";b.appendChild(l);b.appendChild(g);mxEvent.addListener(g,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return l.checked?f:null}});t.appendChild(e);t.appendChild(g);t.appendChild(x);q.appendChild(t);u.appendChild(q);for(var n=
+[],A=0,c=0;c<d.length;c++)for(q=0;q<d[c].entries.length;q++)A++;for(var l=[e,g,x],v=0,c=0;c<d.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];n.push(w(l[Math.floor(v/(A/3))],b.title,b.id));v++}})(d[c]);b.appendChild(u);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,d.appendChild(f),e=document.createElement("span"),
+mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<n.length;b++){var l=n[b].apply(this,arguments);null!=l&&c.push(l)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});g.className=
+"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(g)):(d.appendChild(g),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function e(){if(0==h.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<h.length;c++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var d=document.createElement("span");d.className="geSprite geSprite-delete";
+d.style.position="relative";d.style.cursor="pointer";d.style.top="5px";d.style.marginRight="4px";d.style.display="inline-block";g.appendChild(d);mxUtils.write(g,h[c]);b.appendChild(g);mxUtils.br(b);mxEvent.addListener(d,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+h[c]+'"?',function(){h.splice(c,1);e()})}}(c))}}}var d=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var h=mxSettings.getPlugins().slice();
+d.appendChild(b);e();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var d=b.split(";"),b=0;b<d.length;b++){var q=App.pluginRegistry[d[b]];null!=q&&(c+=q+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){d=a.split(";");for(a=0;a<d.length;a++){var c=d[a],b=App.pluginRegistry[c];null!=b&&(c=b);0<c.length&&0>mxUtils.indexOf(h,c)&&h.push(c)}e()}},mxResources.get("enterValue")+
+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(h);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
+p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(m),c.appendChild(p),c.appendChild(k),c.appendChild(n)):(c.appendChild(p),c.appendChild(k),c.appendChild(n),c.appendChild(m));d.appendChild(c);this.container=d},CropImageDialog=function(a,e,d){var b=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),
+m=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");m.appendChild(n);k.appendChild(m);var m=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();
+f.select()};c.appendChild(f);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value="0";c.appendChild(g);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("right")+
+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";c.appendChild(u);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";c.appendChild(q);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");
+p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");m.appendChild(p);var t=document.createElement("input");t.setAttribute("type","checkbox");c.appendChild(t);m.appendChild(c);k.appendChild(m);h.appendChild(k);b.appendChild(h);var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=new Image,w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),e=x.width,
+w=x.height,h=parseInt(f.value),k=parseInt(g.value),e=Math.max(1,e-h-parseInt(u.value)),w=Math.max(1,w-k-parseInt(q.value));c.width=e;c.height=w;t.checked&&(b.fillStyle="#000000",b.arc(e/2,w/2,Math.min(e/2,w/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation="source-in");b.drawImage(x,h,k,e,w,0,0,e,w);d(c.toDataURL())});w.setAttribute("disabled","disabled");x.onload=function(){w.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+x.width+" "+mxResources.get("height")+
+": "+x.height)};x.src=e;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&w.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(h),e.appendChild(w)):(e.appendChild(w),e.appendChild(h));b.appendChild(e);this.container=b},EditGeometryDialog=function(a,e){var d=a.editor.graph,b=1==e.length?d.getCellGeometry(e[0]):null,h=document.createElement("div"),k=document.createElement("table"),m=document.createElement("tbody"),
+n=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=b?b.x:"";this.init=function(){f.focus();f.select()};c.appendChild(f);n.appendChild(p);n.appendChild(c);m.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+
+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=b?b.y:"";c.appendChild(g);n.appendChild(p);n.appendChild(c);m.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b?b.width:"";c.appendChild(u);n.appendChild(p);n.appendChild(c);m.appendChild(n);
+n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.height:"";c.appendChild(q);n.appendChild(p);n.appendChild(c);m.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var t=document.createElement("input");
+t.setAttribute("type","text");t.style.width="100px";t.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(t);n.appendChild(p);n.appendChild(c);m.appendChild(n);k.appendChild(m);h.appendChild(k);var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var b=d.getCellGeometry(e[c]);null!=b&&(b=b.clone(),d.isCellMovable(e[c])&&
+(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(g.value).length&&(b.y=Number(g.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(u.value).length&&(b.width=Number(u.value)),0<mxUtils.trim(q.value).length&&(b.height=Number(q.value))),d.getModel().setGeometry(e[c],b));0<mxUtils.trim(t.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[e[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(h,"keypress",function(a){13==a.keyCode&&x.click()});k=document.createElement("div");
+k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(x)):(k.appendChild(x),k.appendChild(b));h.appendChild(k);this.container=h},LibraryDialog=function(a,e,d,b,h,k){function m(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=q;)a=a.parentNode;var c=null;if(null!=a)for(var b=q.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function n(c,b,g,d,e,h,u,k,A){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&
+null!=u||null==x[c]){var E=function(){z.innerHTML="";z.style.cursor="pointer";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";mxUtils.write(z,null!=G.title&&0<G.title.length?G.title:mxResources.get("untitled"));z.style.color=null==G.title||0==G.title.length?"#d0d0d0":""};q.style.backgroundImage="";t.style.display="none";var D=e,p=h;if(e>a.maxImageSize||h>a.maxImageSize){var H=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,h));e*=H;h*=H}D>p?(p=Math.round(100*
+p/D),D=100):(D=Math.round(100*D/p),p=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=c){var J=document.createElement("img");J.setAttribute("src",v.convert(c));J.style.width=D+"px";J.style.height=p+"px";J.style.margin="10px";J.style.paddingBottom=Math.floor((100-p)/2)+"px";J.style.paddingLeft=
+Math.floor((100-D)/2)+"px";y.appendChild(J)}else if(null!=u){var L=a.stringToCells(a.editor.graph.decompress(u.xml));0<L.length&&(a.sidebar.createThumb(L,100,100,y,null,!0,!1),y.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var B=document.createElement("img");B.setAttribute("src",Editor.closeImage);B.setAttribute("border","0");B.setAttribute("title",mxResources.get("delete"));B.setAttribute("align","top");B.style.paddingTop="4px";B.style.position=
+"absolute";B.style.marginLeft="-12px";B.style.zIndex="1";B.style.cursor="pointer";mxEvent.addListener(B,"dragstart",function(a){mxEvent.consume(a)});(function(a,c,b){mxEvent.addListener(B,"click",function(l){x[c]=null;for(var g=0;g<f.length;g++)if(null!=f[g].data&&f[g].data==c||null!=f[g].xml&&null!=b&&f[g].xml==b.xml){f.splice(g,1);break}y.parentNode.removeChild(a);0==f.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(l)});mxEvent.addListener(B,
+"dblclick",function(a){mxEvent.consume(a)})})(y,c,u);y.appendChild(B);y.style.marginBottom="30px";var z=document.createElement("div");z.style.position="absolute";z.style.boxSizing="border-box";z.style.bottom="-18px";z.style.left="10px";z.style.right="10px";z.style.backgroundColor="#ffffff";z.style.overflow="hidden";z.style.textAlign="center";var G=null;null!=c?(G={data:c,w:e,h:h,title:A},null!=k&&(G.aspect=k),x[c]=J,f.push(G)):null!=u&&(u.aspect="fixed",f.push(u),G=u);mxEvent.addListener(z,"keydown",
+function(a){13==a.keyCode&&null!=l&&(l(),l=null,mxEvent.consume(a))});E();y.appendChild(z);mxEvent.addListener(z,"mousedown",function(a){"true"!=z.getAttribute("contentEditable")&&mxEvent.consume(a)});L=function(c){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,G.title||"",mxResources.get("ok"),function(a){null!=a&&(G.title=a,E())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();
+mxEvent.consume(c)}else if("true"!=z.getAttribute("contentEditable")){null!=l&&(l(),l=null);if(null==G.title||0==G.title.length)z.innerHTML="";z.style.textOverflow="";z.style.whiteSpace="";z.style.cursor="text";z.style.color="";z.setAttribute("contentEditable","true");z.focus();document.execCommand("selectAll",!1,null);l=function(){z.removeAttribute("contentEditable");z.style.cursor="pointer";G.title=z.innerHTML;E()};mxEvent.consume(c)}};mxEvent.addListener(z,"click",L);mxEvent.addListener(y,"dblclick",
+L);q.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==c&&null!=u&&(B.style.visibility="hidden",z.style.visibility="hidden");mxClient.IS_FF&&null!=u.xml&&a.dataTransfer.setData("Text",u.xml);w=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);B.style.visibility="";z.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==B.style.visibility&&(B.style.visibility=
+"",z.style.visibility="");w=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,"transform",null)})}else F||(F=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),D=mxUtils.parseXml(c),"mxlibrary"==D.documentElement.nodeName){p=JSON.parse(mxUtils.getTextContent(D.documentElement));if(null!=p&&0<p.length)for(var C=0;C<p.length;C++)null!=p[C].xml?n(null,null,0,0,0,0,p[C]):n(p[C].data,null,0,0,p[C].w,p[C].h,null,"fixed",p[C].title);e=!0}else if("mxfile"==
+D.documentElement.nodeName){for(var Q=D.documentElement.getElementsByTagName("diagram"),C=0;C<Q.length;C++){var p=mxUtils.getTextContent(Q[C]),L=a.stringToCells(a.editor.graph.decompress(p)),X=a.editor.graph.getBoundingBoxFromGeometry(L);n(null,null,0,0,0,0,{xml:p,w:X.width,h:X.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function p(a){a.dataTransfer.dropEffect=null!=w?"move":"copy";a.stopPropagation();a.preventDefault()}
+function c(c){c.stopPropagation();c.preventDefault();F=!1;A=m(c);if(null!=w)null!=A&&A<q.children.length?(f.splice(A>w?A-1:A,0,f.splice(w,1)[0]),q.insertBefore(q.children[w],q.children[A])):(f.push(f.splice(w,1)[0]),q.appendChild(q.children[w]));else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,D(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||
+/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){n(b,null,0,0,a.width,a.height);q.scrollTop=q.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];d=document.createElement("div");d.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";d.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",
+e);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==h||h.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};g.appendChild(u);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";
+q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(q.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"));d.appendChild(t);var x={},w=null,A=null,l=null;
+e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=l&&(l(),l=null,mxEvent.consume(a))};mxEvent.addListener(q,"mousedown",e);mxEvent.addListener(q,"pointerdown",e);mxEvent.addListener(q,"touchstart",e);var v=new mxUrlConverter,F=!1;if(null!=b)for(e=0;e<b.length;e++)g=b[e],n(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(q,"dragleave",function(a){t.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==q||c==t){a.stopPropagation();a.preventDefault();
+break}c=c.parentNode}});var D=function(c){return function(b,f,l,g,d,e,w,h,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(b){a.spinner.stop();n(b,f,l,g,d,e,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,t.name)?a.parseFile(t,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=
+b.status&&(n(b.responseText,f,l,g,d,e,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(n(b,f,l,g,d,e,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",p);mxEvent.addListener(q,"drop",c);mxEvent.addListener(t,"dragover",p);mxEvent.addListener(t,"drop",c);d.appendChild(q);b=document.createElement("div");b.style.textAlign="right";
+b.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);g=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(f),b=u.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,
+"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";b.appendChild(g);var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(y,"change",function(c){F=!1;a.importFiles(y.files,0,0,a.maxImageSize,function(a,b,f,l,g,d,q,e,w){D(c)(a,b,f,l,g,d,q,e,w);y.value=""});q.scrollTop=q.scrollHeight}),g=mxUtils.button(mxResources.get("import"),function(){null!=l&&(l(),l=null);y.click()}),g.setAttribute("id",
+"btnAddImage"),g.className="geBtn",b.appendChild(g));g=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=l&&(l(),l=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){F=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}n(a,null,0,0,c,b);q.scrollTop=q.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";b.appendChild(g);this.saveBtnClickHandler=function(c,b,f,l){a.saveLibrary(c,
+b,f,l)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=l&&(l(),l=null);this.saveBtnClickHandler(u.value,f,h,k)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";b.appendChild(g);a.editor.cancelFirst||b.appendChild(e);d.appendChild(b);this.container=d},EditShapeDialog=function(a,e,d,b,h){b=null!=b?b:300;h=null!=h?h:120;var k,m,n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";k=document.createElement("tr");m=
+document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,d);k.appendChild(m);p.appendChild(k);k=document.createElement("tr");m=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=h+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};m.appendChild(c);k.appendChild(m);m=document.createElement("td");d=document.createElement("div");d.style.position=
+"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=h+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);m.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var g=a.editor.graph.cloneCells([e])[0];f.addCells([g]);d=f.view.getState(g);var u="";null!=d.shape&&null!=d.shape.stencil&&(u=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(c,u||"");d=f.getGraphBounds();h=Math.min(160/d.width,(h-40)/d.height);f.view.scaleAndTranslate(h,
+20/h-d.x,20/h-d.y);k.appendChild(m);p.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+d.className="geBtn",m.appendChild(d));var q=function(b,f,g){var d=c.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(g&&a.hideDialog(),l=!b.model.contains(f),!g||l||d!=u){d=a.editor.graph.compress(d);b.getModel().beginUpdate();try{if(l){var q=a.editor.graph.getInsertPoint();f.geometry.x=q.x;
+f.geometry.y=q.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[f])}catch(F){throw F;}finally{b.getModel().endUpdate()}l&&b.setSelectionCell(f)}};d=mxUtils.button(mxResources.get("preview"),function(){q(f,g,!1)});d.className="geBtn";m.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){q(a.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);p.appendChild(k);n.appendChild(p);this.container=
+n},CustomDialog=function(a,e,d,b,h,k,m,n){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=m&&e.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});m.className="geBtn";n&&(m.style.display="none");a.editor.cancelFirst&&e.appendChild(m);a.isOffline()||null==k||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),n.className="geBtn",e.appendChild(n));
+h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});e.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(m);p.appendChild(e);this.cancelBtn=m;this.okButton=h;this.container=p};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
@@ -7035,43 +7040,43 @@ Editor.shadowOptionEnabled=!0;Editor.configure=function(a){if(null!=a){Editor.co
a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;if(null!=a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);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&&(c=document.createElement("style"),c.setAttribute("type",
"text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):
-null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(h=new mxCodec(f.ownerDocument),h.decode(f,
-this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var h=new mxCodec(f.ownerDocument);h.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}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 c=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);
+null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(g=new mxCodec(f.ownerDocument),g.decode(f,
+this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var g=new mxCodec(f.ownerDocument);g.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);
+mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);
null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");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(v){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var h=0;h<b.length;h++)if("mxgraph"==b[h].getAttribute("class")){f.push(b[h]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),
+null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(v){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var g=0;g<b.length;g++)if("mxgraph"==b[g].getAttribute("class")){f.push(b[g]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),
a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),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)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
-null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
-null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
+null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};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?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
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 b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
-c){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var h=document.createElement("script");h.type="text/javascript";h.src=a;f[0].parentNode.appendChild(h)}};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,f,h){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==h&&c.push(h);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){g.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()}}if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-m.apply(this,arguments):this.clear()};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);if(mxClient.IS_SVG){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",
-this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var f=b.getCurrentFile();null!=f&&f.isAutosaveOptional()&&(f=this.createOption(mxResources.get("autosave"),
-function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(f))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},
-{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=
-mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+
-" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var h=f.getModel().getStyle(b[c]),n=0;n<e.length;n++)h=mxUtils.removeStylename(h,e[n]);null!=a?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,
-a.fill),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,a.stroke),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,"#000000"),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],h)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=
-a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||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%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");h.appendChild(c)}h.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,
-4)&&mxUtils.br(h),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(h);var e="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(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var d=document.createElement("div");d.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var q=document.createElement("div");q.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(d),a.appendChild(q));mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(d);b(q);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(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 f=this.editorUi.editor.graph,h=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=h&&null!=h.shape&&null!=h.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+c){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var g=document.createElement("script");g.type="text/javascript";g.src=a;f[0].parentNode.appendChild(g)}};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,f,g){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==g&&c.push(g);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){h.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()}}if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.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()};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);var c=this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&("1"==urlParams.embed||null!=c&&c.isEditable())){var b=this.editorUi,f=b.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return f.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;f.model.execute(c)},{install:function(a){this.listener=
+function(){a(f.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var f=b.getCurrentFile();null!=f&&f.isAutosaveOptional()&&
+(f=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(f))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
+stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
+{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"}]];var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var g=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
+c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return g.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var g=f.getModel().getStyle(b[c]),l=0;l<d.length;l++)g=mxUtils.removeStylename(g,
+d[l]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],g)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=
+"30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||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%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");g.appendChild(c)}g.innerHTML=
+"";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(g),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var d="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(" ");
+null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var q=document.createElement("div");q.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(q);b(e);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+(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 f=this.editorUi.editor.graph,g=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.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&&(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.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var t=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}t.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var u=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}u.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"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 f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return f.apply(this,arguments)}};var q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
-c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,c,f,!1);h.highlight(a);window.setTimeout(function(){null!=h.shape&&(mxUtils.setPrefixedStyle(h.shape.node.style,"transition","all 1200ms ease-in-out"),h.shape.node.style.opacity=0);window.setTimeout(function(){h.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;
-var f=a.ownerDocument,h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");h.setAttribute("id",this.shadowId);var n=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");n.setAttribute("in","SourceAlpha");n.setAttribute("stdDeviation",this.svgShadowBlur);n.setAttribute("result","blur");h.appendChild(n);n=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");
-n.setAttribute("in","blur");n.setAttribute("dx",this.svgShadowSize);n.setAttribute("dy",this.svgShadowSize);n.setAttribute("result","offsetBlur");h.appendChild(n);n=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");n.setAttribute("flood-color",this.svgShadowColor);n.setAttribute("flood-opacity",this.svgShadowOpacity);n.setAttribute("result","offsetColor");h.appendChild(n);n=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):
-f.createElement("feComposite");n.setAttribute("in","offsetColor");n.setAttribute("in2","offsetBlur");n.setAttribute("operator","in");n.setAttribute("result","offsetBlur");h.appendChild(n);n=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");n.setAttribute("in","SourceGraphic");n.setAttribute("in2","offsetBlur");h.appendChild(n);n=a.getElementsByTagName("defs");0==n.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),
-null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=n[0];f.appendChild(h);b||((c||a.getElementsByTagName("g")[0]).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)));return h};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,c,f,!1);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 f=a.ownerDocument,g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");g.setAttribute("id",this.shadowId);var l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");g.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");
+l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");g.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");g.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):
+f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");g.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");g.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),
+null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(g);b||((c||a.getElementsByTagName("g")[0]).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)));return g};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(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"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=
[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=
@@ -7079,303 +7084,303 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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 u=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,h,e,d,q,t,g){if(null!=b&&null==mxMarker.markers[b]){var n=this.getPackageForType(b);
-null!=n&&mxStencilRegistry.getStencil(n)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){m.value=Math.max(1,Math.min(q,Math.max(parseInt(m.value),parseInt(l.value))));l.value=Math.max(1,Math.min(q,Math.min(parseInt(m.value),parseInt(l.value))))}function f(c){function b(c,b,h){var n=c.getGraphBounds(),e=0,d=0,q=Z.get(),g=1/c.pageScale,t=y.checked;if(t)var g=parseInt(M.value),u=parseInt(X.value),g=Math.min(q.height*u/(n.height/c.view.scale),q.width*g/(n.width/
-c.view.scale));else g=parseInt(p.value)/(100*c.pageScale),isNaN(g)&&(f=1/c.pageScale,p.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*f);q.height=Math.ceil(q.height*f);g*=f;!t&&c.pageVisible?(n=c.getPageLayout(),e-=n.x*q.width,d-=n.y*q.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,g,q,0,e,d,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var v=b.writeHead;b.writeHead=function(c){v.apply(this,arguments);null!=a.editor.fontCss&&
-(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,c,b,f,h,n){var e=k.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,h,!0)}else{q=c.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";b.backgroundColor=q;b.autoOrigin=t;b.appendGraph(c,g,e,d,h,!0)}return b}var f=parseInt(U.value)/100;isNaN(f)&&(f=1,U.value=
-"100 %");var f=.75*f,n=l.value,d=m.value,e=!u.checked,q=null;e&&(e=n==t&&d==t);if(!e&&null!=a.pages&&a.pages.length){var g=0,e=a.pages.length-1;u.checked||(g=parseInt(n)-1,e=parseInt(d)-1);for(var k=g;k<=e;k++){var v=a.pages[k],n=v==a.currentPage?h:null;if(null==n){var n=a.createTemporaryGraph(h.getStylesheet()),d=!0,g=!1,w=null,x=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(d=v.viewState.pageVisible,g=v.viewState.mathEnabled,w=v.viewState.background,
-x=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(g="0"!=v.mapping.diagramMap.get("mathEnabled"),w=v.mapping.diagramMap.get("background"),x=v.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);n.background=w;n.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;n.pageVisible=d;n.mathEnabled=g;var B=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?k+1:B.apply(this,arguments)};document.body.appendChild(n.container);
-a.updatePageRoot(v);n.model.setRoot(v.root)}q=b(n,q,k!=e);n!=h&&n.container.parentNode.removeChild(n.container)}}else q=b(h);q.mathEnabled&&(e=q.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),c&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));q.closeDocument();!q.mathEnabled&&c&&PrintDialog.printPreview(q)}
-var h=a.editor.graph,e=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,c||mxResources.get("print"));e.appendChild(d);var q=1,t=1,g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");
-u.setAttribute("name","pages-printdialog");g.appendChild(u);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));g.appendChild(d);mxUtils.br(g);var k=u.cloneNode(!0);u.setAttribute("checked","checked");k.setAttribute("value","range");g.appendChild(k);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");g.appendChild(d);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type",
-"number");l.setAttribute("min","1");l.style.width="50px";g.appendChild(l);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));g.appendChild(d);var m=l.cloneNode(!0);g.appendChild(m);mxEvent.addListener(l,"focus",function(){k.checked=!0});mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(q=a.pages.length,null!=a.currentPage))for(d=0;d<a.pages.length;d++)if(a.currentPage==a.pages[d]){t=d+
-1;l.value=t;m.value=t;break}l.setAttribute("max",q);m.setAttribute("max",q);1<q&&e.appendChild(g);var w=document.createElement("div");w.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");w.appendChild(x);d=document.createElement("span");mxUtils.write(d,mxResources.get("adjustTo"));w.appendChild(d);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
-p.setAttribute("value","100 %");p.style.width="50px";w.appendChild(p);mxEvent.addListener(p,"focus",function(){x.checked=!0});e.appendChild(w);var g=g.cloneNode(!1),y=x.cloneNode(!0);y.setAttribute("value","fit");x.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(y);g.appendChild(d);w=document.createElement("table");w.style.display="inline-block";var R=document.createElement("tbody"),
-O=document.createElement("tr"),N=O.cloneNode(!0),K=document.createElement("td"),P=K.cloneNode(!0),S=K.cloneNode(!0),Y=K.cloneNode(!0),I=K.cloneNode(!0),aa=K.cloneNode(!0);K.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(K,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);d=document.createElement("span");mxUtils.write(d,
-mxResources.get("fitToSheetsAcross"));S.appendChild(d);mxUtils.write(Y,mxResources.get("fitToBy"));var X=M.cloneNode(!0);I.appendChild(X);mxEvent.addListener(M,"focus",function(){y.checked=!0});mxEvent.addListener(X,"focus",function(){y.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));aa.appendChild(d);O.appendChild(K);O.appendChild(P);O.appendChild(S);N.appendChild(Y);N.appendChild(I);N.appendChild(aa);R.appendChild(O);R.appendChild(N);w.appendChild(R);
-g.appendChild(w);e.appendChild(g);g=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom="12px";mxUtils.write(d,mxResources.get("paperSize"));g.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(d,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);g.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));g.appendChild(d);
-var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";g.appendChild(U);e.appendChild(g);d=document.createElement("div");d.style.cssText="text-align:right;margin:62px 0 0 0;";g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&d.appendChild(g);a.isOffline()||(w=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-w.className="geBtn",d.appendChild(w));PrintDialog.previewEnabled&&(w=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),w.className="geBtn",d.appendChild(w));w=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});w.className="geBtn gePrimaryBtn";d.appendChild(w);a.editor.cancelFirst||d.appendChild(g);e.appendChild(d);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(w.apply(this,arguments),null!=this.mathEnabled&&
+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 t=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,g,d,q,e,h,u){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);
+null!=l&&mxStencilRegistry.getStencil(l)}return t.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(k.value))));k.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(k.value))))}function f(c){function b(c,b,g){var l=c.getGraphBounds(),q=0,d=0,e=Z.get(),t=1/c.pageScale,h=A.checked;if(h)var t=parseInt(M.value),u=parseInt(X.value),t=Math.min(e.height*u/(l.height/c.view.scale),e.width*t/(l.width/
+c.view.scale));else t=parseInt(p.value)/(100*c.pageScale),isNaN(t)&&(f=1/c.pageScale,p.value="100 %");e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*f);e.height=Math.ceil(e.height*f);t*=f;!h&&c.pageVisible?(l=c.getPageLayout(),q-=l.x*e.width,d-=l.y*e.height):h=!0;if(null==b){b=PrintDialog.createPrintPreview(c,t,e,0,q,d,h);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var w=b.writeHead;b.writeHead=function(c){w.apply(this,arguments);null!=a.editor.fontCss&&
+(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage=function(a,c,b,f,g,l){var q=v.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:q.className="geDisableMathJax";return q}}b.open(null,null,g,!0)}else{e=c.background;if(null==e||""==e||e==mxConstants.NONE)e="#ffffff";b.backgroundColor=e;b.autoOrigin=h;b.appendGraph(c,t,q,d,g,!0)}return b}var f=parseInt(U.value)/100;isNaN(f)&&(f=1,U.value=
+"100 %");var f=.75*f,l=k.value,q=m.value,d=!u.checked,e=null;d&&(d=l==h&&q==h);if(!d&&null!=a.pages&&a.pages.length){var t=0,d=a.pages.length-1;u.checked||(t=parseInt(l)-1,d=parseInt(q)-1);for(var w=t;w<=d;w++){var v=a.pages[w],l=v==a.currentPage?g:null;if(null==l){var l=a.createTemporaryGraph(g.getStylesheet()),q=!0,t=!1,x=null,n=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(q=v.viewState.pageVisible,t=v.viewState.mathEnabled,x=v.viewState.background,
+n=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(t="0"!=v.mapping.diagramMap.get("mathEnabled"),x=v.mapping.diagramMap.get("background"),n=v.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null);l.background=x;l.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;l.pageVisible=q;l.mathEnabled=t;var E=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?w+1:E.apply(this,arguments)};document.body.appendChild(l.container);
+a.updatePageRoot(v);l.model.setRoot(v.root)}e=b(l,e,w!=d);l!=g&&l.container.parentNode.removeChild(l.container)}}else e=b(g);e.mathEnabled&&(d=e.wnd.document,d.writeln('<script type="text/x-mathjax-config">'),d.writeln("MathJax.Hub.Config({"),d.writeln('messageStyle: "none",'),d.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),d.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),d.writeln("TeX: {"),d.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+d.writeln("},"),d.writeln("tex2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("},"),d.writeln("asciimath2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("}"),d.writeln("});"),c&&(d.writeln("MathJax.Hub.Queue(function () {"),d.writeln("window.print();"),d.writeln("});")),d.writeln("\x3c/script>"),d.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));e.closeDocument();!e.mathEnabled&&c&&PrintDialog.printPreview(e)}
+var g=a.editor.graph,d=document.createElement("div"),q=document.createElement("h3");q.style.width="100%";q.style.textAlign="center";q.style.marginTop="0px";mxUtils.write(q,c||mxResources.get("print"));d.appendChild(q);var e=1,h=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");
+u.setAttribute("name","pages-printdialog");t.appendChild(u);q=document.createElement("span");mxUtils.write(q,mxResources.get("printAllPages"));t.appendChild(q);mxUtils.br(t);var w=u.cloneNode(!0);u.setAttribute("checked","checked");w.setAttribute("value","range");t.appendChild(w);q=document.createElement("span");mxUtils.write(q,mxResources.get("pages")+":");t.appendChild(q);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
+"number");k.setAttribute("min","1");k.style.width="50px";t.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("to"));t.appendChild(q);var m=k.cloneNode(!0);t.appendChild(m);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(m,"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(q=0;q<a.pages.length;q++)if(a.currentPage==a.pages[q]){h=q+
+1;k.value=h;m.value=h;break}k.setAttribute("max",e);m.setAttribute("max",e);1<e&&d.appendChild(t);var x=document.createElement("div");x.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");x.appendChild(n);q=document.createElement("span");mxUtils.write(q,mxResources.get("adjustTo"));x.appendChild(q);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
+p.setAttribute("value","100 %");p.style.width="50px";x.appendChild(p);mxEvent.addListener(p,"focus",function(){n.checked=!0});d.appendChild(x);var t=t.cloneNode(!1),A=n.cloneNode(!0);A.setAttribute("value","fit");n.setAttribute("checked","checked");q=document.createElement("div");q.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";q.appendChild(A);t.appendChild(q);x=document.createElement("table");x.style.display="inline-block";var R=document.createElement("tbody"),
+O=document.createElement("tr"),N=O.cloneNode(!0),K=document.createElement("td"),P=K.cloneNode(!0),S=K.cloneNode(!0),Y=K.cloneNode(!0),I=K.cloneNode(!0),aa=K.cloneNode(!0);K.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(K,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";P.appendChild(M);q=document.createElement("span");mxUtils.write(q,
+mxResources.get("fitToSheetsAcross"));S.appendChild(q);mxUtils.write(Y,mxResources.get("fitToBy"));var X=M.cloneNode(!0);I.appendChild(X);mxEvent.addListener(M,"focus",function(){A.checked=!0});mxEvent.addListener(X,"focus",function(){A.checked=!0});q=document.createElement("span");mxUtils.write(q,mxResources.get("fitToSheetsDown"));aa.appendChild(q);O.appendChild(K);O.appendChild(P);O.appendChild(S);N.appendChild(Y);N.appendChild(I);N.appendChild(aa);R.appendChild(O);R.appendChild(N);x.appendChild(R);
+t.appendChild(x);d.appendChild(t);t=document.createElement("div");q=document.createElement("div");q.style.fontWeight="bold";q.style.marginBottom="12px";mxUtils.write(q,mxResources.get("paperSize"));t.appendChild(q);q=document.createElement("div");q.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(q,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(q);q=document.createElement("span");mxUtils.write(q,mxResources.get("pageScale"));t.appendChild(q);
+var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";t.appendChild(U);d.appendChild(t);q=document.createElement("div");q.style.cssText="text-align:right;margin:62px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&q.appendChild(t);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+x.className="geBtn",q.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),x.className="geBtn",q.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";q.appendChild(x);a.editor.cancelFirst||q.appendChild(t);d.appendChild(q);this.container=d};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(x.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))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,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(){EditorUi.VERSION="8.5.15";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,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(){EditorUi.VERSION="8.6.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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.sidebarFooterHeight=36;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.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"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
-!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(q){}try{var b=document.createElement("canvas"),h=new Image;h.onload=function(){try{b.getContext("2d").drawImage(h,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&
-6<a.length}catch(u){}};h.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(q){}})();
-EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,h){localStorage.setItem(a,b);h()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,h){h=null!=h?h:24;var c=new Spinner({lines:12,
-length:h,width:Math.round(h/3),radius:Math.round(h/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(h,e){var d=!1;this.active||(f.call(this,h),this.active=!0,null!=e&&(d=document.createElement("div"),d.style.position="absolute",d.style.whiteSpace="nowrap",d.style.background="#4B4243",d.style.color="white",d.style.fontFamily="Helvetica, Arial",d.style.fontSize="9pt",d.style.padding="6px",d.style.paddingLeft="10px",d.style.paddingRight=
-"10px",d.style.zIndex=2E9,d.style.left=Math.max(0,a)+"px",d.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(d.style,"boxShadow","2px 2px 3px 0px #ddd"),d.innerHTML=e+"...",h.appendChild(d),c.status=d,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(d.style.left=Math.round(Math.max(0,a-d.offsetWidth/2))+"px",d.style.top=Math.round(Math.max(0,
-b+70-d.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(h,e)}));this.stop();return a}),d=!0);return d};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,h){function c(a,c){var b=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);do{h=f(a);var d=c(a,4);if(null!=b&&b(e-8,d,h))break;value=c(a,h);c(a,4);if("IEND"==d)break}while(h)}};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(t){}return!1};
-var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var h=c.indexOf("&lt;mxfile ");if(0<=h){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>h&&(b=c.substring(h,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var d=mxUtils.parseXml(c),g=this.editor.extractGraphModel(d.documentElement,null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(w){}return b};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))}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,e=a.getElementsByTagName("diagram");
-if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=e.length-1;0<=d;d--){var g=this.updatePageRoot(new DiagramPage(e[d]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[d+1]));c.model.execute(new ChangePage(this,g,0==d?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(d=0;d<b.length;d++)c.model.execute(new ChangePage(this,b[d],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,h,e,d,g,k,l,m,n){b=null!=b?b:this.editor.graph;d=null!=d?d:!1;m=null!=m?m:!0;var c,f=null;null==h||
-h.getMode()==App.MODE_DEVICE||h.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var q=a;if("mxfile"!=q.nodeName.toLowerCase()){var t=b.zapGremlins(mxUtils.getXml(a)),q=b.compress(t);if(b.decompress(q)!=t)return t;t=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(t,q);q=a.ownerDocument.createElement("mxfile");q.appendChild(t)}n?(q=q.cloneNode(!0),q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("type")):(q.setAttribute("userAgent",
-navigator.userAgent),q.setAttribute("version",EditorUi.VERSION),q.setAttribute("editor","www.draw.io"),a=null!=h?h.getMode():this.mode,null!=a&&q.setAttribute("type",a));a=mxUtils.getXml(q);if(!g&&!d&&(k||null!=h&&/(\.html)$/i.test(h.getTitle())))a=this.getHtml2(mxUtils.getXml(q),b,null!=h?h.getTitle():null,c,f);else if(g||!d&&null!=h&&/(\.svg)$/i.test(h.getTitle()))null==h||h.getMode()!=App.MODE_DEVICE&&h.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,l,m,f);return a};EditorUi.prototype.getXmlFileData=
-function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),
-e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,h,d,e,g,k,l,m){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1);m=null!=m?m:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());
-var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(k,g,m,window.location.href,a,b,h,d,e,l);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,h,e,d,g){g=null!=g?g:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():
-b.getBoundingBox(b.getSelectionCells()),q=b.view.scale;g=Math.floor(c.x/q-b.view.translate.x);q=Math.floor(c.y/q-b.view.translate.y);c=b.background;null==d&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",q)}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!=e&&a.setAttribute("edit",e));null!=
-d&&(d=d.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==d?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=d?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==d?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=d?
-'<meta http-equiv="refresh" content="0;URL=\''+d+"'\"/>\n":"")+"</head>\n<body"+(null==d&&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;">'+e+"</div>\n</div>\n"+(null==d?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+d+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,h,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==e?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\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==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-e+'" target="_blank"><img border="0" src="https://www.draw.io/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;var c=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=
-c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,h,e,d,g){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();
-var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var q='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,d));this.saveData(f,a,q,"text/xml")}else if("html"==a)q=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,q,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,
-function(c,b){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var h=this.createDownloadRequest(c,a,e,b);this.editor.graph.pageVisible=f;return h}catch(H){this.handleError(H)}}));else{var n=null,t=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"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 k=this.editor.graph.background;
-k==mxConstants.NONE&&(k=null);var u=this.editor.graph.getSvg(k,null,null,null,null,e);h&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?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 f=c+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();t(a)}),e)}}catch(z){this.handleError(z)}};
-EditorUi.prototype.createDownloadRequest=function(a,b,h,e){var c=this.editor.graph.getGraphBounds();h=this.getFileData(!0,null,null,null,h,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||h.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var d=0;d<this.pages.length;d++)if(this.pages[d]==this.currentPage){f="&from="+d;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+
-c+"&xml="+encodeURIComponent(h)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();
-this.editor.graph.model.clear();this.editor.undoManager.clear();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.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
-this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
-this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(q){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(q){}}catch(q){null!=
-window.console&&console.log("error in fileLoaded:",a,q);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=q&&null!=q.message?":err:"+encodeURIComponent(q.message):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}catch(u){}this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):e()}))}else e();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,h,e,d,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".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,e=b.previousSibling;c.insertBefore(b,a);c.insertBefore(e,b)};EditorUi.prototype.loadLibrary=
-function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,h){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 f=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f);else for(var h=
-0;h<b.length;h++){var e=b[h],d=e.data;if(null!=d){var d=this.convertDataUri(d),n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(n+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(n+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(this.editor.graph.decompress(e.xml)),0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
-b)for(var d=0;d<b.length;d++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));
-return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[d]);h=null!=h&&0<h.length?h:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),h,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var k=g.parentNode.previousSibling;h=k.getAttribute("title");null!=h&&0<h.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+h);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top=
-"5px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("align","top");v.setAttribute("border","0");v.className="geButton";v.style.marginRight="1px";v.style.marginTop="-1px";n.appendChild(v);var l=null;mxEvent.addListener(v,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,p=null,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),D=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=v.cloneNode(!1),
-p.setAttribute("src",Editor.spinImage),p.setAttribute("title",mxResources.get("saving")),p.style.cursor="default",p.style.marginRight="2px",p.style.marginTop="-2px",n.insertBefore(p,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=p&&null!=p.parentNode&&(p.parentNode.removeChild(p),k.style.paddingRight=18*n.childNodes.length+"px")})):null==l&&(l=v.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",
-mxResources.get("save")),n.insertBefore(l,n.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),k.style.paddingRight=18*n.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,h,e){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var d=
-0;d<a.length;d++){var n=m.getCellGeometry(a[d]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);D(h);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),H=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),
-m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),f=m.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=m.view.translate.x;c.y-=m.view.translate.y;F(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility=
-"hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),
-g.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility=
-"visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";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.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,h,d,n,q,t,k,v,l){if(null!=c&&"image/"==h.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,q,t),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,q,t),a,mxEvent.isAltDown(a)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&
-0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,m=mxUtils.bind(this,function(c,h){if(null!=c&&"text/xml"==h){var d=mxUtils.parseXml(c);if("mxlibrary"==d.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(d.documentElement));e(n,g);b=b.concat(n);D(a);this.spinner.stop();u=!0}catch(U){}else if("mxfile"==d.documentElement.nodeName)try{for(var q=d.documentElement.getElementsByTagName("diagram"),d=0;d<q.length;d++){var n=mxUtils.getTextContent(q[d]),t=this.stringToCells(this.editor.graph.decompress(n)),
-k=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,k.width,k.height),a)}u=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=l&&null!=k&&(/(\.vsdx)($|\?)/i.test(k)||/(\.vssx)($|\?)/i.test(k)||/(\.vsd)($|\?)/i.test(k))?this.importVisio(l,function(a){m(a,"text/xml")},null,k):!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=l?this.parseFile(l,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,h)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border=
-"3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",IMAGE_PATH+"/edit.gif");v.setAttribute("title",mxResources.get("edit"));n.insertBefore(v,n.firstChild);mxEvent.addListener(v,"click",A);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&A(a)});h=v.cloneNode(!1);h.setAttribute("src",Editor.plusImage);h.setAttribute("title",mxResources.get("add"));n.insertBefore(h,n.firstChild);mxEvent.addListener(h,"click",
-H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(h=document.createElement("span"),h.setAttribute("title",mxResources.get("help")),h.style.cssText="color:gray;text-decoration:none;",h.className="geButton",mxUtils.write(h,"?"),mxEvent.addGestureListeners(h,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),n.insertBefore(h,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};"1"==urlParams.offline||
-EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));
-a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",
-Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor=
-"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!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(q){}try{var b=document.createElement("canvas"),g=new Image;g.onload=function(){try{b.getContext("2d").drawImage(g,0,0);var a=
+b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,g){localStorage.setItem(a,b);g()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
+function(a,b,g){g=null!=g?g:24;var c=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(g,q){var d=!1;this.active||(f.call(this,g),this.active=!0,null!=q&&(d=document.createElement("div"),d.style.position="absolute",d.style.whiteSpace="nowrap",d.style.background="#4B4243",d.style.color="white",d.style.fontFamily="Helvetica, Arial",d.style.fontSize=
+"9pt",d.style.padding="6px",d.style.paddingLeft="10px",d.style.paddingRight="10px",d.style.zIndex=2E9,d.style.left=Math.max(0,a)+"px",d.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(d.style,"boxShadow","2px 2px 3px 0px #ddd"),d.innerHTML=q+"...",g.appendChild(d),c.status=d,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(d.style.left=
+Math.round(Math.max(0,a-d.offsetWidth/2))+"px",d.style.top=Math.round(Math.max(0,b+70-d.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(g,q)}));this.stop();return a}),d=!0);return d};var d=c.stop;c.stop=function(){d.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,g){function c(a,
+c){var b=d;d+=c;return a.substring(b,d)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var d=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);do{g=f(a);var e=c(a,4);if(null!=b&&b(d-8,e,g))break;value=c(a,g);c(a,4);if("IEND"==e)break}while(g)}};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(u){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var d=c.lastIndexOf("&lt;/mxfile&gt;");d>g&&(b=c.substring(g,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var q=mxUtils.parseXml(c),e=this.editor.extractGraphModel(q.documentElement,
+null!=this.pages),b=null!=e?mxUtils.getXml(e):""}catch(x){}return b};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))}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 q=d.length-1;0<=q;q--){var e=this.updatePageRoot(new DiagramPage(d[q]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[q+1]));c.model.execute(new ChangePage(this,e,0==q?e: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(q=0;q<b.length;q++)c.model.execute(new ChangePage(this,b[q],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(a,b,g,d,q,e,h,w,k,l){b=null!=b?b:this.editor.graph;q=null!=q?q:!1;k=null!=k?k:!0;var c,f=null;null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER?c="_blank":f=c=d;if(null==a)return"";var t=a;if("mxfile"!=t.nodeName.toLowerCase()){var u=b.zapGremlins(mxUtils.getXml(a)),t=b.compress(u);if(b.decompress(t)!=u)return u;u=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(u,t);t=a.ownerDocument.createElement("mxfile");t.appendChild(u)}l?(t=t.cloneNode(!0),t.removeAttribute("userAgent"),
+t.removeAttribute("version"),t.removeAttribute("editor"),t.removeAttribute("type")):(t.setAttribute("userAgent",navigator.userAgent),t.setAttribute("version",EditorUi.VERSION),t.setAttribute("editor","www.draw.io"),a=null!=g?g.getMode():this.mode,null!=a&&t.setAttribute("type",a));a=mxUtils.getXml(t);if(!e&&!q&&(h||null!=g&&/(\.html)$/i.test(g.getTitle())))a=this.getHtml2(mxUtils.getXml(t),b,null!=g?g.getTitle():null,c,f);else if(e||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=
+App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,w,k,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=
+this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,g,d,q,e,h,k,m){q=null!=q?q:!0;h=null!=h?h:this.getXmlFileData(q,null!=e?e:!1);m=null!=m?m:this.getCurrentFile();
+e=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){e=this.createTemporaryGraph(e.getStylesheet());var c=e.getGlobalVariable,f=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(f.root)}a=this.createFileData(h,e,m,window.location.href,a,b,g,d,q,k);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);
+return a};EditorUi.prototype.getHtml=function(a,b,g,d,q,e){e=null!=e?e:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=e?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;e=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==q&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",e);a.setAttribute("y0",h)}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!=q&&(q=q.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&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;">'+d+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+f+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,g,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\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==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/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;var c=null!=a&&0<a.length?
+mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
+0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,g,d,e,h){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var q='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(f,a,q,"text/xml")}else if("html"==
+a)q=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,q,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(c,a,d,b);this.editor.graph.pageVisible=f;return g}catch(G){this.handleError(G)}}));else{var l=null,t=
+mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"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;u==mxConstants.NONE&&(u=null);var k=this.editor.graph.getSvg(u,null,null,null,null,d);g&&this.editor.graph.addSvgShadow(k);this.convertImages(k,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?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 f=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();t(a)}),d)}}catch(y){this.handleError(y)}};EditorUi.prototype.createDownloadRequest=function(a,b,g,d){var c=this.editor.graph.getGraphBounds();g=this.getFileData(!0,null,null,null,g,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var e=
+0;e<this.pages.length;e++)if(this.pages[e]==this.currentPage){f="&from="+e;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+c+"&xml="+encodeURIComponent(g)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);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.updateUi();this.showSplash()});
+if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(q){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(q){}}catch(q){null!=window.console&&console.log("error in fileLoaded:",a,q);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=q&&null!=q.message?":err:"+encodeURIComponent(q.message):
+"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}catch(t){}this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,g,d,e,h,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?
+this.getLocalData(".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){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
+function(a,b,g){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 f=null,d=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign=
+"center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f);else for(var g=0;g<b.length;g++){var l=b[g],d=l.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(e+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,l.w,l.h,"",l.title||"",!1,!1,!0))}else null!=l.xml&&(d=this.stringToCells(this.editor.graph.decompress(l.xml)),
+0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,l.w,l.h,l.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var e=0;e<b.length;e++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",
+a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[e]);g=null!=g&&0<g.length?g:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),g,!0,mxUtils.bind(this,function(a){d(b,a)}));this.repositionLibrary(c);var k=h.parentNode.previousSibling;g=k.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=
+a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+g);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");k.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("valign","absmiddle");v.setAttribute("border","0");
+v.style.margin="0 3px";var m=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,p=null,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
+h,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=v.cloneNode(!1),p.setAttribute("src",Editor.spinImage),p.setAttribute("title",mxResources.get("saving")),p.style.cursor="default",p.style.marginRight="2px",p.style.marginTop="-2px",l.insertBefore(p,l.firstChild),k.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=p&&null!=
+p.parentNode&&(p.parentNode.removeChild(p),k.style.paddingRight=18*l.childNodes.length+"px")})):null==m&&(m=v.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),l.insertBefore(m,l.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||(k.style.paddingRight=18*l.childNodes.length+"px",m.parentNode.removeChild(m),
+m=null)});mxEvent.consume(c)})),k.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,g,l){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var d=0;d<a.length;d++){var e=n.getCellGeometry(a[d]);null!=e&&e.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,l||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=l&&(a.title=l);b.push(a);
+z(g);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),G=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),c=n.view.getBounds(b),f=n.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=n.view.translate.x;c.y-=n.view.translate.y;C(b,c)}mxEvent.consume(a)});
+h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(h.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility=
+"visible",h.style.border="3px solid transparent",h.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";h.style.cursor=
+"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,g,l,e,q,t,k,u,v){if(null!=c&&"image/"==g.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),
+c=[new mxCell("",new mxGeometry(0,0,q,t),c)],c[0].vertex=!0,C(c,new mxRectangle(0,0,q,t),a,mxEvent.isAltDown(a)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var w=!1,m=mxUtils.bind(this,function(c,g){if(null!=c&&"text/xml"==g){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var e=JSON.parse(mxUtils.getTextContent(l.documentElement));d(e,h);b=b.concat(e);z(a);this.spinner.stop();
+w=!0}catch(U){}else if("mxfile"==l.documentElement.nodeName)try{for(var q=l.documentElement.getElementsByTagName("diagram"),l=0;l<q.length;l++){var e=mxUtils.getTextContent(q[l]),t=this.stringToCells(this.editor.graph.decompress(e)),k=this.editor.graph.getBoundingBoxFromGeometry(t);C(t,new mxRectangle(0,0,k.width,k.height),a)}w=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&
+null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=k&&(/(\.vsdx)($|\?)/i.test(k)||/(\.vssx)($|\?)/i.test(k)||/(\.vsd)($|\?)/i.test(k))?this.importVisio(v,function(a){m(a,"text/xml")},null,k):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,g)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",IMAGE_PATH+"/edit.gif");v.setAttribute("title",mxResources.get("edit"));l.insertBefore(v,l.firstChild);mxEvent.addListener(v,
+"click",B);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&B(a)});g=v.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));l.insertBefore(g,l.firstChild);mxEvent.addListener(g,"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(g,
+"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),l.insertBefore(g,l.firstChild))}k.appendChild(l);k.style.paddingRight=18*l.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=
+function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
+EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
+Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
+"0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,h,e,d){a=new ImageDialog(this,a,b,h,e,d);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){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 b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,h,e,d){a=new LibraryDialog(this,a,b,h,e,d);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
-a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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,h){var c=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),d=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),d=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
-else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=
-mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,h,d)}else null!=h&&h()};EditorUi.prototype.showError=function(a,b,h,e,d,g,k,l,m,n,v){a=new ErrorDialog(this,a,b,h,e,d,g,k,null,l,m);this.showDialog(a.container,n||340,v||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
-b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,h,e,d){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=h&&h()},e,d)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
-EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,h){var c=a.toDataURL("image/"+h);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+h))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
-return c};EditorUi.prototype.saveCanvas=function(a,b,h){var c="jpeg"==h?"jpg":h,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,h);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+h,!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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
-EditorUi.prototype.doSaveLocalFile=function(a,b,h,e,d){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,h):new Blob([a],{type:h}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)h=window.open("about:blank","_blank"),null==h?mxUtils.popup(a,!0):(h.document.write(a),h.document.close(),h.document.execCommand("SaveAs",!0,b),h.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
-"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,h):new Blob([a],{type:h}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},
-0),c.click(),c.parentNode.removeChild(c)}catch(y){}}else this.createEchoRequest(a,b,h,e,d).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,h,e,d,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=h?"&mime="+h:"")+(null!=d?"&format="+d:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),f=c.length,e=Math.ceil(f/1024),d=Array(e),
-g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,f),n=Array(l-k),v=0;k<l;++v,++k)n[v]=c[k].charCodeAt(0);d[g]=new Uint8Array(n)}return new Blob(d,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,h,e,d,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=d&&(!mxClient.IS_IOS||!navigator.standalone);d=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null==h||"image/"!=h.substring(0,6)||"image/svg"==h.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
-null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,h,e);else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,h,e):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(a,b,h,e,c,f)}catch(G){this.handleError(G)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<d,4<d?3:4,a,h,e);this.showDialog(b.container,
-420,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,h){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(h?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(h?";base64,"+a:
-";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,g,d,e){a=new ImageDialog(this,a,b,g,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){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 b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,g,d,e){a=new LibraryDialog(this,a,b,g,d,e);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
+a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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,g){var c=null!=this.spinner&&null!=
+this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok"),e=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(d=mxResources.get("cancel"),e=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
+else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),a+=' <a href="https://drive.google.com/open?id='+h+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=
+mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,d,g,e)}else null!=g&&g()};EditorUi.prototype.showError=function(a,b,g,d,e,h,k,w,m,l,v){a=new ErrorDialog(this,a,b,g,d,e,h,k,null,w,m);this.showDialog(a.container,l||340,v||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
+b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,g,d,e){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=g&&g()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,g){var c=a.toDataURL("image/"+g);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+g))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
+return c};EditorUi.prototype.saveCanvas=function(a,b,g){var c="jpeg"==g?"jpg":g,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,g);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
+EditorUi.prototype.doSaveLocalFile=function(a,b,g,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,g):new Blob([a],{type:g}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(a,!0):(g.document.write(a),g.document.close(),g.document.execCommand("SaveAs",!0,b),g.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
+"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var q=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(q?parseInt(q[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(d?this.base64ToBlob(a,g):new Blob([a],{type:g}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},
+0),c.click(),c.parentNode.removeChild(c)}catch(A){}}else this.createEchoRequest(a,b,g,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,g,d,e,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=g?"&mime="+g:"")+(null!=e?"&format="+e:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),f=c.length,d=Math.ceil(f/1024),e=Array(d),
+h=0;h<d;++h){for(var k=1024*h,m=Math.min(k+1024,f),l=Array(m-k),v=0;k<m;++v,++k)l[v]=c[k].charCodeAt(0);e[h]=new Uint8Array(l)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,g,d,e,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null==g||"image/"!=g.substring(0,6)||"image/svg"==g.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
+null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,g,d);else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,g,d):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(a,b,g,d,c,f)}catch(F){this.handleError(F)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,k,null,1<e,4<e?3:4,a,g,d);this.showDialog(b.container,
+420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,g){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(g?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(g?";base64,"+a:
+";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);
else{this.exportDialog=document.createElement("div");var f=b.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=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var h=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});h.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){h.stop();
+mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var g=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});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();
this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+
-1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,h,e,d){this.isLocalFileSave()?this.saveLocalFile(h,a,e,d,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
-c){return this.createEchoRequest(h,a,e,d,b,c)}),h,d,e)};EditorUi.prototype.saveRequest=function(a,b,h,e,d,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=h("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,
-function(h){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,c,h)}catch(E){this.handleError(E)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,h)}catch(E){this.handleError(E)}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,k,null,1<c,4<c?3:4,e,g,d);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,h,e,d,g){};EditorUi.prototype.pickFolder=function(a,b,h){b(null)};EditorUi.prototype.exportSvg=function(a,b,h,e,d,g,k,l,m){if(this.spinner.spin(document.body,
-mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();h=null!=h?h:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,k,l,null,h);e&&this.editor.graph.addSvgShadow(f);var q=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();d&&a.setAttribute("content",this.getFileData(!0,null,null,null,h,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?
+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,g,d,e){this.isLocalFileSave()?this.saveLocalFile(g,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
+c){return this.createEchoRequest(g,a,d,e,b,c)}),g,e,d)};EditorUi.prototype.saveRequest=function(a,b,g,d,e,h,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=g("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,
+function(g){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,h,!0,c,g)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,c,g)}catch(D){this.handleError(D)}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,k,null,1<c,4<c?3:4,d,h,e);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,g,d,e,h){};EditorUi.prototype.pickFolder=function(a,b,g){b(null)};EditorUi.prototype.exportSvg=function(a,b,g,d,e,h,k,m,n){if(this.spinner.spin(document.body,
+mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();g=null!=g?g:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,k,m,null,g);d&&this.editor.graph.addSvgShadow(f);var q=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,g,n));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?
b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var c='<!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(q,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,t,this.thumbImageCache)):t(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,h,e,d,g){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");h&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled",
-"disabled");g&&(a.appendChild(c),h=document.createElement("span"),mxUtils.write(h,b),a.appendChild(h),d||mxUtils.br(a),mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(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 f=this.getCurrentFile(),e="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&
-(e=window.location.href);var d=document.createElement("select");d.style.width="120px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("makeCopy"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");d.appendChild(f);a.appendChild(d);mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if("custom"==
-d.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:d.value="blank"},mxResources.get("url"),null,null,null,null,function(){d.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)?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===d.value?"_blank":e:null},getEditInput:function(){return c},
-getEditSelect:function(){return d}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var f=document.createElement("select");f.style.width="100px";f.style.marginLeft=
+mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,t,this.thumbImageCache)):t(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,g,d,e,h){h=null!=h?h:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");g&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);d&&c.setAttribute("disabled",
+"disabled");h&&(a.appendChild(c),g=document.createElement("span"),mxUtils.write(g,b),a.appendChild(g),e||mxUtils.br(a),mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(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 f=this.getCurrentFile(),d="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&
+(d=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("makeCopy"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");e.appendChild(f);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==
+e.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.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)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":d:null},getEditInput:function(){return c},
+getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var f=document.createElement("select");f.style.width="100px";f.style.marginLeft=
"8px";f.style.marginRight="10px";f.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));f.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value",
-"frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(d));a.appendChild(f);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=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 e},getTarget:function(){return f.value},focus:function(){f.focus()}}};EditorUi.prototype.createLink=function(a,b,h,d,e,g,k,l){var c=this.getCurrentFile(),f=[];d&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&f.push("edit="+encodeURIComponent(e)),g&&
-f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(h&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?h="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),l||null==c||c.constructor!=window.DriveFile?h="#R"+encodeURIComponent(h?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(h="#"+c.getHash(),a=!1));
-a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+h};EditorUi.prototype.createHtml=function(a,b,h,d,e,g,k,l,m,n,v){this.getBasenames();var c={};""!=e&&e!=mxConstants.NONE&&(c.highlight=e);"auto"!==d&&(c.target=d);m||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;
-h=parseInt(h);isNaN(h)||100==h||(c.zoom=h/100);h=[];k&&(h.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(h.push("zoom"),c.resize=!0);l&&h.push("layers");0<h.length&&(m&&h.push("lightbox"),c.toolbar=h.join(" "));null!=n&&0<n.length&&(c.edit=n);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=h?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var h=document.createElement("div");h.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");f=g.cloneNode(!0);f.setAttribute("value",
-"copy");h.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var n=this.getCurrentFile();null==d&&null!=n&&n.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),
-h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked","checked");null==d&&g.setAttribute("disabled","disabled");c.appendChild(h);var l=this.addLinkSection(c),t=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight=
-"12px";m.value="100%";c.appendChild(m);var p=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,A=A=this.addCheckbox(c,mxResources.get("allPages"),h,!h),D=this.addCheckbox(c,mxResources.get("layers"),!0),F=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,F),B=H.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&F.checked?
-H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(g.checked?d:null,t.checked,m.value,l.getTarget(),l.getColor(),p.checked,A.checked,D.checked,F.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,h,d,e,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));n.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));l.style.marginTop="12px";l.className="geBtn";n.appendChild(l);c.appendChild(n);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));
-n.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(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,t=null;if(null!=h||null!=d)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")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=d+"px",c.appendChild(t),mxUtils.br(c);var m=this.addLinkSection(c,g);h=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),h,!h);var p=this.addCheckbox(c,mxResources.get("lightbox"),!0),F=this.addEditButton(c,p),H=F.getEditInput(),B=this.addCheckbox(c,mxResources.get("layers"),!0);B.style.marginLeft=H.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(B.removeAttribute("disabled"),H.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),H.setAttribute("disabled",
-"disabled"));H.checked&&p.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){e(m.getTarget(),m.getColor(),null==u?!0:u.checked,p.checked,F.getLink(),B.checked,null!=q?q.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():
-document.execCommand("selectAll",!1,null)):m.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0);null!=g&&(g.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=g?g.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,g,k,l,m){l=null!=l?l:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,h="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+"frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(d));a.appendChild(f);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||
+mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return f.value},focus:function(){f.focus()}}};EditorUi.prototype.createLink=function(a,b,g,d,e,h,k,m){var c=this.getCurrentFile(),f=[];d&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&f.push("edit="+encodeURIComponent(e)),h&&
+f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(g&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?g="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),a=!1));
+a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+g};EditorUi.prototype.createHtml=function(a,b,g,d,e,h,k,m,n,l,v){this.getBasenames();var c={};""!=e&&e!=mxConstants.NONE&&(c.highlight=e);"auto"!==d&&(c.target=d);n||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;
+g=parseInt(g);isNaN(g)||100==g||(c.zoom=g/100);g=[];k&&(g.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(g.push("zoom"),c.resize=!0);m&&g.push("layers");0<g.length&&(n&&g.push("lightbox"),c.toolbar=g.join(" "));null!=l&&0<l.length&&(c.edit=l);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,g,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var e=document.createElement("div");e.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","type-embedhtmldialog");f=h.cloneNode(!0);f.setAttribute("value",
+"copy");e.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));e.appendChild(k);mxUtils.br(e);e.appendChild(h);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));e.appendChild(k);var l=this.getCurrentFile();null==g&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),
+e.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==g&&h.setAttribute("disabled","disabled");c.appendChild(e);var v=this.addLinkSection(c),m=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight=
+"12px";u.value="100%";c.appendChild(u);var n=this.addCheckbox(c,mxResources.get("fit"),!0),e=null!=this.pages&&1<this.pages.length,p=p=this.addCheckbox(c,mxResources.get("allPages"),e,!e),z=this.addCheckbox(c,mxResources.get("layers"),!0),C=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,C),E=G.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&C.checked?
+G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(h.checked?g:null,m.checked,u.value,v.getTarget(),v.getColor(),n.checked,p.checked,z.checked,C.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,h,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",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 q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));l.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));q.style.marginTop="12px";q.className="geBtn";l.appendChild(q);c.appendChild(l);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));
+l.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(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 t=null,m=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),t=document.createElement("input"),
+t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",c.appendChild(t),mxUtils.write(c,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=e+"px",c.appendChild(m),mxUtils.br(c);var u=this.addLinkSection(c,k);d=null!=this.pages&&1<this.pages.length;var n=null;
+if(null==g||g.constructor!=window.DriveFile||b)n=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var p=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,p),G=C.getEditInput(),E=this.addCheckbox(c,mxResources.get("layers"),!0);E.style.marginLeft=G.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled",
+"disabled"));G.checked&&p.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){h(u.getTarget(),u.getColor(),null==n?!0:n.checked,p.checked,C.getLink(),E.checked,null!=t?t.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():
+document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),h=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=h&&(h.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=h?h.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,h,k,m,w){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==w?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
-"0";c.appendChild(u);mxUtils.br(c);var p=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=m),x=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),w=document.createElement("input");w.style.marginTop="16px";w.style.marginRight="8px";w.style.marginLeft="24px";w.setAttribute("disabled","disabled");w.setAttribute("type","checkbox");k&&(c.appendChild(w),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),
-h+=26,mxEvent.addListener(x,"change",function(){x.checked?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(w.setAttribute("checked","checked"),w.defaultChecked=!0);var H=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");b&&(c.appendChild(B),mxUtils.write(c,
-mxResources.get("embedImages")),mxUtils.br(c),h+=26);var L=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=m),C=null!=this.pages&&1<this.pages.length,J=this.addCheckbox(c,C?mxResources.get("allPages"):"",C,!C,null,"jpeg"!=m);J.style.marginLeft="24px";J.style.marginBottom="16px";C||(J.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&C?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});l&&C||J.setAttribute("disabled",
-"disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;g(t.value,p.checked,!x.checked,H.checked,L.checked,B.checked,u.value,w.checked,!J.checked)}),null,d,e);this.showDialog(a.container,340,h,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,g){var c=document.createElement("div");
-c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var k=this.addCheckbox(c,mxResources.get("fit"),!0),n=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),t=this.addEditButton(c,q),m=t.getEditInput(),p=1<f.model.getChildCount(f.model.getRoot()),
-D=this.addCheckbox(c,mxResources.get("layers"),p,!p);D.style.marginLeft=m.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(p&&D.removeAttribute("disabled"),m.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"));m.checked&&q.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
-function(){a(k.checked,n.checked,l.checked,q.checked,t.getLink(),D.checked)}),null,mxResources.get("embed"),g);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,g,k,l,m){function c(b){var c=" ",h="";e&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+b+'"'+n+(""!=h?' style="'+h+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),
-null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?c("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,e,g,k,l){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var q=f[h].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var t=" ",m="";e&&(t="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('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=m?' style="'+m+'"':"")+t+"/>")}))}else m="",e&&(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('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),m+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),m+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=m&&c.setAttribute("style",m),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=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+
+"0";c.appendChild(u);mxUtils.br(c);var n=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=w),p=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");k&&(c.appendChild(x),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),
+g+=26,mxEvent.addListener(p,"change",function(){p.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var G=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(c.appendChild(E),mxUtils.write(c,
+mxResources.get("embedImages")),mxUtils.br(c),g+=26);var J=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=w),H=null!=this.pages&&1<this.pages.length,L=this.addCheckbox(c,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=w);L.style.marginLeft="24px";L.style.marginBottom="16px";H||(L.style.visibility="hidden");mxEvent.addListener(J,"change",function(){J.checked&&H?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")});m&&H||L.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;h(t.value,n.checked,!p.checked,G.checked,J.checked,E.checked,u.value,x.checked,!L.checked)}),null,d,e);this.showDialog(a.container,340,g,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,h){var c=document.createElement("div");
+c.style.whiteSpace="nowrap";var f=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 q=this.addCheckbox(c,mxResources.get("fit"),!0),l=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),k=this.addCheckbox(c,d),m=this.addCheckbox(c,mxResources.get("lightbox"),!0),u=this.addEditButton(c,m),n=u.getEditInput(),p=1<f.model.getChildCount(f.model.getRoot()),
+z=this.addCheckbox(c,mxResources.get("layers"),p,!p);z.style.marginLeft=n.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(p&&z.removeAttribute("disabled"),n.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"));n.checked&&m.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
+function(){a(q.checked,l.checked,k.checked,m.checked,u.getLink(),z.checked)}),null,mxResources.get("embed"),h);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,h,k,m,n){function c(b){var c=" ",g="";e&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(h?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var l="";d&&(l=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+b+'"'+l+(""!=g?' style="'+g+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
+null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?c("data:image/png;base64,"+q.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,h,k,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var q=f[g].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var t=" ",u="";e&&(t="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('https://www.draw.io/?client=1&lightbox=1"+
+(h?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");a&&(u+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=u?' style="'+u+'"':"")+t+"/>")}))}else u="",e&&(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('https://www.draw.io/?client=1&lightbox=1"+
+(h?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),u+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=u&&c.setAttribute("style",u),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=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.convertMath=function(a,b,d,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var f=a.getElementsByTagName("diagram");if(0<
-f.length){var c=f[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=c&&(f=b.decompress(mxUtils.getTextContent(c)),null!=f&&0<f.length&&(a=mxUtils.parseXml(f).documentElement))}f=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=f}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,
-f=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),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
-c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(n){null!=b&&b(n)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,d,e,g,k,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,k);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=g)this.convertImages(b,mxUtils.bind(this,function(a){g((e?"":'<?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(e?"":'<?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(b)};EditorUi.prototype.exportImage=function(a,b,d,e,g,k,l,m,p){p=null!=p?p:"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.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,d,m):null,p)}catch(G){"Invalid image"==G.message?this.downloadFile(p):this.handleError(G)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,k,l)}catch(v){this.spinner.stop(),this.handleError(v)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],h=1;h<c.length;h++){var n=
-c[h].indexOf(")");f.push('url("');f.push(e[b(c[h].substring(0,n))]);f.push('"'+c[h].substring(n))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var k=1;k<c.length;k++){var l=c[k].indexOf(")"),m=null,n=c[k].indexOf("format(",l);0<n&&(m=b(c[k].substring(n+7,c[k].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))b=
-"application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;g()}),mxUtils.bind(this,
-function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[k].substring(0,l)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,g,k,l,m,p,n,v,G,E,z){k=null!=k?k:!0;G=null!=G?G:this.editor.graph;E=null!=E?E:0;var c=p?null:G.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(G.getSvg(c,null,null,z,null,null!=l?l:!0),mxUtils.bind(this,function(f){var d=new Image;d.onload=mxUtils.bind(this,
-function(){try{var e=document.createElement("canvas"),h=parseInt(f.getAttribute("width")),n=parseInt(f.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=k?Math.min(1,Math.min(3*b/(4*n),b/h)):b/h);h=Math.ceil(m*h)+2*E;n=Math.ceil(m*n)+2*E;e.setAttribute("width",h);e.setAttribute("height",n);var l=e.getContext("2d");null!=c&&(l.beginPath(),l.rect(0,0,h,n),l.fillStyle=c,l.fill());l.scale(m,m);l.drawImage(d,E/m,E/m);a(e)}catch(Q){null!=g&&g(Q)}});d.onerror=function(a){null!=g&&g(a)};try{n&&this.editor.graph.addSvgShadow(f);
-var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;f.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(G,f,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(f))}))});this.loadFonts(e)}catch(B){null!=g&&g(B)}}),d,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
+f.length){var c=f[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=c&&(f=b.decompress(mxUtils.getTextContent(c)),null!=f&&0<f.length&&(a=mxUtils.parseXml(f).documentElement))}f=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=f}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,
+f=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),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),g=c.getGlobalVariable,e=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?e.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(c.container);
+c.model.setRoot(e.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var g=d.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(g.substring(g.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(l){null!=b&&b(l)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,d,e,h,k,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,k);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((e?"":'<?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(e?"":'<?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(b)};EditorUi.prototype.exportImage=function(a,b,d,e,h,k,m,n,p){p=null!=p?p:"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.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,h?this.getFileData(!0,null,null,null,d,n):null,p)}catch(F){"Invalid image"==F.message?this.downloadFile(p):this.handleError(F)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,k,m)}catch(v){this.spinner.stop(),this.handleError(v)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],g=1;g<c.length;g++){var l=
+c[g].indexOf(")");f.push('url("');f.push(e[b(c[g].substring(0,l))]);f.push('"'+c[g].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var k=1;k<c.length;k++){var m=c[k].indexOf(")"),n=null,l=c[k].indexOf("format(",m);0<l&&(n=b(c[k].substring(l+7,c[k].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))b=
+"application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;h()}),mxUtils.bind(this,
+function(a){d--;h()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[k].substring(0,m)),n)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,h,k,m,n,p,l,v,F,D,y){k=null!=k?k:!0;F=null!=F?F:this.editor.graph;D=null!=D?D:0;var c=p?null:F.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(F.getSvg(c,null,null,y,null,null!=m?m:!0),mxUtils.bind(this,function(f){var d=new Image;d.onload=mxUtils.bind(this,
+function(){try{var e=document.createElement("canvas"),g=parseInt(f.getAttribute("width")),l=parseInt(f.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=k?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(n*g)+2*D;l=Math.ceil(n*l)+2*D;e.setAttribute("width",g);e.setAttribute("height",l);var q=e.getContext("2d");null!=c&&(q.beginPath(),q.rect(0,0,g,l),q.fillStyle=c,q.fill());q.scale(n,n);q.drawImage(d,D/n,D/n);a(e)}catch(Q){null!=h&&h(Q)}});d.onerror=function(a){null!=h&&h(a)};try{l&&this.editor.graph.addSvgShadow(f);
+var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;f.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(F,f,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(f))}))});this.loadFonts(e)}catch(E){null!=h&&h(E)}}),d,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,
-function(d,h){for(var g=a.getElementsByTagName(d),n=0;n<g.length;n++)mxUtils.bind(this,function(d){var n=e.convert(d.getAttribute(h));if(null!=n&&"data:"!=n.substring(0,5)){var g=f[n];null==g?(c++,this.convertImageToDataUri(n,function(e){null!=e&&(f[n]=e,d.setAttribute(h,e));c--;0==c&&b(a)})):d.setAttribute(h,g)}else null!=n&&d.setAttribute(h,n)})(g[n])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,g,k){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
-/(\.gif)($|\?)/i.test(a);g=null!=g?g:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}k=null!=k?k:"data:image/png;base64,";f=k+this.base64Encode(f)}b(f)}}else null!=
-d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){g&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(y){null!=d&&d(y)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
+function(d,g){for(var h=a.getElementsByTagName(d),l=0;l<h.length;l++)mxUtils.bind(this,function(d){var l=e.convert(d.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var h=f[l];null==h?(c++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,d.setAttribute(g,e));c--;0==c&&b(a)})):d.setAttribute(g,h)}else null!=l&&d.setAttribute(g,l)})(h[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,h,k){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
+/(\.gif)($|\?)/i.test(a);h=null!=h?h:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}k=null!=k?k:"data:image/png;base64,";f=k+this.base64Encode(f)}b(f)}}else null!=
+d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){h&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(A){null!=d&&d(A)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,f=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),
-d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);try{b(a.toDataURL())}catch(w){b(f.svgBrokenImage.src)}};c.onerror=function(){b(f.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,g){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),k=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var n=k.getElementsByTagName("diagram");
-if(1==n.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate();try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,l,l,m))}}finally{f.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(c=f.importGraphModel(k,b,d,e))}}catch(E){throw g||this.handleError(E,mxResources.get("invalidOrMissingFile")),
-E;}return c};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e: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)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,
-b,d)}catch(x){d(x)}else d({})});f.send(c)}else try{this.doImportVisio(a,b,d)}catch(x){d(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
-this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,d,e,g){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,g)}catch(w){this.handleError(w)}finally{null!=g&&g()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",
-c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,g){g=JSON.parse(a);a=[];if(null!=g.state){g=JSON.parse(g.state);for(var c in g.Pages)a.push(g.Pages[c]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(g);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
-EditorUi.prototype.insertTextAt=function(a,b,d,e,g,k,l){k=null!=k?k:!0;l=null!=l?l:!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:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,d,k,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(f,b,d,k,!0),0<h.length)return h}catch(v){}this.loadImage(a,mxUtils.bind(this,
-function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),h=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,
-null,"",c.snap(b),c.snap(d),h,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,k);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;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[g])),g.value=a,c.updateCellSize(g),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(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 b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,d,e,g,k,l,m,p,n,v){n=null!=n?n:!0;var c=!1,f=null,h=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,d,e,n);null!=m&&m(b)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,n),p=
-!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),n&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,n);null!=m&&m(a)})):null!=
-p&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l)||/(\.vsd)($|\?)/i.test(l))?(c=!0,this.importVisio(p,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(c=!0,this.parseFile(null!=p?p:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=m&&m(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,n));c||null==m||m(f);
-return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}g=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};
-EditorUi.prototype.importFiles=function(a,b,d,e,g,k,l,m,p,n,v,G){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;n=null!=n?n:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=v||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>q){h=!0;break}var u=mxUtils.bind(this,function(){var h=this.editor.graph,q=h.gridSize;g=null!=g?g:mxUtils.bind(this,function(a,b,f,d,e,h,g,n,k){return null!=a&&"<mxlibrary"==a.substring(0,
-10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,f,d,e,h,g,n,k,c,G)});k=null!=k?k:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,p=t,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--p){this.spinner.stop();if(null!=m)m(u);else{var c=[];h.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var d=u[f]();null!=d&&(c=c.concat(d))}}finally{h.getModel().endUpdate()}}k(c)}}),
-x=0;x<t;x++)mxUtils.bind(this,function(c){var k=a[c],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),p=decodeURIComponent(escape(atob(m.substring(t+1)))),u=mxUtils.parseXml(p),p=u.getElementsByTagName("svg");if(0<p.length){var p=p[0],B=G?null:p.getAttribute("content");null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));
-null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var n=a[0],l=parseFloat(n.getAttribute("width")),v=parseFloat(n.getAttribute("height")),p=n.getAttribute("viewBox");if(null==p||0==p.length)n.setAttribute("viewBox","0 0 "+l+" "+v);else if(isNaN(l)||isNaN(v)){var B=p.split(" ");3<B.length&&(l=parseFloat(B[2]),
-v=parseFloat(B[3]))}m=this.createSvgDataUri(mxUtils.getXml(n));var C=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,v)),w=g(m,k.type,b+c*q,d+c*q,Math.max(1,Math.round(l*C)),Math.max(1,Math.round(v*C)),k.name,f);if(isNaN(l)||isNaN(v)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);v=Math.max(1,x.height);w[0].geometry.width=l;w[0].geometry.height=v;n.setAttribute("viewBox","0 0 "+l+" "+v);m=this.createSvgDataUri(mxUtils.getXml(n));var a=m.indexOf(";");0<a&&(m=m.substring(0,
-a)+m.substring(m.indexOf(",",a+1)));h.setCellStyles("image",m,[w[0]])});x.src=this.createSvgDataUri(mxUtils.getXml(n))}return w}}}catch(ka){}return null})):w(c,mxUtils.bind(this,function(){return g(B,"text/xml",b+c*q,d+c*q,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var C=G?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var x=new Image;x.src=a.target.result;w(c,mxUtils.bind(this,function(){return g(C,"text/xml",b+c*q,d+c*q,x.width,x.height,k.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?
-(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,l,m){w(c,mxUtils.bind(this,function(){if(null!=h&&h.length<n){var t=f&&this.isResampleImage(a.target.result,v)?Math.min(1,
-Math.min(e/l,e/m)):1;return g(h,k.type,b+c*q,d+c*q,Math.round(l*t),Math.round(m*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else g(a.target.result,k.type,b+c*q,d+c*q,240,160,k.name,function(a){w(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)||/(\.vsd)($|\?)/i.test(k.name)?g(null,k.type,b+c*q,d+c*q,240,160,
-k.name,function(a){w(c,function(){return a})},k):"image"==k.type.substring(0,5)?m.readAsDataURL(k):m.readAsText(k)})(x)});h?this.confirmImageResize(function(a){f=a;u()},p):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(f,d){if(f||b)mxSettings.setResizeImages(f?d:null),mxSettings.save();c();a(d)};null==f||
+d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);try{b(a.toDataURL())}catch(x){b(f.svgBrokenImage.src)}};c.onerror=function(){b(f.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,h){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),q=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=q&&"mxfile"==q.nodeName&&null!=this.pages){var l=q.getElementsByTagName("diagram");
+if(1==l.length)q=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){var k=this.updatePageRoot(new DiagramPage(l[a])),m=this.pages.length;null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,k,k,m))}}finally{f.model.endUpdate()}}}null!=q&&"mxGraphModel"===q.nodeName&&(c=f.importGraphModel(q,b,d,e))}}catch(D){throw h||this.handleError(D,mxResources.get("invalidOrMissingFile")),
+D;}return c};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e: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)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,
+b,d)}catch(w){d(w)}else d({})});f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
+this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,d,e,h){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,h)}catch(x){this.handleError(x)}finally{null!=h&&h()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",
+c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,h){h=JSON.parse(a);a=[];if(null!=h.state){h=JSON.parse(h.state);for(var c in h.Pages)a.push(h.Pages[c]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(h);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
+EditorUi.prototype.insertTextAt=function(a,b,d,e,h,k,m){k=null!=k?k:!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,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=
+this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,k,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,k,!0),0<g.length)return g}catch(v){}this.loadImage(a,mxUtils.bind(this,
+function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,
+null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
+if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,k);else{c=this.editor.graph;h=null;c.getModel().beginUpdate();try{h=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[h])),h.value=a,c.updateCellSize(h),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(h.value)&&
+c.setLinkForCell(h,h.value),h.geometry.width+=c.gridSize,h.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[h]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,d,e,h,k,m,n,p,l,v){l=null!=l?l:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,d,e,l);null!=n&&n(b)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,l),p=
+!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),l&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,h,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,l);null!=n&&n(a)})):null!=
+p&&null!=m&&(/(\.vsdx)($|\?)/i.test(m)||/(\.vssx)($|\?)/i.test(m)||/(\.vsd)($|\?)/i.test(m))?(c=!0,this.importVisio(p,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=p?p: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!=n&&n(null))}),m)):/(\.vsd)($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,l));c||null==n||n(f);
+return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,h,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}h=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};
+EditorUi.prototype.importFiles=function(a,b,d,e,h,k,m,n,p,l,v,F){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;l=null!=l?l:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=v||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>q){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph,q=g.gridSize;h=null!=h?h:mxUtils.bind(this,function(a,b,f,d,e,g,l,h,k){return null!=a&&"<mxlibrary"==a.substring(0,
+10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,f,d,e,g,l,h,k,c,F)});k=null!=k?k:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,p=t,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--p){this.spinner.stop();if(null!=n)n(u);else{var c=[];g.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var d=u[f]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}k(c)}}),
+x=0;x<t;x++)mxUtils.bind(this,function(c){var k=a[c],t=new FileReader;t.onload=mxUtils.bind(this,function(a){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var t=a.target.result,n=t.indexOf(","),p=decodeURIComponent(escape(atob(t.substring(n+1)))),u=mxUtils.parseXml(p),p=u.getElementsByTagName("svg");if(0<p.length){var p=p[0],E=F?null:p.getAttribute("content");null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(E,!0)));
+null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E));null==E||"<mxfile "!==E.substring(0,8)&&"<mxGraphModel "!==E.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(t.substring(0,n+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var l=a[0],m=parseFloat(l.getAttribute("width")),v=parseFloat(l.getAttribute("height")),p=l.getAttribute("viewBox");if(null==p||0==p.length)l.setAttribute("viewBox","0 0 "+m+" "+v);else if(isNaN(m)||isNaN(v)){var w=p.split(" ");3<w.length&&(m=parseFloat(w[2]),
+v=parseFloat(w[3]))}t=this.createSvgDataUri(mxUtils.getXml(l));var E=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,v)),H=h(t,k.type,b+c*q,d+c*q,Math.max(1,Math.round(m*E)),Math.max(1,Math.round(v*E)),k.name,f);if(isNaN(m)||isNaN(v)){var J=new Image;J.onload=mxUtils.bind(this,function(){m=Math.max(1,J.width);v=Math.max(1,J.height);H[0].geometry.width=m;H[0].geometry.height=v;l.setAttribute("viewBox","0 0 "+m+" "+v);t=this.createSvgDataUri(mxUtils.getXml(l));var a=t.indexOf(";");0<a&&(t=t.substring(0,
+a)+t.substring(t.indexOf(",",a+1)));g.setCellStyles("image",t,[H[0]])});J.src=this.createSvgDataUri(mxUtils.getXml(l))}return H}}}catch(ka){}return null})):w(c,mxUtils.bind(this,function(){return h(E,"text/xml",b+c*q,d+c*q,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var H=F?null:this.extractGraphModelFromPng(a.target.result);if(null!=H&&0<H.length){var J=new Image;J.src=a.target.result;w(c,mxUtils.bind(this,function(){return h(H,"text/xml",b+c*q,d+c*q,J.width,J.height,k.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?
+(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,t){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<l){var n=f&&this.isResampleImage(a.target.result,v)?Math.min(1,
+Math.min(e/m,e/t)):1;return h(g,k.type,b+c*q,d+c*q,Math.round(m*n),Math.round(t*n),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result,k.type,b+c*q,d+c*q,240,160,k.name,function(a){w(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)||/(\.vsd)($|\?)/i.test(k.name)?h(null,k.type,b+c*q,d+c*q,240,160,
+k.name,function(a){w(c,function(){return a})},k):"image"==k.type.substring(0,5)?t.readAsDataURL(k):t.readAsText(k)})(x)});g?this.confirmImageResize(function(a){f=a;u()},p):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(f,d){if(f||b)mxSettings.setResizeImages(f?d:null),mxSettings.save();c();a(d)};null==f||
b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),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,f)};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 f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,g,k){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var h=Math.max(c/g,f/g);if(1<h){var n=Math.round(c/h),l=Math.round(f/h),m=document.createElement("canvas");
-m.width=n;m.height=l;m.getContext("2d").drawImage(a,0,0,n,l);var q=m.toDataURL();if(q.length<b.length){var t=document.createElement("canvas");t.width=n;t.height=l;var p=t.toDataURL();q!==p&&(b=q,c=n,f=l)}}}catch(D){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var b=e,g=0;8>g;g++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[e]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
-function(a,b,d,e,g){function c(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(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 k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);g=a.substring(0,
-k);do{var n=f(a);if("IDAT"==c(a,4)){g=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);g+=h(d.length)+b+d+h(e^4294967295);g+=a.substring(k-8,a.length);break}g+=a.substring(k-8,k-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&
+"xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,h,k){h=null!=h?h:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var g=Math.max(c/h,f/h);if(1<g){var l=Math.round(c/g),q=Math.round(f/g),m=document.createElement("canvas");
+m.width=l;m.height=q;m.getContext("2d").drawImage(a,0,0,l,q);var t=m.toDataURL();if(t.length<b.length){var n=document.createElement("canvas");n.width=l;n.height=q;var p=n.toDataURL();t!==p&&(b=t,c=l,f=q)}}}catch(z){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var b=d,h=0;8>h;h++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[d]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
+function(a,b,d,e,h){function c(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=c(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 k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);h=a.substring(0,
+k);do{var l=f(a);if("IDAT"==c(a,4)){h=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);h+=g(d.length)+b+d+g(e^4294967295);h+=a.substring(k-8,a.length);break}h+=a.substring(k-8,k-4+l);c(a,l);c(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&
!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(q){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph;d.addListener("pageLinkClicked",function(b,
c){a(c.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,
-arguments)};var g=d.addClickHandler;d.addClickHandler=function(b,c,f){var e=c;c=function(b,c){if(null==c){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(c=f.getAttribute("href"))}null==c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=e&&e(b,c)};g.call(this,b,c,f)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
-360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:l.apply(this,arguments)};var m=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var g=c.indexOf(",");0<g&&(g=b.getPageById(c.substring(g+1)),f=null!=
-g?g.getName():mxResources.get("pageNotFound"))}g=m.call(this,c,f);e&&mxEvent.addListener(g,"click",function(b){a(c);mxEvent.consume(b)});return g};var p=d.labelLinkClicked;d.labelLinkClicked=function(b,c,f){var e=c.getAttribute("href");if(null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))p.apply(this,arguments);else{if(!d.isEnabled()||null!=b&&d.isCellLocked(b.cell))a(e),d.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
-c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable){var n=function(){window.setTimeout(function(){v.innerHTML="&nbsp;";v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);
+arguments)};var h=d.addClickHandler;d.addClickHandler=function(b,c,f){var e=c;c=function(b,c){if(null==c){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(c=f.getAttribute("href"))}null==c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=e&&e(b,c)};h.call(this,b,c,f)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
+360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:m.apply(this,arguments)};var n=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var l=c.indexOf(",");0<l&&(l=b.getPageById(c.substring(l+1)),f=null!=
+l?l.getName():mxResources.get("pageNotFound"))}l=n.call(this,c,f);e&&mxEvent.addListener(l,"click",function(b){a(c);mxEvent.consume(b)});return l};var p=d.labelLinkClicked;d.labelLinkClicked=function(b,c,f){var e=c.getAttribute("href");if(null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))p.apply(this,arguments);else{if(!d.isEnabled()||null!=b&&d.isCellLocked(b.cell))a(e),d.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
+c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable){var l=function(){window.setTimeout(function(){v.innerHTML="&nbsp;";v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");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);mxClient.IS_IE||d.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;
-for(index in e){var g=e[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,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 h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace=
-"nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML="&nbsp;";var G=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
-b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||G||(v.style.left=d.container.scrollLeft+10+"px",v.style.top=d.container.scrollTop+10+"px",d.container.appendChild(v),G=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){v.focus();document.execCommand("selectAll",!1,null)},0):(v.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!G||
-224!=b&&17!=b&&91!=b||(G=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),v.parentNode.removeChild(v))}),0)}));mxEvent.addListener(v,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(v),n())}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){d.isEnabled()&&(this.copyCells(v,!0),n())}));mxEvent.addListener(v,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(v.innerHTML="&nbsp;",v.focus(),
-window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,v);v.innerHTML="&nbsp;"}),0))}),!0);var E=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==v?!0:E.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
+for(index in e){var l=e[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,l){b.insertImage(a,e,l)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace=
+"nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.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 b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
+b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||F||(v.style.left=d.container.scrollLeft+10+"px",v.style.top=d.container.scrollTop+10+"px",d.container.appendChild(v),F=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){v.focus();document.execCommand("selectAll",!1,null)},0):(v.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!F||
+224!=b&&17!=b&&91!=b||(F=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),v.parentNode.removeChild(v))}),0)}));mxEvent.addListener(v,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(v),l())}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){d.isEnabled()&&(this.copyCells(v,!0),l())}));mxEvent.addListener(v,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(v.innerHTML="&nbsp;",v.focus(),
+window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,v);v.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==v?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
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,f,e,g){b.insertImage(a,e,g)},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 d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,
+0,0,this.maxImageSize,function(a,c,d,f,e,l){b.insertImage(a,e,l)},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 d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,
Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):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()})))}));if("1"==urlParams.ruler&&"undefined"!==
-typeof mxRuler){y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="250px";y.style.width="2000px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);var z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var A=document.createElement("div");A.style.position="absolute";A.style.top=
-"95px";A.style.left="220px";A.style.width="30px";A.style.height="30px";A.style.background="whiteSmoke";document.body.appendChild(A);this.vRuler=new mxRuler(this.editor.graph,z,!0);this.hRuler=new mxRuler(this.editor.graph,y,!1)}if("1"==urlParams.test){y=document.getElementById("geFooter");null!=y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
-"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(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 D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
-F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-c=d.view.translate,f=d.view.scale,e=b.x/f-c.x,g=b.y/f-c.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var n=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=n;var k=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(n=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(n=b[0].getAttribute("href")));var l=!0,m=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(n,e,g,!0,k,null,l))});k&&n.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
-a;m()},mxEvent.isControlDown(a)):m()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,null,"",e,g,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(h,
-e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+typeof mxRuler){A=document.createElement("div");A.style.position="absolute";A.style.top="95px";A.style.left="250px";A.style.width="2000px";A.style.height="30px";A.style.background="whiteSmoke";document.body.appendChild(A);var y=document.createElement("div");y.style.position="absolute";y.style.top="125px";y.style.left="220px";y.style.width="30px";y.style.height="1000px";y.style.background="whiteSmoke";document.body.appendChild(y);var B=document.createElement("div");B.style.position="absolute";B.style.top=
+"95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,y,!0);this.hRuler=new mxRuler(this.editor.graph,A,!1)}if("1"==urlParams.test){A=document.getElementById("geFooter");null!=A&&(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)})),A.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 z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),
+C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+c=d.view.translate,f=d.view.scale,e=b.x/f-c.x,l=b.y/f-c.y;mxEvent.isAltDown(a)&&(l=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,e,l,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var g=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=g;var k=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(g=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(g=b[0].getAttribute("href")));var m=!0,q=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(g,e,l,!0,k,null,m))});k&&g.length>this.resampleThreshold?this.confirmImageResize(function(a){m=
+a;q()},mxEvent.isControlDown(a)):q()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,null,"",e,l,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(h,
+e,l,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,l,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,
!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||
-8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var g=f.lastIndexOf("%3E");0<=g&&g<f.length-3&&(f=f.substring(0,g+3))}catch(y){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(e=!0,f=k)}catch(y){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,
-c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(y){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var h=f.lastIndexOf("%3E");0<=h&&h<f.length-3&&(f=f.substring(0,h+3))}catch(A){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(e=!0,f=k)}catch(A){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,
+c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(A){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=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 c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=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!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?
(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=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=b+"px";g.style.left=c+"px";g.style.width=
-Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-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 b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};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){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,
-mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
-this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,
-function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){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))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&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(){this.confirm(mxResources.get("allChangesLost"),
-null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};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=
+EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=c+"px";h.style.width=
+Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};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){var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".xml");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".xml":f+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.vsdx)($|\?)/i.test(f)||/(\.vssx)($|\?)/i.test(f)||/(\.vsd)($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,
+mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,f,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
+this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}});c.onerror=mxUtils.bind(this,
+function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=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))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),
+null,f,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};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,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),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.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};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){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,
-page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){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(f){function g(a){if(null!=
-a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(J){}return a}if(f.source==(window.opener||window.parent)){var n=f.data;if("json"==urlParams.proto){try{n=JSON.parse(n)}catch(C){n=null}if(null==n)return;if("dialog"==n.action){this.showError(null!=
-n.titleKey?mxResources.get(n.titleKey):n.title,null!=n.messageKey?mxResources.get(n.messageKey):n.message,null!=n.buttonKey?mxResources.get(n.buttonKey):n.button);null!=n.modified&&(this.editor.modified=n.modified);return}if("prompt"==n.action){this.spinner.stop();var h=new FilenameDialog(this,n.defaultValue||"",null!=n.okKey?mxResources.get(n.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:n}),"*")},null!=n.titleKey?mxResources.get(n.titleKey):n.title);
-this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==n.action){h=null;h="data:image/png;base64,"==n.xml.substring(0,22)?this.extractGraphModelFromPng(n.xml):g(n.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[n.name||this.defaultFilename]),h,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:n}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:n}),"*")}),n.editKey?mxResources.get(n.editKey):null,n.discardKey?mxResources.get(n.discardKey):null,n.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:n}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{h.init()}catch(C){k.postMessage(JSON.stringify({event:"draft",error:C.toString(),message:n}),"*")}return}if("template"==
-n.action){this.spinner.stop();var h=1==n.enableRecent,l=1==n.enableSearch,h=new NewDialog(this,!1,null!=n.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=n.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,h?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==n.action)this.searchReadyCallback(n.list,n.errorMsg);else if("recentDocsList"==n.action)this.recentReadyCallback(n.list,
-n.errorMsg);else{if("status"==n.action){null!=n.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(n.messageKey))):null!=n.message&&this.editor.setStatus(mxUtils.htmlEntities(n.message));null!=n.modified&&(this.editor.modified=n.modified);return}if("spinner"==n.action){var m=null!=n.messageKey?mxResources.get(n.messageKey):n.message;null==n.show||n.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==n.action){if("png"==n.format||"xmlpng"==n.format){if(null==
-n.spin&&null==n.spinKey||this.spinner.spin(document.body,null!=n.spinKey?mxResources.get(n.spinKey):n.spin)){var p=null!=n.xml?n.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=n.format;b.message=n;b.data=a;b.xml=encodeURIComponent(p);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==n.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,B=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);
-q.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==n.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
-n.xml&&0<n.xml.length&&this.setFileData(n.xml);m=this.createLoadMessage("export");if("html2"==n.format||"html"==n.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),m.xml=mxUtils.getXml(h),m.data=this.getFileData(null,null,!0,null,null,null,h),m.format=n.format;else if("html"==n.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=n.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;
-h==mxConstants.NONE&&(h=null);m.xml=this.getFileData(!0);m.format="svg";if(n.embedImages||null==n.embedImages){if(null==n.spin&&null==n.spinKey||this.spinner.spin(document.body,null!=n.spinKey?mxResources.get(n.spinKey):n.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==n.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(h),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(m),"*")}));return}h="xmlsvg"==n.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));m.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(m),"*")}return}if("load"==n.action)d=1==n.autosave,this.hideDialog(),null!=n.modified&&null==urlParams.modified&&(urlParams.modified=
-n.modified),null!=n.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=n.saveAndExit),null!=n.title&&null!=this.buttonContainer&&(h=document.createElement("span"),mxUtils.write(h,n.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(h),this.embedFilenameSpan=h),n=null!=n.xmlpng?this.extractGraphModelFromPng(n.xmlpng):null!=n.xml&&"data:image/png;base64,"==n.xml.substring(0,22)?this.extractGraphModelFromPng(n.xml):n.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(n)}),"*");return}}}n=g(n);c=!0;try{a(n,f)}catch(C){this.handleError(C)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var x=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=x();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=x();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
-b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";k.postMessage(g,"*")};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":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
+function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,
+scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,h=mxUtils.bind(this,function(a,b){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,h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=
+a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(L){}return a}if(f.source==(window.opener||window.parent)){var l=f.data;if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(H){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=
+l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var g=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);
+this.showDialog(g.container,300,80,!0,!1);g.init();return}if("draft"==l.action){g=null;g="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):h(l.xml);this.spinner.stop();g=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),g,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(g.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{g.init()}catch(H){k.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:l}),"*")}return}if("template"==
+l.action){this.spinner.stop();var g=1==l.enableRecent,m=1==l.enableSearch,g=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,g?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(g.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));g.init();return}if("searchDocsList"==l.action)this.searchReadyCallback(l.list,l.errorMsg);else if("recentDocsList"==l.action)this.recentReadyCallback(l.list,
+l.errorMsg);else{if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var q=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,q):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
+l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var n=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var t=this.editor.graph,p=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.message=l;b.data=a;b.xml=encodeURIComponent(n);k.postMessage(JSON.stringify(b),"*")}),w=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);p(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var t=this.createTemporaryGraph(t.getStylesheet()),u=t.getGlobalVariable,E=this.pages[0];t.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(t.container);
+t.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,t)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?p("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=
+l.xml&&0<l.xml.length&&this.setFileData(l.xml);q=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))g=this.getXmlFileData(),q.xml=mxUtils.getXml(g),q.data=this.getFileData(null,null,!0,null,null,null,g),q.format=l.format;else if("html"==l.format)n=this.editor.getGraphXml(),q.data=this.getHtml(n,this.editor.graph),q.xml=mxUtils.getXml(n),q.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;g=this.editor.graph.background;
+g==mxConstants.NONE&&(g=null);q.xml=this.getFileData(!0);q.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(q),"*")})):this.convertImages(this.editor.graph.getSvg(g),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(q),"*")}));return}g="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(g));q.data=this.createSvgDataUri(g)}k.postMessage(JSON.stringify(q),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=
+l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(g=document.createElement("span"),mxUtils.write(g,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(g),this.embedFilenameSpan=g),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}}l=h(l);c=!0;try{a(l,f)}catch(H){this.handleError(H)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var J=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
+1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=J();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=J();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
+b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):
+urlParams.ready||"ready";k.postMessage(h,"*")};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":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";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.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,k="",l="auto",m="auto",n=null,p=null,G=40,E=40,z=0,A=this.editor.graph;
-A.getGraphBounds();for(var D=function(){A.setSelectionCells(U);A.scrollCellToVisible(A.getSelectionCell())},F=A.getFreeInsertPoint(),H=F.x,B=F.y,F=B,L=null,C="auto",J=[],Q=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var O=mxUtils.trim(a.substring(1,R)),N=mxUtils.trim(a.substring(R+1));"label"==O?L=A.sanitizeHtml(N):
-"style"==O?e=N:"identity"==O&&0<N.length&&"-"!=N?g=N:"namespace"==O&&0<N.length&&"-"!=N?k=N:"width"==O?l=N:"height"==O?m=N:"left"==O&&0<N.length?n=N:"top"==O&&0<N.length?p=N:"ignore"==O?V=N.split(","):"connect"==O?J.push(JSON.parse(N)):"link"==O?Q=N:"padding"==O?z=parseFloat(N):"edgespacing"==O?G=parseFloat(N):"nodespacing"==O?E=parseFloat(N):"layout"==O&&(C=N)}}}var K=this.editor.csvToArray(b[T]);a=null;if(null!=g)for(var P=0;P<K.length;P++)if(g==K[P]){a=P;break}null==L&&(L="%"+K[0]+"%");if(null!=
-J)for(var S=0;S<J.length;S++)null==d[J[S].to]&&(d[J[S].to]={});A.model.beginUpdate();try{for(P=T+1;P<b.length;P++){var Y=this.editor.csvToArray(b[P]);if(Y.length==K.length){var I=null,aa=null!=a?k+Y[a]:null;null!=aa&&(I=A.model.getCell(aa));null==I&&(I=new mxCell(L,new mxGeometry(H,F,0,0),e||"whiteSpace=wrap;html=1;"),I.vertex=!0,I.id=aa);for(var M=0;M<Y.length;M++)A.setAttributeForCell(I,K[M],Y[M]);A.setAttributeForCell(I,"placeholders","1");I.style=A.replacePlaceholders(I,I.style);for(S=0;S<J.length;S++)d[J[S].to][I.getAttribute(J[S].to)]=
-I;null!=Q&&"link"!=Q&&(A.setLinkForCell(I,I.getAttribute(Q)),A.setAttributeForCell(I,Q,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var X=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=n&&null!=I.getAttribute(n)&&(I.geometry.x=H+parseFloat(I.getAttribute(n))),null!=p&&null!=I.getAttribute(p)&&(I.geometry.y=B+parseFloat(I.getAttribute(p))),"@"==l.charAt(0)&&null!=I.getAttribute(l.substring(1))?I.geometry.width=parseFloat(I.getAttribute(l.substring(1))):I.geometry.width=
-"auto"==l?X.width+z:parseFloat(l),"@"==m.charAt(0)&&null!=I.getAttribute(m.substring(1))?I.geometry.height=parseFloat(I.getAttribute(m.substring(1))):I.geometry.height="auto"==m?X.height+z:parseFloat(m),F+=I.geometry.height+E);c.push(A.addCell(I))}}for(var Z=c.slice(),U=c.slice(),S=0;S<J.length;S++)for(var W=J[S],P=0;P<c.length;P++){var I=c[P],ha=I.getAttribute(W.from);if(null!=ha){A.setAttributeForCell(I,W.from,null);for(var ia=ha.split(","),M=0;M<ia.length;M++){var ba=d[W.to][ia[M]];null!=ba&&(L=
-W.label,null!=W.fromlabel&&(L=(I.getAttribute(W.fromlabel)||"")+(L||"")),null!=W.tolabel&&(L=(L||"")+(ba.getAttribute(W.tolabel)||"")),U.push(A.insertEdge(null,null,L||"",W.invert?ba:I,W.invert?I:ba,W.style||A.createCurrentEdgeStyle())),mxUtils.remove(W.invert?I:ba,Z))}}}if(null!=V)for(P=0;P<c.length;P++)for(I=c[P],M=0;M<V.length;M++)A.setAttributeForCell(I,mxUtils.trim(V[M]),null);var da=new mxParallelEdgeLayout(A);da.spacing=G;var ja=function(){da.execute(A.getDefaultParent());for(var a=0;a<c.length;a++){var b=
-A.getCellGeometry(c[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==l&&(b.width=Math.round(A.snap(b.width)));"auto"==m&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==C){var ea=new mxCircleLayout(A);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(A.getDefaultParent());ja()},!0,D);D=null}else if("horizontaltree"==C||"verticaltree"==C||"auto"==C&&U.length==
-2*c.length-1&&1==Z.length){A.view.validate();var fa=new mxCompactTreeLayout(A,"horizontaltree"==C);fa.levelDistance=E;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(A.getDefaultParent(),0<Z.length?Z[0]:null)},!0,D);D=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==Z.length){A.view.validate();var ga=new mxHierarchicalLayout(A,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(A.getDefaultParent(),
-U);A.moveCells(U,H,B)},!0,D);D=null}else if("organic"==C||"auto"==C&&U.length>c.length){A.view.validate();var ca=new mxFastOrganicLayout(A);ca.forceConstant=3*E;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(A);da.spacing=G;this.executeLayout(function(){ca.execute(A.getDefaultParent());ja()},!0,D);D=null}this.hideDialog()}finally{A.model.endUpdate()}null!=D&&D()}}catch(ma){this.handleError(ma)}};
+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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,h=null,k="",m="auto",n="auto",l=null,p=null,F=40,D=40,y=0,B=this.editor.graph;
+B.getGraphBounds();for(var z=function(){B.setSelectionCells(U);B.scrollCellToVisible(B.getSelectionCell())},C=B.getFreeInsertPoint(),G=C.x,E=C.y,C=E,J=null,H="auto",L=[],Q=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var O=mxUtils.trim(a.substring(1,R)),N=mxUtils.trim(a.substring(R+1));"label"==O?J=B.sanitizeHtml(N):
+"style"==O?e=N:"identity"==O&&0<N.length&&"-"!=N?h=N:"namespace"==O&&0<N.length&&"-"!=N?k=N:"width"==O?m=N:"height"==O?n=N:"left"==O&&0<N.length?l=N:"top"==O&&0<N.length?p=N:"ignore"==O?V=N.split(","):"connect"==O?L.push(JSON.parse(N)):"link"==O?Q=N:"padding"==O?y=parseFloat(N):"edgespacing"==O?F=parseFloat(N):"nodespacing"==O?D=parseFloat(N):"layout"==O&&(H=N)}}}var K=this.editor.csvToArray(b[T]);a=null;if(null!=h)for(var P=0;P<K.length;P++)if(h==K[P]){a=P;break}null==J&&(J="%"+K[0]+"%");if(null!=
+L)for(var S=0;S<L.length;S++)null==d[L[S].to]&&(d[L[S].to]={});B.model.beginUpdate();try{for(P=T+1;P<b.length;P++){var Y=this.editor.csvToArray(b[P]);if(Y.length==K.length){var I=null,aa=null!=a?k+Y[a]:null;null!=aa&&(I=B.model.getCell(aa));null==I&&(I=new mxCell(J,new mxGeometry(G,C,0,0),e||"whiteSpace=wrap;html=1;"),I.vertex=!0,I.id=aa);for(var M=0;M<Y.length;M++)B.setAttributeForCell(I,K[M],Y[M]);B.setAttributeForCell(I,"placeholders","1");I.style=B.replacePlaceholders(I,I.style);for(S=0;S<L.length;S++)d[L[S].to][I.getAttribute(L[S].to)]=
+I;null!=Q&&"link"!=Q&&(B.setLinkForCell(I,I.getAttribute(Q)),B.setAttributeForCell(I,Q,null));B.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var X=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=l&&null!=I.getAttribute(l)&&(I.geometry.x=G+parseFloat(I.getAttribute(l))),null!=p&&null!=I.getAttribute(p)&&(I.geometry.y=E+parseFloat(I.getAttribute(p))),"@"==m.charAt(0)&&null!=I.getAttribute(m.substring(1))?I.geometry.width=parseFloat(I.getAttribute(m.substring(1))):I.geometry.width=
+"auto"==m?X.width+y:parseFloat(m),"@"==n.charAt(0)&&null!=I.getAttribute(n.substring(1))?I.geometry.height=parseFloat(I.getAttribute(n.substring(1))):I.geometry.height="auto"==n?X.height+y:parseFloat(n),C+=I.geometry.height+D);c.push(B.addCell(I))}}for(var Z=c.slice(),U=c.slice(),S=0;S<L.length;S++)for(var W=L[S],P=0;P<c.length;P++){var I=c[P],ha=I.getAttribute(W.from);if(null!=ha){B.setAttributeForCell(I,W.from,null);for(var ia=ha.split(","),M=0;M<ia.length;M++){var ba=d[W.to][ia[M]];null!=ba&&(J=
+W.label,null!=W.fromlabel&&(J=(I.getAttribute(W.fromlabel)||"")+(J||"")),null!=W.tolabel&&(J=(J||"")+(ba.getAttribute(W.tolabel)||"")),U.push(B.insertEdge(null,null,J||"",W.invert?ba:I,W.invert?I:ba,W.style||B.createCurrentEdgeStyle())),mxUtils.remove(W.invert?I:ba,Z))}}}if(null!=V)for(P=0;P<c.length;P++)for(I=c[P],M=0;M<V.length;M++)B.setAttributeForCell(I,mxUtils.trim(V[M]),null);var da=new mxParallelEdgeLayout(B);da.spacing=F;var ja=function(){da.execute(B.getDefaultParent());for(var a=0;a<c.length;a++){var b=
+B.getCellGeometry(c[a]);b.x=Math.round(B.snap(b.x));b.y=Math.round(B.snap(b.y));"auto"==m&&(b.width=Math.round(B.snap(b.width)));"auto"==n&&(b.height=Math.round(B.snap(b.height)))}};if("circle"==H){var ea=new mxCircleLayout(B);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(B.getDefaultParent());ja()},!0,z);z=null}else if("horizontaltree"==H||"verticaltree"==H||"auto"==H&&U.length==
+2*c.length-1&&1==Z.length){B.view.validate();var fa=new mxCompactTreeLayout(B,"horizontaltree"==H);fa.levelDistance=D;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(B.getDefaultParent(),0<Z.length?Z[0]:null)},!0,z);z=null}else if("horizontalflow"==H||"verticalflow"==H||"auto"==H&&1==Z.length){B.view.validate();var ga=new mxHierarchicalLayout(B,"horizontalflow"==H?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=D;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(B.getDefaultParent(),
+U);B.moveCells(U,G,E)},!0,z);z=null}else if("organic"==H||"auto"==H&&U.length>c.length){B.view.validate();var ca=new mxFastOrganicLayout(B);ca.forceConstant=3*D;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(B);da.spacing=F;this.executeLayout(function(){ca.execute(B.getDefaultParent());ja()},!0,z);z=null}this.hideDialog()}finally{B.model.endUpdate()}null!=z&&z()}}catch(ma){this.handleError(ma)}};
EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],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(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
+d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||
+a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
+e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||
c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||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("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").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.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));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding=
-"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,g=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
+"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
-IMAGE_PATH+'/clear.gif"/>'}a!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
+EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("rename").setEnabled(null!=d&&d.isRenamable());this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());
-a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&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,e,g,k){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(e,g,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),n=Math.floor(h.width*g/c.view.scale),l=Math.floor(h.height*g/c.view.scale);f.length<=MAX_REQUEST_SIZE&&n*l<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+l+"&border="+k+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
+a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&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,e,h,k){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(e,h,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*h/c.view.scale),m=Math.floor(g.height*h/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+
+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+k+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
setGridColor:function(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},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=
a},addCustomLibrary:function(a){mxSettings.load();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},setPlugins:function(a){mxSettings.settings.plugins=
a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle},
@@ -7385,26 +7390,26 @@ mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSet
mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,
null==mxSettings.settings.currentEdgeStyle?mxSettings.settings.currentEdgeStyle=Graph.prototype.defaultEdgeStyle:10>=mxSettings.settings.version&&(mxSettings.settings.currentEdgeStyle.orthogonalLoop=1,mxSettings.settings.currentEdgeStyle.jettySize="auto"),null==mxSettings.settings.currentVertexStyle&&(mxSettings.settings.currentVertexStyle=Graph.prototype.defaultVertexStyle),null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=
mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};
-("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,d,e){EditorUi.call(this,a,d,null!=e?e:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,d,e){var b=null;try{b=window.open(a)}catch(m){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,e,d){EditorUi.call(this,a,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,d,e){var b=null;try{b=window.open(a)}catch(n){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(b){null!=window.console&&console.log("Plugin Error:",b,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
"import":"/plugins/import.js",replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js"};
-App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),e=0;e<d.length;e++){var b=mxUtils.trim(d[e]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",a))}return a};
+App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var b=mxUtils.trim(e[d]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",a))}return a};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
-App.main=function(a,d){var e=null;EditorUi.enableLogging&&(window.onerror=function(a,b,d,g,k){try{if(a!=e&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){e=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height",
-"0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var b=mxSettings.getPlugins(),g=urlParams.p;App.initPluginCallback();if(null!=g){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var l=g.split(";"),g=0;g<l.length;g++){var m=App.pluginRegistry[l[g]];null!=m?mxscript(k+m):null!=window.console&&console.log("Unknown plugin:",l[g])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
-null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;l=!0;for(g=0;g<b.length&&l;g++)"/"!=b[g].charAt(0)&&b[g].substring(0,k.length)!=k&&(l=!1);if(l||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",[b.join("\n")]).replace(/\\n/g,
-"\n")))for(g=0;g<b.length;g++)try{mxscript(b[g])}catch(p){}}}"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();
-mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=d?d():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===
-typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===
-typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=
-urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
+App.main=function(a,e){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,e,h,k){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=h?":colno:"+encodeURIComponent(h):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(x){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height",
+"0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var b=mxSettings.getPlugins(),h=urlParams.p;App.initPluginCallback();if(null!=h){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var m=h.split(";"),h=0;h<m.length;h++){var n=App.pluginRegistry[m[h]];null!=n?mxscript(k+n):null!=window.console&&console.log("Unknown plugin:",m[h])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
+null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;m=!0;for(h=0;h<b.length&&m;h++)"/"!=b[h].charAt(0)&&b[h].substring(0,k.length)!=k&&(m=!1);if(m||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",[b.join("\n")]).replace(/\\n/g,
+"\n")))for(h=0;h<b.length;h++)try{mxscript(b[h])}catch(p){}}}"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();
+mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
+urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=
+null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
+("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
"1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";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";
@@ -7415,116 +7420,116 @@ 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.timeout=25E3;"1"!=urlParams.embed?App.prototype.menubarHeight=60:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};
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()}));
-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(){"undefined"!==
-typeof window.Trello?(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))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var e=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
+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 e=mxUtils.bind(this,function(){"undefined"!==
+typeof window.Trello?(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))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));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,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==
-window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,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))):null==window.DrawDropboxClientCallback&&
+window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,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))):null==window.DrawDropboxClientCallback&&
(window.DrawDropboxClientCallback=b)});b()}"1"!=urlParams.embed?(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):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.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-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 e=d.lastIndexOf("@"),b=d;0<=e&&(b=d.substring(e+1),d=this.crc32(d.substring(0,e))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(d)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
-a.getStatus()&&299>=a.getStatus()){var d=a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,b)}}}catch(m){}}))}};
-App.prototype.handleLicense=function(a,d){var e=document.getElementById("geFooter"),b=null;if(null!=e&&null!=a)if(b=a.expiry,null!=a.footer)e.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var g=new Date(Date.parse(b)),k=Math.round((g-Date.now())/864E5);if(90>k){var l="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(d);e.style.height="100%";e.style.margin="0px";e.style.display=
-"";0>k?(this.footerHeight=80,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+l+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[d,g.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-l+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[d,g.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)};
+App.prototype.checkLicense=function(){var a=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var d=e.lastIndexOf("@"),b=e;0<=d&&(b=e.substring(d+1),e=this.crc32(e.substring(0,d))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(e)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
+a.getStatus()&&299>=a.getStatus()){var d=a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,b)}}}catch(n){}}))}};
+App.prototype.handleLicense=function(a,e){var d=document.getElementById("geFooter"),b=null;if(null!=d&&null!=a)if(b=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var h=new Date(Date.parse(b)),k=Math.round((h-Date.now())/864E5);if(90>k){var m="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(e);d.style.height="100%";d.style.margin="0px";d.style.display=
+"";0>k?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+m+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[e,h.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+m+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[e,h.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
-App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var e=0;e<d.length;e++)d[e].id==a.id&&d.splice(e,1);null!=d&&(d.unshift(a),d=d.slice(0,5),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(d){}return null}};
-App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(d){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
-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.chromeless){if((a.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){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}};App.prototype.createCrcTable=function(){for(var a=[],d,e=0;256>e;e++){d=e;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[e]=d}return a};
-App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var d=-1,e=0;e<a.length;e++)d=d>>>8^this.crcTable[(d^a.charCodeAt(e))&255];return(d^-1)>>>0};
-App.prototype.getThumbnail=function(a,d){var e=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),g=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(a)}),a,this.thumbImageCache,"#ffffff",function(){d()},null,null,null,null,null,null,b),e=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),m=b.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),c=Math.floor(m.x),f=Math.floor(m.y);l.setAttribute("width",Math.ceil(p*(m.width+4)));l.setAttribute("height",Math.ceil(p*(m.height+4)));var h=l.getContext("2d");
-h.scale(p,p);h.translate(-c,-f);var t=b.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";h.save();h.fillStyle=t;h.fillRect(c,f,Math.ceil(m.width+4),Math.ceil(m.height+4));h.restore();var q=new mxJsCanvas(l),u=new mxAsyncCanvas(this.thumbImageCache);q.images=this.thumbImageCache.images;var w=new mxImageExport;w.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())};w.drawText=function(a,
-b){};w.drawState(b.getView().getState(b.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(b.getView().getState(b.model.root),q);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(l)}));e=!0}}catch(x){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return e};
+App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var d=0;d<e.length;d++)e[d].id==a.id&&e.splice(d,1);null!=e&&(e.unshift(a),e=e.slice(0,5),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(e){}return null}};
+App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
+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()){if((a.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&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,e=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=e&&(a=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],e,d=0;256>d;d++){e=d;for(var b=0;8>b;b++)e=e&1?3988292384^e>>>1:e>>>1;a[d]=e}return a};
+App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var e=-1,d=0;d<a.length;d++)e=e>>>8^this.crcTable[(e^a.charCodeAt(d))&255];return(e^-1)>>>0};
+App.prototype.getThumbnail=function(a,e){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),h=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:h.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
+function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null,null,null,null,null,b),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),n=b.getGraphBounds(),p=a/n.width,p=Math.min(1,Math.min(3*a/(4*n.height),p)),c=Math.floor(n.x),f=Math.floor(n.y);m.setAttribute("width",Math.ceil(p*(n.width+4)));m.setAttribute("height",Math.ceil(p*(n.height+4)));var g=m.getContext("2d");
+g.scale(p,p);g.translate(-c,-f);var u=b.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";g.save();g.fillStyle=u;g.fillRect(c,f,Math.ceil(n.width+4),Math.ceil(n.height+4));g.restore();var q=new mxJsCanvas(m),t=new mxAsyncCanvas(this.thumbImageCache);q.images=this.thumbImageCache.images;var x=new mxImageExport;x.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())};x.drawText=function(a,
+b){};x.drawState(b.getView().getState(b.model.root),t);t.finish(mxUtils.bind(this,function(){x.drawState(b.getView().getState(b.model.root),q);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(m)}));d=!0}}catch(w){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return d};
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);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
-(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,e){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(e)if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+d+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),d=null!=b?b.getMode():null,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="default"))}})();
-App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var d=this.getCurrentFile(),e=null!=d?d.getMode():null;e==App.MODE_GOOGLE?null!=d.desc&&0<d.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+d.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):e==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):e==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):e==App.MODE_TRELLO?this.openLink("https://trello.com/"):
-e==App.MODE_GITHUB&&(null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a};
-App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var d=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,d){this.spinner.stop();null==b&&(b=urlParams.title,d=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,d))}))}}catch(e){}};
-App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(d){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
+(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+e+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),e=null!=b?b.getMode():null,e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
+[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
+App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?this.openLink("https://trello.com/"):
+d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a};
+App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var e=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,e){this.spinner.stop();null==b&&(b=urlParams.title,e=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,e))}))}}catch(d){}};
+App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(e){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(a){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
-App.prototype.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("href","javascript:void(0);");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(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==b||this.loadFile(b,!0)}catch(m){null!=document.body&&this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
+mxResources.get("close"));a.innerHTML=mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==b||this.loadFile(b,!0)}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=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 d=urlParams.create;null!=d?a(b[decodeURIComponent(d)]):(d=urlParams.data,null!=d?a(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==
this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(c){}if(d)this.spinner.spin(document.body,mxResources.get("loading"));else if(d=this.getDiagramId(),"0"!=urlParams.splash||null!=d&&0!=d.length)this.loadFile(this.getDiagramId());else{var e=this.getDraft(),p=null!=e?e.data:this.getFileData(),d=Editor.useLocalStorage;this.createFile(this.defaultFilename,
-p,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=d&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
+p,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var e=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=e&&0<e.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
"title"]))}),b=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);var d=4>=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,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?b(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),e)}))}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.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?
-(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(g){this.handleError(g)}};
-App.prototype.showSplash=function(a){var d=this.getServiceCount(!0,!0),e=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>d||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==d?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();e()}),a);this.showDialog(b.container,3>a?260:300,4<=d?420:300,!0,!1);b.init()}else null==urlParams.create&&e()};
-App.prototype.addLanguageMenu=function(a,d){var e=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){e=document.createElement("div");e.setAttribute("title",mxResources.get("language"));e.className="geIcon geSprite geSprite-globe";e.style.position="absolute";e.style.cursor="pointer";e.style.bottom="20px";e.style.right="20px";if(d){e.style.direction="rtl";e.style.textAlign="right";e.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";mxUtils.write(b,mxResources.get("language"));e.appendChild(b)}mxEvent.addListener(e,"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(e);
-b.popup(d.x,d.y+e.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(e)}return e};
+null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?b(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(h){this.handleError(h,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.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?
+(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(h){this.handleError(h)}};
+App.prototype.showSplash=function(a){var e=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>e||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),a);this.showDialog(b.container,3>a?260:300,4<=e?420:300,!0,!1);b.init()}else null==urlParams.create&&d()};
+App.prototype.addLanguageMenu=function(a,e){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.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";mxUtils.write(b,mxResources.get("language"));d.appendChild(b)}mxEvent.addListener(d,"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 e=mxUtils.getOffset(d);
+b.popup(e.x,e.y+d.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(d)}return d};
App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style=
gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children=
gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell");
-App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(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||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var e=
-Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,g=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;g.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
+App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(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 e=this.getPeerForMode(a);if(null!=e)e.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d=
+Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,h=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;h.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&this.openFiles(k.files)}));k.click()}}};
-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_TRELLO){var d=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=d&&d.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(l){this.handleError(l,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(m){this.handleError(m,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||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var e=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,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=e;window.openFile=null})}else{var b=document.createElement("input");
+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_TRELLO){var e=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.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"))&&e.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,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||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=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,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}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=d;window.openFile=null})}else{var b=document.createElement("input");
b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files)for(var a=0;a<b.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(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(b.files[a])}));b.click()}};
-App.prototype.saveLibrary=function(a,d,e,b,g,k,l){b=null!=b?b:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var m=this.createLibraryDataFromImages(d),p=mxUtils.bind(this,function(a){this.spinner.stop();null!=l&&l();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==e&&b==App.MODE_DEVICE&&(e=new LocalLibrary(this,m,a));if(null==e)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,
-m,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,m,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,m,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,d)}),p)}),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"))){e.setData(m);var c=mxUtils.bind(this,
-function(){e.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(e,d);null!=l&&l()}),p)});if(a!=e.getTitle()){var f=e.getHash();e.rename(a,mxUtils.bind(this,function(a){e.constructor!=LocalLibrary&&f!=e.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(e.getHash()));this.removeLibrarySidebar(f);c()}),p)}else c()}};
-App.prototype.saveFile=function(a){var d=this.getCurrentFile();if(null!=d){var e=mxUtils.bind(this,function(){this.removeDraft();d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==d.getTitle()||null==this.mode){var b=null!=d.getTitle()?d.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var l=4>=a?2:6<a?4:3,b=new CreateDialog(this,
-b,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,e)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
-/(\.html)$/i.test(a)),null,b,e,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,e))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,l);this.showDialog(b.container,460,a>l?390:270,!0,!0);b.init()}else this.save(d.getTitle(),e)}};
-EditorUi.prototype.loadTemplate=function(a,d,e){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){d(a)}):!this.isOffline()&&(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&&"<mxGraphModel"==a.responseText.substring(0,13)&&d(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),d(b))}),e,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,d,e,b,g,k,l,m){b=m?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var p=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){p();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(l=null!=this.stateArg?this.stateArg.folderId:l,this.drive.insertFile(a,d,l,mxUtils.bind(this,
-function(a){p();this.fileCreated(a,e,k,g)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,l):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c):
-b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,l):b==App.MODE_BROWSER?(p(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,e,k,g)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(p(),this.fileCreated(new LocalFile(this,
-d,a,null==b),e,k,g))}};
-App.prototype.fileCreated=function(a,d,e,b){var g=window.location.pathname;null!=d&&0<d.length&&(g+="?libs="+d);g=this.getUrl(g);a.getMode()!=App.MODE_DEVICE&&(g+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+g,m=k,p=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(p=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(p.container),
-m=this.decodeNodeIntoGraph(m,p));a.setData(this.createFileData(k,p,a,l));null!=p&&p.container.parentNode.removeChild(p.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==e&&null!=f&&(e=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);e&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=d&&this.sidebar.showEntries(d)}),
-l=mxUtils.bind(this,function(){e||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==e||e?l():(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,l))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
+App.prototype.saveLibrary=function(a,e,d,b,h,k,m){b=null!=b?b:this.mode;h=null!=h?h:!1;k=null!=k?k:!1;var n=this.createLibraryDataFromImages(e),p=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&b==App.MODE_DEVICE&&(d=new LocalLibrary(this,n,a));if(null==d)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,
+n,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,n,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,e)}),p)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(h||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(n);var c=mxUtils.bind(this,
+function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=m&&m()}),p)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(f);c()}),p)}else c()}};
+App.prototype.saveFile=function(a){var e=this.getCurrentFile();if(null!=e){var d=mxUtils.bind(this,function(){this.removeDraft();e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==e.getTitle()||null==this.mode){var b=null!=e.getTitle()?e.getTitle():this.defaultFilename,h=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var m=4>=a?2:6<a?4:3,b=new CreateDialog(this,
+b,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
+/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,h,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,m);this.showDialog(b.container,460,a>m?390:270,!0,!0);b.init()}else this.save(e.getTitle(),d)}};
+EditorUi.prototype.loadTemplate=function(a,e,d){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){e(a)}):!this.isOffline()&&(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&&"<mxGraphModel"==a.responseText.substring(0,13)&&e(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),e(b))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
+App.prototype.createFile=function(a,e,d,b,h,k,m,n){b=n?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var p=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){p();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(m=null!=this.stateArg?this.stateArg.folderId:m,this.drive.insertFile(a,e,m,mxUtils.bind(this,
+function(a){p();this.fileCreated(a,d,k,h)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,h)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,h)}),c,!1,m):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,h)}),c):
+b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,h)}),c,!1,m):b==App.MODE_BROWSER?(p(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,k,h)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(p(),this.fileCreated(new LocalFile(this,
+e,a,null==b),d,k,h))}};
+App.prototype.fileCreated=function(a,e,d,b){var h=window.location.pathname;null!=e&&0<e.length&&(h+="?libs="+e);h=this.getUrl(h);a.getMode()!=App.MODE_DEVICE&&(h+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+h,n=k,p=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(p=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(p.container),
+n=this.decodeNodeIntoGraph(n,p));a.setData(this.createFileData(k,p,a,m));null!=p&&p.container.parentNode.removeChild(p.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=e&&this.sidebar.showEntries(e)}),
+m=mxUtils.bind(this,function(){d||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?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(h,null,m))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
function(){f()}),mxUtils.bind(this,function(a){c();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,d,e){this.hideDialog();var b=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)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"),
-mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}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!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),
-b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1));this.loadTemplate(g,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=g,h=g.lastIndexOf("."),k=e.lastIndexOf("/");h>k&&0<k&&(e=e.substring(k+1,h),h=g.substring(h),this.useCanvasForExport||
-".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(c=e+h)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+g.substring(31,g.lastIndexOf("&")),d),!0):!1}),!b()&&this.spinner.spin(document.body,
+App.prototype.loadFile=function(a,e,d){this.hideDialog();var b=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)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"),
+mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}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!=d)this.spinner.stop(),this.fileLoaded(d);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),
+b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var h=decodeURIComponent(a.substring(1));this.loadTemplate(h,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=h,g=h.lastIndexOf("."),k=d.lastIndexOf("/");g>k&&0<k&&(d=d.substring(k+1,g),g=h.substring(g),this.useCanvasForExport||
+".png"!=g||(g=".xml"),".svg"===g||".xml"===g||".html"===g||".png"===g)&&(c=d+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=h.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+h.substring(31,h.lastIndexOf("&")),e),!0):!1}),!b()&&this.spinner.spin(document.body,
mxResources.get("loading"))&&this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)?b=this.gitHub:"T"==a.charAt(0)&&(b=this.trello),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),
mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),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()}))})))}),g=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=g&&(window.location.hash=g.getHash())}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null==a||0==a.length?k():null!=g&&g.isModified()&&!d?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
-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(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),d=mxUtils.bind(this,function(d,b){var e=0,k=[],l=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=b&&b()}});if(null!=d)for(var m=0;m<d.length;m++){var p=encodeURIComponent(decodeURIComponent(d[m]));mxUtils.bind(this,
-function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var c=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[d]=a;e--;l()}),f=mxUtils.bind(this,function(){a(b);e--;l()});this.pendingLibraries[b]=!0;var g=b.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
-b&&(b=this.emptyLibraryXml);null!=b?c(new StorageLibrary(this,b,a)):f()}))}catch(y){f()}}),0);else if("U"==g){var m=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=m;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{c(new UrlLibrary(this,a.getText(),m))}catch(y){f()}else f()}),function(){f()})}catch(x){f()}}}else{var p=null;"G"==g?null!=
-this.drive&&null!=this.drive.user&&(p=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{c(a)}catch(y){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
-f())}}})(p,m)}l()});d(mxSettings.getCustomLibraries(),function(){d((urlParams.clibs||"").split(";"))})}};
+window.location.hash=a.getHash()}))})))}),h=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=h&&h.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=h&&(window.location.hash=h.getHash())}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null==a||0==a.length?k():null!=h&&h.isModified()&&!e?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
+App.prototype.getLibraryStorageHint=function(a){var e=a.getTitle();a.constructor!=LocalLibrary&&(e+="\n"+a.getHash());a.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?e+=" ("+
+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),e=mxUtils.bind(this,function(d,b){var e=0,k=[],m=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=b&&b()}});if(null!=d)for(var n=0;n<d.length;n++){var p=encodeURIComponent(decodeURIComponent(d[n]));mxUtils.bind(this,
+function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var c=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[d]=a;e--;m()}),f=mxUtils.bind(this,function(){a(b);e--;m()});this.pendingLibraries[b]=!0;var h=b.substring(0,1);if("L"==h)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
+b&&(b=this.emptyLibraryXml);null!=b?c(new StorageLibrary(this,b,a)):f()}))}catch(A){f()}}),0);else if("U"==h){var n=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=n;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{c(new UrlLibrary(this,a.getText(),n))}catch(A){f()}else f()}),function(){f()})}catch(w){f()}}}else{var p=null;"G"==h?null!=
+this.drive&&null!=this.drive.user&&(p=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{c(a)}catch(A){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
+f())}}})(p,n)}m()});e(mxSettings.getCustomLibraries(),function(){e((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
this.shareButton=null)}};
-App.prototype.save=function(a,d){var e=this.getCurrentFile(),b=mxResources.get("saving");null!=e&&e.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=e&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==e&&(e.isModified()?e.isAutosave()||e.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
-d&&d()}),g=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==e.getTitle()?e.save(!0,b,g):e.saveAs(a,b,g)}};
-App.prototype.pickFolder=function(a,d,e){e=null!=e?e:!0;var b=this.spinner.pause();e&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var e=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(e=a.docs[0].id);d(e)}})):e&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,d(a))})):e&&a==App.MODE_GITHUB&&
-null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):e&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,d,e,b,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,b?this.base64ToBlob(a,e):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,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),e,b,!1):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):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,k,b):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_BROWSER&&(e=mxUtils.bind(this,function(){localStorage.setItem(d,a)}),null==localStorage.getItem(d)?
-e():this.confirm(mxResources.get("replaceIt",[d]),e))};
-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"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
-""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var d=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),d,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
-App.prototype.showAuthDialog=function(a,d,e,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=e&&e(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,d,e,b,g,k){var l=d;/\.svg$/i.test(l)||(l=l.substring(0,d.lastIndexOf("."))+b);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if((/\.vsdx$/i.test(d)||/\.vsd$/i.test(d))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",a,!0);m||(p.responseType="blob");p.onload=mxUtils.bind(this,function(){var a=null;m?(a=JSON.parse(p.responseText),
-a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,l,!0))}),k,d)});p.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(d)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,l,!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,l,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,l,!0))}catch(h){null!=k&&k(h)}});e=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||null!=e&&"image/"==e.substring(0,6);m?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:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,e)}};
+App.prototype.save=function(a,e){var d=this.getCurrentFile(),b=mxResources.get("saving");null!=d&&d.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=d&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==d&&(d.isModified()?d.isAutosave()||d.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
+e&&e()}),h=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,b,h):d.saveAs(a,b,h)}};
+App.prototype.pickFolder=function(a,e,d){d=null!=d?d:!0;var b=this.spinner.pause();d&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var d=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(d=a.docs[0].id);e(d)}})):d&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,e(a))})):d&&a==App.MODE_GITHUB&&
+null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):d&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(a,e,d,b,h,k){h==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):h==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),d,b,!1):h==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):h==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,a)}),null==localStorage.getItem(e)?
+d():this.confirm(mxResources.get("replaceIt",[e]),d))};
+App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
+""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var e=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),e,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
+App.prototype.showAuthDialog=function(a,e,d,b){var h=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();h()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,e,d,b,h,k){var m=e;/\.svg$/i.test(m)||(m=m.substring(0,e.lastIndexOf("."))+b);var n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if((/\.vsdx$/i.test(e)||/\.vsd$/i.test(e))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",a,!0);n||(p.responseType="blob");p.onload=mxUtils.bind(this,function(){var a=null;n?(a=JSON.parse(p.responseText),
+a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){h(new LocalFile(this,a,m,!0))}),k,e)});p.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(e)?(temp=this.extractGraphModelFromPng(b),null!=temp?h(new LocalFile(this,temp,m,!0)):h(new LocalFile(this,b,e,!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?h(new LocalFile(this,a.responseText,m,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):h(new LocalFile(this,b,m,!0))}catch(g){null!=k&&k(g)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=h){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?
+"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,d)}};
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="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));
@@ -7532,10 +7537,10 @@ this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":
"javascript:void(0);");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&this.actions.get("rename").funct();mxEvent.consume(a)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("href","javascript:void(0);");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+
"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="5px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"26px":"10px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition=
-"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var d=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
-"')"});this.addListener("formatWidthChanged",d);d();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding=
-"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var e=this.hsplitPosition,b=!1;"dark"==uiTheme&&
-(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?e:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
+"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
+"')"});this.addListener("formatWidthChanged",e);e();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding=
+"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var d=this.hsplitPosition,b=!1;"dark"==uiTheme&&
+(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?d:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
"8px",this.fullscreenElement.style.top="8px");"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("href","javascript:void(0);"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",
this.toggleElement.style.top="5px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat","dark"==uiTheme&&(this.toggleElement.style.filter="invert(100%)"),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,
function(a){this.toggleCompactMode();mxEvent.consume(a)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};
@@ -7546,189 +7551,191 @@ App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive
"8pt",this.userElement.style.top="4px",this.userElement.style.right="30px",this.userElement.style.color="#666",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,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var d=document.createElement("div");d.className="geDialog";d.style.position="absolute";d.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";d.style.right="36px";d.style.padding="0px";this.userPanel=d}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var b=!1;this.userPanel.innerHTML="";d=document.createElement("img");d.setAttribute("src",
Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.className="geDialogClose";d.style.top="8px";d.style.right="8px";mxEvent.addListener(d,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(d);null!=this.drive&&(d=this.drive.getUser(),null!=d&&(b=!0,this.userPanel.innerHTML+='<table title="User ID: '+d.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+
-(null!=d.pictureUrl?'<img style="margin-right:10px;border-radius:50%;" src="'+d.pictureUrl+'"/>':'<img style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=d.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(d.displayName)+"</b><br><small>"+mxUtils.htmlEntities(d.email)+"</small></tr></table>",d=document.createElement("div"),d.style.textAlign="center",d.style.padding="12px",d.style.background="whiteSmoke",
-d.style.borderTop="1px solid #e0e0e0",d.style.whiteSpace="nowrap",d.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";
-this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(d)));d=mxUtils.bind(this,function(a,d,e){null!=a&&(b&&this.userPanel.appendChild(document.createElement("hr")),
-b=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=d?'<img style="margin-right:10px;" src="'+d+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font></td>":"")+"</tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background=
-"whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=e&&a.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(a))});null!=this.dropbox&&d(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()}));null!=this.oneDrive&&d(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",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()}));
-null!=this.gitHub&&d(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()}));null!=this.trello&&d(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()}));b||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));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!=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)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);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:12px;cursor:help;";
-var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var d=Menus.prototype.init;Menus.prototype.init=function(){d.apply(this,
-arguments);var a=this.editorUi,e=a.editor.graph,k=mxUtils.bind(e,e.isEnabled),l=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+(null!=d.pictureUrl?'<img style="margin-right:10px;border-radius:50%;" src="'+d.pictureUrl+'"/>':'<img style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=d.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(d.displayName)+"</b><br><small>"+mxUtils.htmlEntities(d.email)+"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",d=document.createElement("div"),d.style.textAlign="center",
+d.style.padding="12px",d.style.background="whiteSmoke",d.style.borderTop="1px solid #e0e0e0",d.style.whiteSpace="nowrap",d.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display=
+"none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(d)));d=
+mxUtils.bind(this,function(a,d,e,n){null!=a&&(b&&this.userPanel.appendChild(document.createElement("hr")),b=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=d?'<img style="margin-right:10px;" src="'+d+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=n?"<br><br><small>"+
+mxUtils.htmlEntities(n)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=e&&a.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(a))});null!=this.dropbox&&d(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&&d(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",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&&d(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.trello&&d(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||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));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!=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)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);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:12px;cursor:help;";
+var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this,
+arguments);var a=this.editorUi,d=a.editor.graph,k=mxUtils.bind(d,d.isEnabled),m=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
-"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&
-a.exportSvg(b/100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.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";b.appendChild(d);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),g=a.addCheckbox(b,
+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,m){b=parseInt(b);!isNaN(b)&&0<b&&
+a.exportSvg(b/100,c,d,e,f,g,h,!k,m)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,
mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,n,g,h,k,l){a.createHtml(b,c,d,e,f,n,g,h,k,l,mxUtils.bind(this,function(b,c){var d=
+!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,l,g,h,k,m){a.createHtml(b,c,d,e,f,l,g,h,k,m,mxUtils.bind(this,function(b,c){var d=
a.getBaseFilename(),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>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var d=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!e.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
-mxEvent.addListener(d,"change",function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!d.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){e.getSelectionCells();
-if(1==e.getSelectionCount()){var b=e.getSelectionCell(),c=e.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
+mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();
+if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+
-"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(D){a.handleError(D)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(z){a.handleError(z)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+
"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var f=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=
-!a.isMathEnabled();e.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&
-a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=e.getSelectionCells(),c=[],d=0;d<b.length;d++)e.getModel().isVertex(b[d])&&c.push(b[d]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
-a.actions.addAction("copyStyle",function(){var b=e.view.getState(e.getSelectionCell());if(e.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=e.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var d=b[c],f=d.indexOf("=");if(0<=f){var g=d.substring(0,f),d=d.substring(f+1);null==a.copiedStyle[g]&&"none"==d&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&
-null!=a.copiedStyle){e.getModel().beginUpdate();try{for(var b=e.getSelectionCells(),c=0;c<b.length;c++)for(var d=e.view.getState(b[c]),f=0;f<t.length;f++){var g=t[f],h=a.copiedStyle[g];d.style[g]!=h&&e.setCellStyles(g,h,[b[c]])}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
-320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
-function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
-null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){e.setShadowVisible(!e.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return e.shadowVisible});var q=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){q||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){q=!1}),q=!0)},null,null,"F1"));a.actions.addAction("userManual...",
+!a.isMathEnabled();d.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&
+a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var u="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
+a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
+null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<u.length;f++){var g=u[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,m)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
+function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
+null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return d.shadowVisible});var q=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){q||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){q=!1}),q=!0)},null,null,"F1"));a.actions.addAction("userManual...",
function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):
a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",
function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));f=a.actions.addAction("find...",mxUtils.bind(this,function(){null==
this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=
this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=
-d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
-c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var d=b.addItem("Search:",null,null,c,null,
-null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
-window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));d.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support",
-"-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);
+d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var t=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=t.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
+c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,
+null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
+null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);
+this.addMenuItems(b,["support","-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);
this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],
-c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=e.getGraphBounds(),b=e.view.translate,d=e.view.scale;e.insertVertex(c,null,"",a.x/d-b.x,a.y/d-b.y,a.width/d,a.height/d,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){e.isSelectionEmpty()||(mxLog.show(),
-mxLog.debug("sb.createVertexTemplateFromData('"+e.compress(mxUtils.getXml(e.encodeCells(e.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=e.getGraphBounds(),c=e.view.scale,d=mxUtils.createXmlDocument(),f=d.createElement("output");d.appendChild(f);d=new mxXmlCanvas2D(f);
-d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var g=0,h=d.save;d.save=function(){g++;h.apply(this,arguments)};var n=d.restore;d.restore=function(){g--;n.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(e.getView().getState(e.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],
+c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),
+mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);
+e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var l=0,g=e.save;e.save=function(){l++;g.apply(this,arguments)};var h=e.restore;e.restore=function(){l--;h.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,l);k.apply(this,arguments);mxLog.debug("leaving shape",a,l)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",l)})),this.addMenuItems(b,["testXmlImageExport"],
c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),
this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,
arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",
function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",
-function(){a.getCurrentFile();if(e.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",
-b,function(b,c,d,e,f,g,h,n,k,l){a.createHtml(b,c,d,e,f,g,h,n,k,l,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");
+function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",
+b,function(b,c,d,e,f,l,g,h,k,m){a.createHtml(b,c,d,e,f,l,g,h,k,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");
d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=
/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));
a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=
-e.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-e.view.translate.y)/e.view.scale)+2,function(b,c,d,e,f,g,h,n){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+n+';" src="'+a.createLink(b,c,d,e,f,g,k)+'"></iframe>');a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",
-new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
+d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,l,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+g+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,l,k)+'"></iframe>');a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",
+new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,l));a.showDialog(l.container,440,240,!0,!0);l.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});f=a.actions.addAction("search",
-function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){e.isEditing()&&e.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var d=a.createLoadMessage("save");
-d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,
+function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");
+e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,
"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,
["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,
-this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,d){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var d=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
-c){e.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=d;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=k(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
-(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,d){var f=e.view,g=e.getGraphBounds(),h=e.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*e.gridSize)),k=e.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*e.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=
-!0,n=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,n,l){f=g?Math.min(1,Math.min(a.maxImageSize/n,a.maxImageSize/l)):1;a.importFile(b,c,h,k,Math.round(n*f),Math.round(l*f),d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;n()}):n()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,
-d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),k=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");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},
-d)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
-d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=
-a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));
-return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&k.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=
-App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,
-function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,
-function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=
-this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var w="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),
-x=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,c,d){var f=e.isMouseInsertPoint()?e.getInsertPoint():e.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),d);a.vertex=!0;e.getModel().beginUpdate();try{a=e.addCell(a),e.fireEvent(new mxEventObject("cellsInserted",
-"cells",[a]))}finally{e.getModel().endUpdate()}e.container.focus();e.setSelectionCell(a);e.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&e.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
-y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
-"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<w.length;c++)"-"==w[c]?a.addSeparator(b):x(a,b,mxResources.get(w[c])+"...",w[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.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");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);
-b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,d){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
-"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&
-(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},
-d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",
-null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?
-b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=
-c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(D){a.handleError(D,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);
-mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,
-"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],
-c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],
-c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,
-["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",
-b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var e=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,d){if(480>=screen.width&&a==this.get("help")){d.style.paddingRight=
-"0px";d.style.paddingLeft="0px";d.innerHTML="";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);d.appendChild(b)}e.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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,d,e){this.ui=a;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,d,e){this.ui=a;this.oldIndex=d;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var 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,d){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d))}
-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,e=d.graph,b=d.graph.compress(e.zapGremlins(mxUtils.getXml(d.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState);
-d.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,d,e,b){SelectPage.call(this,a,e);this.relatedPage=d;this.index=b;this.previousIndex=null}
+this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,e){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
+c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=h(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
+(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");l(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var l=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),l=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),h=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=
+!0,k=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,k,m){f=g?Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/m)):1;a.importFile(b,c,l,h,Math.round(k*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;k()}):k()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,l,h,0,0,
+e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),h=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");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},e):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},e,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},e);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},e):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},e):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
+e,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},e):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);b.addSeparator(e);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},e);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},e);a.isOffline()||(b.addSeparator(e),b.addItem(mxResources.get("url")+"...",null,function(){var b=
+new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){l(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},e));a.showCsvImport&&b.addItem(mxResources.get("csv")+"...",
+null,function(){a.showImportCsvDialog()},e)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&"min"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
+c);"min"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",
+mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):
+null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&k.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?
+b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,
+function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,
+function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));
+a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||
+this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),w=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),
+c)},A=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+d.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",
+80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):
+w(a,b,mxResources.get(x[c])+"...",x[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.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");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,d){null!=a.drive?b.addItem(mxResources.get("googleDrive")+
+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?
+b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=
+a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},
+d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,
+null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));
+null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},
+d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(z){a.handleError(z,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),
+a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",
+new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=
+urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,
+["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();
+null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,
+["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&
+d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,e){if(480>=screen.width&&a==this.get("help")){e.style.paddingRight="0px";e.style.paddingLeft="0px";e.innerHTML="";var b=document.createElement("img");
+b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);e.appendChild(b)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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,e,d){this.ui=a;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,e,d){this.ui=a;this.oldIndex=e;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,e){this.ui=a;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e))}
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,e=this.ui.editor,d=e.graph,b=e.graph.compress(d.zapGremlins(mxUtils.getXml(e.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=d.getViewState();a.root=d.model.root;d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.rootChanged(a.root);d.setViewState(a.viewState);
+e.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.sizeDidChange();this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,e,d,b){SelectPage.call(this,a,d);this.relatedPage=e;this.index=b;this.previousIndex=null}
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;SelectPage.prototype.execute.apply(this,arguments)};
-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.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,d=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(a.view,arguments)});var e=!1,b=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var d=this.currentPage;null!=d&&d!=b&&(null==d.viewState||null==d.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&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+d.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+d.viewState.scrollTop),b=d);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===
-typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.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){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),e=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),g=a.getAttribute("pageHeight"),k=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):null;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.lightbox?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=g?new mxRectangle(0,0,parseFloat(b),parseFloat(g)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
-selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
+EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==a)return this.pages[e];return null};
+EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,e=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(a.view,arguments)});var d=!1,b=null,h=mxUtils.bind(this,function(){this.updateTabContainer();var e=this.currentPage;null!=e&&e!=b&&(null==e.viewState||null==e.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+e.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+e.viewState.scrollTop),b=e);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=
+!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.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){h();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var e=a.getAttribute("page"),d=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),h=a.getAttribute("pageHeight"),k=a.getAttribute("background"),m=a.getAttribute("backgroundImage"),m=null!=m&&0<m.length?JSON.parse(m):null;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!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=m?new mxImage(m.src,m.width,m.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=h?new mxRectangle(0,0,parseFloat(b),parseFloat(h)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
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}};
Graph.prototype.setViewState=function(a){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=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
a.pageFormat,this.view.scale=a.scale,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=
mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.background=this.defaultGraphBackground,this.backgroundImage=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize=
-this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var d=this.editor.extractGraphModel(a.node);if(null!=d){a.graphModelNode=d;a.viewState=this.editor.graph.createViewState(d);var e=new mxCodec(d.ownerDocument);a.root=e.decode(d).root}else a.root=this.editor.graph.model.createRoot()}return a};
-EditorUi.prototype.selectPage=function(a,d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();e.add(b);e.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))};
-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()){a=null!=a?a:this.createPage();d=null!=d?d:this.pages.length;var e=new ChangePage(this,a,a,d);this.editor.graph.model.execute(e)}return a};
-EditorUi.prototype.createPage=function(a){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(a[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=a[e]);return e};
-EditorUi.prototype.removePage=function(a){var d=this.editor.graph;if(d.isEnabled()){d.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;e=this.pages[b]}else e=this.insertPage(),d.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));d.model.execute(new ChangePage(this,a,e))}finally{d.model.endUpdate()}}return a};
-EditorUi.prototype.duplicatePage=function(a,d){var e=this.editor.graph,b=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=e.cloneCells([e.model.root])[0],b.viewState=e.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(d),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
-EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),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))};
+this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var e=this.editor.extractGraphModel(a.node);if(null!=e){a.graphModelNode=e;a.viewState=this.editor.graph.createViewState(e);var d=new mxCodec(e.ownerDocument);a.root=d.decode(e).root}else a.root=this.editor.graph.model.createRoot()}return a};
+EditorUi.prototype.selectPage=function(a,e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();d.add(b);d.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))};
+EditorUi.prototype.selectNextPage=function(a){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),a?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,e){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();e=null!=e?e:this.pages.length;var d=new ChangePage(this,a,a,e);this.editor.graph.model.execute(d)}return a};
+EditorUi.prototype.createPage=function(a){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(a[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=a[d]);return d};
+EditorUi.prototype.removePage=function(a){var e=this.editor.graph;if(e.isEnabled()){e.model.beginUpdate();try{var d=this.currentPage;if(d==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;d=this.pages[b]}else d=this.insertPage(),e.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1])));e.model.execute(new ChangePage(this,a,d))}finally{e.model.endUpdate()}}return a};
+EditorUi.prototype.duplicatePage=function(a,e){var d=this.editor.graph,b=null;d.isEnabled()&&(d.isEditing()&&d.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=d.cloneCells([d.model.root])[0],b.viewState=d.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(e),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
+EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return a};EditorUi.prototype.movePage=function(a,e){this.editor.graph.model.execute(new MovePage(this,a,e))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";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=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="12px";d.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,e){this.pages[b]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(e,
-"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));d.appendChild(e)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));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-e){null!=b&&(b.style.position="absolute",b.style.right="0px",d.style.marginRight="30px");var l=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");l.style.position="absolute";l.style.right=this.editor.chromeless?"29px":"55px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=this.createControlTab(4,
-"&nbsp;&#10095;");m.style.position="absolute";m.style.right=this.editor.chromeless?"0px":"29px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var p=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=p+"px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,p-20);mxUtils.setOpacity(l,0<d.scrollLeft?100:50);mxUtils.setOpacity(m,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(l,
-0<d.scrollLeft?100:50);mxUtils.setOpacity(m,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,p-20);mxUtils.setOpacity(l,0<d.scrollLeft?100:50);mxUtils.setOpacity(m,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(a){var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="8px 4px 8px 4px";d.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";d.style.borderBottomStyle="solid";d.style.backgroundColor=this.tabContainer.style.backgroundColor;
-d.style.cursor="default";d.style.color="gray";a&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(d.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return d};
-EditorUi.prototype.createControlTab=function(a,d){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="12px";e.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+d)/this.pages.length)+1),h=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),h=b):mxEvent.consume(c)}));mxEvent.addListener(d,
+"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=h&&b!=h&&this.movePage(h,b);a.stopPropagation();a.preventDefault()}));e.appendChild(d)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);
+b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=b&&(b.style.position="absolute",b.style.right="0px",e.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 n=this.createControlTab(4,
+"&nbsp;&#10095;");n.style.position="absolute";n.style.right=this.editor.chromeless?"0px":"29px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var p=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=p+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){e.scrollLeft-=Math.max(20,p-20);mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(n,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
+0<e.scrollLeft?100:50);mxUtils.setOpacity(n,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){e.scrollLeft+=Math.max(20,p-20);mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(n,e.scrollLeft<e.scrollWidth-e.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 e=document.createElement("div");e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="8px 4px 8px 4px";e.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";e.style.borderBottomStyle="solid";e.style.backgroundColor=this.tabContainer.style.backgroundColor;
+e.style.cursor="default";e.style.color="gray";a&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(e.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return e};
+EditorUi.prototype.createControlTab=function(a,e){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,
function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),g=mxEvent.getClientY(a);d.popup(b,g,null,a);this.setCurrentMenu(d);
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),e=mxEvent.getClientY(a);d.popup(b,e,null,a);this.setCurrentMenu(d);
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,e){e=this.createTab(e);var b=a.getName();e.setAttribute("title",b);mxUtils.write(e,b);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(a,e);42<d&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var e=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;e.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var l=new mxPopupMenu(this.createPageMenu(a));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);this.resetCurrentMenu();l.destroy()});var m=mxEvent.getClientX(k),p=mxEvent.getClientY(k);l.popup(m,p,null,k);this.setCurrentMenu(l,d)}mxEvent.consume(k)}}))};
-EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(e,b){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);e.addSeparator(b);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,b){b.setAttribute("page",e.page.getId());return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.page=a.ui.getPageById(e.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,b){b.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(b.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,b));return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(e.getAttribute("relatedPage"));if(null==b.relatedPage){var d=document.createElement("diagram");d.setAttribute("id",e.getAttribute("relatedPage"));
-d.setAttribute("name",e.getAttribute("name"));b.relatedPage=new DiagramPage(d);e=e.cloneNode(!0);d=e.firstChild;if(null!=d)for(b.relatedPage.root=a.decodeCell(d,!1),b=d.nextSibling,d.parentNode.removeChild(d),d=b;null!=d;){b=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=b}}return e};a.afterDecode=function(a,e,b){b.index=b.previousIndex;return b};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",d=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,b,e,m,p){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g],
-a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=d.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=b?b.style:u.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function m(a){a=u.view.getState(a);if(null!=a){var b=u.getIncomingEdges(a.cell);if(0<b.length&&(b=u.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 p(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),e=u.cloneCells([d[0],a]);u.model.setTerminal(e[0],u.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);u.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=u.view.getState(a),k=u.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=u.getOutgoingEdges(u.model.getTerminal(d[0],
-!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<n.length;q++){var t=u.model.getTerminal(n[q],!1);if(f==m(t)){var B=u.view.getState(t);t!=a&&null!=B&&(p&&b!=B.getCenterX()<h.getCenterX()||!p&&b!=B.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,B)&&(d=10+Math.max(d,(Math.min(l.x+l.width,B.x+B.width)-Math.max(l.x,B.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,B.y+B.height)-Math.max(l.y,B.y))/k))}}p?g=0:d=0;for(q=0;q<n.length;q++)if(t=u.model.getTerminal(n[q],
-!1),f==m(t)&&(B=u.view.getState(t),t!=a&&null!=B&&(p&&b!=B.getCenterX()<h.getCenterX()||!p&&b!=B.getCenterY()<h.getCenterY()))){var v=[];u.traverse(B.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});u.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(e,c)}finally{u.model.endUpdate()}}function c(a){u.model.beginUpdate();try{var b=m(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],a]);u.model.setTerminal(c[0],d[1],!1);u.model.setTerminal(d[0],d[1],!0);u.model.setTerminal(d[0],a,!1);
-var e=u.model.getParent(a),f=e.geometry,g=[];u.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);u.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);u.moveCells(g,h,k);return u.addCells(d,e)}finally{u.model.endUpdate()}}function f(a){u.model.beginUpdate();try{var b=
-u.model.getParent(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],a]);u.model.setTerminal(d[0],a,!0);var c=u.getOutgoingEdges(a),e=b.geometry,f=[];u.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=u.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=u.view.getBounds(f),l=m(a),n=u.view.translate,p=u.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function h(a,
-b,c){a=u.getOutgoingEdges(a);c=u.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=u.view.getState(u.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 t(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?q.actions.get("selectParent").funct():c==b?(d=u.getOutgoingEdges(a),null!=d&&0<d.length&&u.setSelectionCell(u.model.getTerminal(d[0],!1))):(c=u.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(u.model.getTerminal(c[0],!0),d,a),c=u.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&u.setSelectionCell(d[c].cell)))))}var q=this,u=q.editor.graph,w=u.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=q.menus.createPopupMenu;q.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==u.getSelectionCount()){c=u.getSelectionCell();var e=u.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(u.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(u.getSelectionCell())&&
-(a.addSeparator(),0<u.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};q.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),
-a=u.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=u.getOutgoingEdges(u.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);null!=a&&0<a.length&&u.setSelectionCell(u.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",
-function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),b=[];u.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});u.setSelectionCells(b)}},null,null,"Alt+Shift+T");var y=u.removeCells;u.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&d(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(u.traverse(g,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=u.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return y.apply(this,arguments)};q.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var n=u.duplicateCells;u.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=u.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=u.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
-a)}this.model.beginUpdate();try{var h=n.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=u.getIncomingEdges(h[e]),g=u.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,u.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var v=u.moveCells;u.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||u.model.isEdge(a[p])&&null==u.model.getTerminal(a[p],!0)){f=u.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var q=u.getIncomingEdges(a[0]);if(0<q.length){var t=u.view.getState(u.model.getTerminal(q[0],!0));if(null!=t){var w=u.view.getState(l);null!=w&&(c=(w.getCenterX()-t.getCenterX())/u.view.scale,d=(w.getCenterY()-t.getCenterY())/u.view.scale)}}}}k=v.apply(this,arguments);
-if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&&(q=u.getIncomingEdges(a[p]),0<q.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==u.getIncomingEdges(k[p]).length){m=l;if(null==m||m==u.model.getParent(a[p]))m=u.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,
-u.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=q.sidebar){var G=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=function(a,c,d,e){var f=u.model,g=null;f.beginUpdate();try{if(g=G.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=u.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:q.actions.get("selectChildren"),
-84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},z=q.onKeyDown;q.onKeyDown=function(a){try{if(u.isEnabled()&&!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingEdges(u.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(u.getSelectionCell()):f(u.getSelectionCell()):13==a.which&&(d=p(u.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],
-!1)):u.setSelectionCell(d[d.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=E[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(t(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(t(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(t(u.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(t(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var A=u.connectVertex;u.connectVertex=function(a,d,e,g,h,k){var l=u.getIncomingEdges(a);return b(a)&&0<l.length?(e=m(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):p(a,d!=mxConstants.DIRECTION_NORTH&&
-d!=mxConstants.DIRECTION_WEST)):A.call(this,a,d,e,g,h,k)};u.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&u.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+EditorUi.prototype.createTabForPage=function(a,e,d){d=this.createTab(d);var b=a.getName();d.setAttribute("title",b);mxUtils.write(d,b);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(a,d);42<e&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(a,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,h=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){b=null!=this.currentMenu;h=a==this.currentPage;d.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&h||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!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 n=mxEvent.getClientX(k),p=mxEvent.getClientY(k);m.popup(n,p,null,k);this.setCurrentMenu(m,e)}mxEvent.consume(k)}}))};
+EditorUi.prototype.createPageMenu=function(a,e){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,e)}),b);d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
+mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,b){b.setAttribute("page",d.page.getId());return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.page=a.ui.getPageById(d.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,b){b.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(b.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,b));return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(d.getAttribute("relatedPage"));if(null==b.relatedPage){var e=document.createElement("diagram");e.setAttribute("id",d.getAttribute("relatedPage"));
+e.setAttribute("name",d.getAttribute("name"));b.relatedPage=new DiagramPage(e);d=d.cloneNode(!0);e=d.firstChild;if(null!=e)for(b.relatedPage.root=a.decodeCell(e,!1),b=e.nextSibling,e.parentNode.removeChild(e),e=b;null!=e;){b=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==a.lookup(k)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=b}}return d};a.afterDecode=function(a,d,b){b.index=b.previousIndex;return b};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",e=Graph.prototype.foldCells;
+Graph.prototype.foldCells=function(a,b,d,n,p){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=d.slice(),f=[],g=0;g<d.length;g++){var h=this.view.getState(d[g]),k=null!=h?h.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(k,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[g],
+a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=c;d=e.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function n(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(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 p(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=t.view.getState(a),k=t.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=t.getOutgoingEdges(t.model.getTerminal(d[0],
+!0));if(null!=m){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,p=g=d=0;p<m.length;p++){var w=t.model.getTerminal(m[p],!1);if(f==n(w)){var u=t.view.getState(w);w!=a&&null!=u&&(q&&b!=u.getCenterX()<h.getCenterX()||!q&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/k))}}q?g=0:d=0;for(p=0;p<m.length;p++)if(w=t.model.getTerminal(m[p],
+!1),f==n(w)&&(u=t.view.getState(w),w!=a&&null!=u&&(q&&b!=u.getCenterX()<h.getCenterX()||!q&&b!=u.getCenterY()<h.getCenterY()))){var E=[];t.traverse(u.cell,!0,function(a,b){null!=b&&E.push(b);E.push(a);return!0});t.moveCells(E,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function c(a){t.model.beginUpdate();try{var b=n(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);
+var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);t.moveCells(g,h,k);return t.addCells(d,e)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b=
+t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=t.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=t.view.getBounds(f),l=n(a),m=t.view.translate,q=t.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/q-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/q-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/q-m.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function g(a,
+b,c){a=t.getOutgoingEdges(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 u(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?q.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(t.model.getTerminal(c[0],!0),d,a),c=t.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&t.setSelectionCell(d[c].cell)))))}var q=this,t=q.editor.graph,x=t.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=q.menus.createPopupMenu;q.menus.createPopupMenu=function(a,c,d){w.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&&
+(a.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};q.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(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");q.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),
+a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),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+S");q.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",
+function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+T");var A=t.removeCells;t.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&d(g)&&(e.push(g),g=x.getTerminal(g,!1));b(g)?(t.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return A.apply(this,arguments)};q.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var l=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var h=l.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=t.getIncomingEdges(h[e]),g=t.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var m=this.cloneCells([g[0]])[0];this.addEdge(m,t.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var v=t.moveCells;t.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),q=null!=m?m.style:this.getCellStyle(f);
+if(null!=a&&b(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var n=0;n<a.length;n++)if(b(a[n])||t.model.isEdge(a[n])&&null==t.model.getTerminal(a[n],!0)){f=t.model.getParent(a[n]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var p=t.getIncomingEdges(a[0]);if(0<p.length){var w=t.view.getState(t.model.getTerminal(p[0],!0));if(null!=w){var u=t.view.getState(l);null!=u&&(c=(u.getCenterX()-w.getCenterX())/t.view.scale,d=(u.getCenterY()-w.getCenterY())/t.view.scale)}}}}k=v.apply(this,arguments);
+if(null!=k&&null!=a&&k.length==a.length)for(n=0;n<k.length;n++)if(this.model.isEdge(k[n]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[n],!0))&&this.model.setTerminal(k[n],l,!0);else if(b(a[n])&&(p=t.getIncomingEdges(a[n]),0<p.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(p[0],!0))&&this.model.setTerminal(p[0],l,!0);else if(0==t.getIncomingEdges(k[n]).length){m=l;if(null==m||m==t.model.getParent(a[n]))m=t.model.getTerminal(p[0],!0);e=this.cloneCells([p[0]])[0];this.addEdge(e,
+t.getDefaultParent(),m,k[n])}}finally{this.model.endUpdate()}return k};if(null!=q.sidebar){var F=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=t.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:q.actions.get("selectChildren"),
+84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},y=q.onKeyDown;q.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&&b(t.getSelectionCell())&&1==t.getSelectionCount()){var d=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(t.getSelectionCell()):f(t.getSelectionCell()):13==a.which&&(d=p(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&t.model.isEdge(d[0])?t.setSelectionCell(t.model.getTerminal(d[0],
+!1)):t.setSelectionCell(d[d.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=D[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(t.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(L){console.log("error",L)}mxEvent.isConsumed(a)||y.apply(this,arguments)};var B=t.connectVertex;t.connectVertex=function(a,d,e,g,h,k){var l=t.getIncomingEdges(a);return b(a)&&0<l.length?(e=n(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):p(a,d!=mxConstants.DIRECTION_NORTH&&
+d!=mxConstants.DIRECTION_WEST)):B.call(this,a,d,e,g,h,k)};t.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&t.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var z=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){z.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",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.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;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 H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
+this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.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 G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;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;container=1;recursiveResize=0;treeFolding=1;");
b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.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);k.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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");u.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);u.insertEdge(w,!1);a.insert(c);a.insert(g);a.insert(q);a.insert(w);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var h=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");h.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);h.insertEdge(k,!1);var t=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");t.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+x.geometry.relative=!0;x.edge=!0;b.insertEdge(x,!0);t.insertEdge(x,!1);a.insert(c);a.insert(g);a.insert(k);a.insert(x);a.insert(b);a.insert(d);a.insert(e);a.insert(h);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap 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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=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 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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=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;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Organization",
@@ -7737,7 +7744,66 @@ b.insertEdge(c,!0);e.insertEdge(c,!1);var f=new mxCell("Division",new mxGeometry
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;container=1;recursiveResize=0;");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;container=1;recursiveResize=0;treeFolding=1;");
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;container=1;recursiveResize=0;treeFolding=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 d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=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="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><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="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></mxStylesheet>').documentElement;
+0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){a.editor.graph.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new h(a,mxResources.get("format"),Math.max(0,a.diagramContainer.clientWidth-a.formatWidth-12),56,a.formatWidth,546,function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.minimumSize=
+new mxRectangle(0,0,a.formatWidth,80),a.formatWindow.window.setVisible(!0),a.formatWindow.window.fit(),a.fireEvent(new mxEventObject("sidebar"))):(a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible()),a.formatWindow.window.isVisible()&&a.formatWindow.window.fit());var b=mxUtils.getOffset(a.container);a.formatWindow.window.div.style.top=Math.max(parseInt(a.formatWindow.window.div.style.top),b.y)+"px"}function e(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==
+a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,300);a.sidebarWindow=new h(a,mxResources.get("shapes"),10,56,c-6,Math.min(600,b.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;";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";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("1"!=urlParams.embed||"1"==urlParams.libraries)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.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",
+function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.sidebarWindow.window.fit();a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible()),a.sidebarWindow.window.isVisible()&&
+a.sidebarWindow.window.fit();b=mxUtils.getOffset(a.container);a.sidebarWindow.window.div.style.top=Math.max(parseInt(a.sidebarWindow.window.div.style.top),b.y)+"px"}var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: normal; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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:2px; 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 0 2px 0; 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); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}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:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { 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: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !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: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !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; }";
+document.getElementsByTagName("head")[0].appendChild(b)}catch(q){}var h=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};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="#ffffff"/>').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="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
+mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
+Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,36,'<path d="m 6 36 L 12 36 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleRight=Graph.createSvgImage(36,18,'<path d="m 1 6 L 24 6 L 24 1 L 36 9 L 24 18 L 24 12 L 1 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleDown=Graph.createSvgImage(18,36,'<path d="m 6 1 L 6 24 L 1 24 L 9 36 L 18 24 L 12 24 L 12 1 z" stroke="#fff" fill="#29b6f2"/>');
+HoverIcons.prototype.triangleLeft=Graph.createSvgImage(36,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
+Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);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.HIGHLIGHT_SIZE=5;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.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
+25;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var k=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){k.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):m.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){n.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};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="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
+b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";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="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var c=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,d){var e=this.editorUi.editor.graph;a.smartSeparators=!0;c.apply(this,arguments);
+mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==e.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,d),e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(a,e.isCellCollapsed(b)?["expand"]:["collapse"],null,d),this.addMenuItems(a,["lockUnlock","enterGroup"],null,d),a.addSeparator(),this.addSubmenu("layout",
+a)):e.isSelectionEmpty()&&e.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,d)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
+function(a){a=f.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="0px";a.appendChild(d);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
+e.style.position="relative";e.style.top="4px";d.appendChild(e)}return a};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);
+null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.actions.tagsWindow&&(this.actions.tagsWindow.window.setVisible(!1),this.actions.tagsWindow.window.destroy(),this.actions.tagsWindow=null);null!=this.actions.findWindow&&(this.actions.findWindow.window.setVisible(!1),this.actions.findWindow.window.destroy(),this.actions.findWindow=null);g.apply(this,arguments)};EditorUi.prototype.chromelessWindowResize=function(){};var u=EditorUi.prototype.init;
+EditorUi.prototype.init=function(){function b(a,b,c,d){var e=g.menus.get(a),f=B.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML="",mxUtils.setOpacity(f,d||40)):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function c(a,b,c,d,e,f){var g=document.createElement("a");g.setAttribute("href","javascript:void(0)");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";y.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,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b();mxEvent.consume(a)});
+null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.setOpacity(g,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),mxUtils.setOpacity(g,null!=f?40:100),g.style.cursor=""):(g.setAttribute("disabled","disabled"),mxUtils.setOpacity(g,null!=f?10:50),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign=
+"top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));y.appendChild(b);return b}u.apply(this,arguments);var g=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);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);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=
+mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
+g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){e(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){a(g)}));var m=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
+g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b,mxResources.get("open")),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,
+["-","close"])})));if(isLocalStorage){var k=g.menus.get("openFrom"),n=k.funct;k.funct=function(a,b){n.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,
+["-","revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"exportPng exportJpg exportSvg - exportPdf exportVsdx - exportHtml exportXml exportUrl -".split(" "),b);g.menus.addSubmenu("embed",a,b);g.menus.addSubmenu("publish",a,b)})));g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&
+g.menus.addSubmenu("theme",a,b);g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),
+b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var p="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
+g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<p.length;c++)"-"==p[c]?a.addSeparator(b):m(a,b,mxResources.get(p[c])+"...",p[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
+"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var y=document.createElement("div");y.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var B=new Menubar(g,y);(k=900>d)||b("diagram");f([k?b("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,c(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
+null,mxResources.get("shapes"),g.actions.get("image"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),c(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var z=b("insert",!0,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([z,c(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=d){var C=g.actions.get("undo"),k=g.actions.get("redo"),C=c("",C.funct,null,mxResources.get("undo")+" ("+C.shortcut+")",C,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),k=c("",k.funct,
+null,mxResources.get("redo")+" ("+k.shortcut+")",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([C,k]);560<=d&&f([c("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
+c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=d?c("",g.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=d?c("",g.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));g.setStatusText(g.editor.getStatus());y.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText=
+"position:absolute;right:40px;top:12px;white-space:nowrap;";y.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;480<=d&&(k=g.menus.get("language"),null!=k&&(z=B.addMenu("",k.funct),z.setAttribute("title",mxResources.get("language")),z.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundSize="24px 24px",z.style.position="absolute",z.style.height="24px",z.style.width="24px",z.style.zIndex="1",z.style.top="11px",z.style.right="14px",mxUtils.setOpacity(z,30),y.appendChild(z)));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+k=g.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";var G=g.menus.get("viewZoom");if(null!=G){this.tabContainer.style.right="70px";z=B.addMenu("100%",G.funct);z.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");z.style.whiteSpace="nowrap";z.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+z.style.backgroundPosition="right 6px center";z.style.backgroundRepeat="no-repeat";z.style.paddingRight="10px";z.style.display="block";z.style.position="absolute";z.style.textDecoration="none";z.style.textDecoration="none";z.style.right="0px";z.style.bottom="0px";z.style.overflow="hidden";z.style.textAlign="center";z.style.color="#000";z.style.fontSize="12px";z.style.color="#707070";z.style.width="59px";z.style.borderTop="1px solid lightgray";z.style.borderLeft="1px solid lightgray";z.style.height=
+parseInt(g.tabContainer.style.height)-1+"px";z.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";C.appendChild(z);G=mxUtils.bind(this,function(){z.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,G);g.editor.addListener("resetGraphView",G);g.editor.addListener("pageSelected",G);var E=g.setGraphEnabled;g.setGraphEnabled=function(){E.apply(this,arguments);null!=this.tabContainer&&(z.style.visibility=this.tabContainer.style.visibility)}}C.appendChild(g.tabContainer);
+C.appendChild(y);C.appendChild(g.diagramContainer);k.appendChild(C);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.outlineWindow.fit();null!=g.actions.layersWindow&&g.outlineWindow.fit();null!=g.actions.tagsWindow&&g.tagsWindow.window.fit();null!=g.actions.findWindow&&g.findWindow.window.fit()})}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=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="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><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="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></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="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(){function c(a){var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!=a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas&&null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value);if(null!=b){if(null!=b.t)return b.t=b.t.replace(/</g,"&lt;"),b.t=b.t.replace(/>/g,"&gt;"),b.t;if(null!=b.Value&&
null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"&lt;"),b.Value.t=b.Value.t.replace(/>/g,"&gt;"),b.Value.t}return""}function u(a){return null!=a.Action?a.Action:a}function q(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else if(null!=a.m)return a.m;return null}function l(c){return h(c)+f(c)+b(c)+a(c)+d(c)+g(c)+n(c)+D(c)+C(c)+y(c)}function h(a){a=
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index b6933775..adf2cf0f 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -12,8 +12,8 @@
*/
App = function(editor, container, lightbox)
{
- EditorUi.call(this, editor, container, (lightbox != null) ? lightbox : urlParams['lightbox'] == '1');
-
+ EditorUi.call(this, editor, container, (lightbox != null) ? lightbox : (urlParams['lightbox'] == '1' || uiTheme == 'min'));
+
// Pre-fetches images
if (mxClient.IS_SVG)
{
@@ -572,7 +572,7 @@ App.main = function(callback, createUi)
}
// Main
- var ui = (createUi != null) ? createUi() : new App(new Editor(urlParams['chrome'] == '0'));
+ var ui = (createUi != null) ? createUi() : new App(new Editor(urlParams['chrome'] == '0' || uiTheme == 'min', null, null, null, urlParams['chrome'] != '0'));
if (window.mxscript != null)
{
@@ -1177,7 +1177,7 @@ App.prototype.getEditBlankXml = function()
{
var file = this.getCurrentFile();
- if (file != null && this.editor.chromeless && this.editor.graph.lightbox && file.realtime == null)
+ if (file != null && this.editor.isChromelessView() && this.editor.graph.isLightboxView() && file.realtime == null)
{
return file.getData();
}
@@ -1348,7 +1348,7 @@ App.prototype.onBeforeUnload = function()
// KNOWN: Message is ignored by most browsers
if (file.constructor == LocalFile && file.getHash() == '' && !file.isModified() &&
urlParams['nowarn'] != '1' && !this.isDiagramEmpty() && urlParams['url'] == null &&
- !this.editor.chromeless)
+ !this.editor.isChromelessView())
{
return mxResources.get('ensureDataSaved');
}
@@ -1373,7 +1373,7 @@ App.prototype.onBeforeUnload = function()
*/
App.prototype.updateDocumentTitle = function()
{
- if (!this.editor.graph.lightbox)
+ if (!this.editor.graph.isLightboxView())
{
var title = this.editor.appName;
var file = this.getCurrentFile();
@@ -2361,7 +2361,7 @@ App.prototype.showSplash = function(force)
}), true);
});
- if (this.editor.chromeless)
+ if (this.editor.isChromelessView())
{
this.handleError({message: mxResources.get('noFileSelected')},
mxResources.get('errorLoadingFile'), mxUtils.bind(this, function()
@@ -4844,7 +4844,8 @@ App.prototype.updateUserElement = function()
'</td><td valign="top" style="white-space:nowrap;' +
((driveUser.pictureUrl != null) ? 'padding-top:14px;' : '') +
'"><b>' + mxUtils.htmlEntities(driveUser.displayName) + '</b><br>' +
- '<small>' + mxUtils.htmlEntities(driveUser.email) + '</small></tr></table>';
+ '<small>' + mxUtils.htmlEntities(driveUser.email) + '</small><br><br>' +
+ '<small>' + mxResources.get('googleDrive') + '</small></tr></table>';
var div = document.createElement('div');
div.style.textAlign = 'center';
div.style.padding = '12px';
@@ -4903,7 +4904,7 @@ App.prototype.updateUserElement = function()
}
}
- var addUser = mxUtils.bind(this, function(user, logo, logout)
+ var addUser = mxUtils.bind(this, function(user, logo, logout, label)
{
if (user != null)
{
@@ -4916,8 +4917,9 @@ App.prototype.updateUserElement = function()
this.userPanel.innerHTML += '<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">' +
((logo != null) ? '<img style="margin-right:10px;" src="' + logo + '" width="40" height="40"/></td>' : '') +
'<td valign="middle" style="white-space:nowrap;"><b>' + mxUtils.htmlEntities(user.displayName) + '</b>' +
- ((user.email != null) ? '<br><font color="gray">' + mxUtils.htmlEntities(user.email) + '</font></td>' : '') +
- '</tr></table>';
+ ((user.email != null) ? '<br><font color="gray">' + mxUtils.htmlEntities(user.email) + '</font>' : '') +
+ ((label != null) ? '<br><br><small>' + mxUtils.htmlEntities(label) + '</small>' : '') +
+ '</td></tr></table>';
var div = document.createElement('div');
div.style.textAlign = 'center';
div.style.padding = '12px';
@@ -4962,7 +4964,7 @@ App.prototype.updateUserElement = function()
{
this.dropbox.logout();
}
- }));
+ }), mxResources.get('dropbox'));
}
if (this.oneDrive != null)
@@ -4993,7 +4995,7 @@ App.prototype.updateUserElement = function()
{
this.oneDrive.logout();
}
- }));
+ }), mxResources.get('oneDrive'));
}
if (this.gitHub != null)
@@ -5024,7 +5026,7 @@ App.prototype.updateUserElement = function()
{
this.gitHub.logout();
}
- }));
+ }), mxResources.get('github'));
}
//TODO We have no user info from Trello, how we can create a user?
@@ -5056,7 +5058,7 @@ App.prototype.updateUserElement = function()
{
this.trello.logout();
}
- }));
+ }), mxResources.get('trello'));
}
if (!connected)
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index 74f0cb77..d668719c 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -106,6 +106,7 @@ mxscript(drawDevUrl + 'js/diagramly/App.js');
mxscript(drawDevUrl + 'js/diagramly/Menus.js');
mxscript(drawDevUrl + 'js/diagramly/Pages.js');
mxscript(drawDevUrl + 'js/diagramly/Trees.js');
+mxscript(drawDevUrl + 'js/diagramly/Minimal.js');
mxscript(drawDevUrl + 'js/diagramly/DevTools.js');
// Vsdx/vssx support
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index acc3213e..de58c167 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -7613,7 +7613,9 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
rem.setAttribute('title', mxResources.get('delete'));
rem.setAttribute('align', 'top');
rem.style.paddingTop = '4px';
- rem.style.marginLeft = '-22px';
+ rem.style.position = 'absolute';
+ rem.style.marginLeft = '-12px';
+ rem.style.zIndex = '1';
rem.style.cursor = 'pointer';
// Blocks dragging of remove icon
@@ -7622,12 +7624,6 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
mxEvent.consume(evt);
});
- // Seems to bring remove icon on top of graph
- if (data == null && img != null)
- {
- rem.style.position = 'relative';
- }
-
(function(wrapperDiv, dataParam, imgParam)
{
mxEvent.addListener(rem, 'click', function(evt)
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 43e820f6..965d8bf5 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -248,7 +248,7 @@ DrawioFile.prototype.getId = function()
*/
DrawioFile.prototype.isEditable = function()
{
- return !this.ui.editor.chromeless || this.ui.editor.editable;
+ return !this.ui.editor.isChromelessView() || this.ui.editor.editable;
};
/**
diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js
index 790cf8da..b0216840 100644
--- a/src/main/webapp/js/diagramly/DriveClient.js
+++ b/src/main/webapp/js/diagramly/DriveClient.js
@@ -11,7 +11,7 @@ DriveClient = function(editorUi)
*/
this.ui = editorUi;
- if (this.ui.editor.chromeless && urlParams['rt'] != '1')
+ if (this.ui.editor.isChromelessView() && urlParams['rt'] != '1')
{
// Workaround for Google Drive requiring the user to click on the file in the
// drive UI when not using this scope (user other scope with rt=1 URL param)
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 7ef91868..c42d4cfe 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -740,8 +740,9 @@
DiagramFormatPanel.prototype.addView = function(div)
{
var div = diagramFormatPanelAddView.apply(this, arguments);
+ var file = this.editorUi.getCurrentFile();
- if (mxClient.IS_SVG)
+ if (mxClient.IS_SVG && (urlParams['embed'] == '1' || (file != null && file.isEditable())))
{
var ui = this.editorUi;
var editor = ui.editor;
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 11812089..92967b8e 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -118,6 +118,16 @@
EditorUi.prototype.formatEnabled = urlParams['format'] != '0';
/**
+ * Restores app defaults for UI
+ */
+ EditorUi.prototype.closableScratchpad = true;
+
+ /**
+ * Specifies if PDF export with pages is enabled.
+ */
+ EditorUi.prototype.showCsvImport = true;
+
+ /**
* Capability check for canvas export
*/
(function()
@@ -1264,6 +1274,7 @@
// File might have been loaded halfway
this.editor.graph.model.clear();
this.editor.undoManager.clear();
+ this.setBackgroundImage(null);
// Avoids empty hash with no value
if (window.location.hash != null && window.location.hash.length > 0)
@@ -1314,7 +1325,7 @@
}
}
- if (!this.editor.chromeless || this.editor.editable)
+ if (!this.editor.isChromelessView() || this.editor.editable)
{
this.editor.graph.selectUnlockedLayer();
this.showLayersDialog();
@@ -1326,7 +1337,7 @@
window.focus();
}
}
- else if (this.editor.graph.lightbox)
+ else if (this.editor.graph.isLightboxView())
{
this.lightboxFit();
}
@@ -1775,7 +1786,8 @@
var buttons = document.createElement('div');
buttons.style.position = 'absolute';
buttons.style.right = '0px';
- buttons.style.top = '5px';
+ buttons.style.top = '0px';
+ buttons.style.padding = '8px'
// Workaround for CSS error in IE8 (standards and quirks)
if (!mxClient.IS_QUIRKS && document.documentMode != 8)
@@ -1789,38 +1801,40 @@
var btn = document.createElement('img');
btn.setAttribute('src', Dialog.prototype.closeImage);
btn.setAttribute('title', mxResources.get('close'));
- btn.setAttribute('align', 'top');
+ btn.setAttribute('valign', 'absmiddle');
btn.setAttribute('border', '0');
- btn.className = 'geButton';
- btn.style.marginRight = '1px';
- btn.style.marginTop = '-1px';
- buttons.appendChild(btn);
+ btn.style.margin = '0 3px';
var saveBtn = null;
- mxEvent.addListener(btn, 'click', mxUtils.bind(this, function(evt)
- {
- // Workaround for close after any button click in IE8/quirks
- if (!mxEvent.isConsumed(evt))
+ if (file.title != '.scratchpad' || this.closableScratchpad)
+ {
+ buttons.appendChild(btn);
+
+ mxEvent.addListener(btn, 'click', mxUtils.bind(this, function(evt)
{
- var fn = mxUtils.bind(this, function()
- {
- this.closeLibrary(file);
- });
-
- if (saveBtn != null)
- {
- this.confirm(mxResources.get('allChangesLost'), null, fn,
- mxResources.get('cancel'), mxResources.get('discardChanges'));
- }
- else
+ // Workaround for close after any button click in IE8/quirks
+ if (!mxEvent.isConsumed(evt))
{
- fn();
+ var fn = mxUtils.bind(this, function()
+ {
+ this.closeLibrary(file);
+ });
+
+ if (saveBtn != null)
+ {
+ this.confirm(mxResources.get('allChangesLost'), null, fn,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ else
+ {
+ fn();
+ }
+
+ mxEvent.consume(evt);
}
-
- mxEvent.consume(evt);
- }
- }));
+ }));
+ }
if (file.isEditable())
{
@@ -2237,8 +2251,7 @@
{
var link = document.createElement('span');
link.setAttribute('title', mxResources.get('help'));
- link.style.cssText = 'color:gray;text-decoration:none;';
- link.className = 'geButton';
+ link.style.cssText = 'color:#a3a3a3;text-decoration:none;margin-right:2px;';
mxUtils.write(link, '?');
mxEvent.addGestureListeners(link, mxUtils.bind(this, function(evt)
@@ -2309,28 +2322,28 @@
EditorUi.initTheme = function()
{
- if (uiTheme == 'atlas')
- {
- mxClient.link('stylesheet', STYLE_PATH + '/atlas.css');
-
- if (typeof Toolbar !== 'undefined')
- {
- Toolbar.prototype.unselectedBackground = (mxClient.IS_QUIRKS) ? 'none' : '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;
- EditorUi.prototype.hsplitPosition = 188;
- Sidebar.prototype.thumbWidth = 46;
- Sidebar.prototype.thumbHeight = 46;
- Sidebar.prototype.thumbPadding = (document.documentMode >= 5) ? 0 : 1;
- Sidebar.prototype.thumbBorder = 2;
- }
- else if (uiTheme == 'dark')
- {
- mxClient.link('stylesheet', STYLE_PATH + '/dark.css');
+ if (uiTheme == 'atlas')
+ {
+ mxClient.link('stylesheet', STYLE_PATH + '/atlas.css');
+
+ if (typeof Toolbar !== 'undefined')
+ {
+ Toolbar.prototype.unselectedBackground = (mxClient.IS_QUIRKS) ? 'none' : '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;
+ EditorUi.prototype.hsplitPosition = 188;
+ Sidebar.prototype.thumbWidth = 46;
+ Sidebar.prototype.thumbHeight = 46;
+ Sidebar.prototype.thumbPadding = (document.documentMode >= 5) ? 0 : 1;
+ Sidebar.prototype.thumbBorder = 2;
+ }
+ else if (uiTheme == 'dark')
+ {
+ mxClient.link('stylesheet', STYLE_PATH + '/dark.css');
Dialog.backdropColor = '#2a2a2a';
Graph.prototype.defaultThemeName = 'darkTheme';
@@ -2352,7 +2365,7 @@
Editor.helpImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=';
Editor.checkmarkImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==';
}
- }
+ }
};
EditorUi.initTheme();
@@ -8420,11 +8433,11 @@
{
this.setFileData(xml);
- if (!this.editor.chromeless)
+ if (!this.editor.isChromelessView())
{
this.showLayersDialog();
}
- else if (this.editor.graph.lightbox)
+ else if (this.editor.graph.isLightboxView())
{
this.lightboxFit();
}
@@ -8992,7 +9005,7 @@
this.buttonContainer.style.paddingRight = '12px';
this.buttonContainer.style.paddingTop = '12px';
}
- else
+ else if (uiTheme != 'min')
{
this.buttonContainer.style.paddingRight = '38px';
this.buttonContainer.style.paddingTop = '6px';
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index 5a90687b..6598b986 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -259,8 +259,14 @@ if (urlParams['offline'] == '1' || urlParams['local'] == '1')
urlParams['math'] = '0';
}
-// Lightbox enabled chromeless mode
+// Lightbox enables chromeless mode
if (urlParams['lightbox'] == '1')
{
urlParams['chrome'] = '0';
}
+
+// Minimal UI disables chromeless toolbar
+if (uiTheme == 'min')
+{
+ urlParams['toolbar'] = '0';
+}
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 8f04543f..39fe02d0 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -798,7 +798,7 @@
{
if (!mxClient.IS_CHROMEAPP && editorUi.isOffline())
{
- this.addMenuItems(menu, ['about']);
+ this.addMenuItems(menu, ['about'], parent);
}
else
{
@@ -822,10 +822,13 @@
encodeURIComponent(term));
this.editorUi.logEvent({category: 'Help', action: 'search', label: term});
- window.setTimeout(mxUtils.bind(this, function()
+ if (this.editorUi.menubar != null)
{
- this.editorUi.menubar.hideMenu();
- }), 0);
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ this.editorUi.menubar.hideMenu();
+ }), 0);
+ }
}
}));
@@ -852,14 +855,14 @@
input.focus();
}, 0);
- this.addMenuItems(menu, ['-', 'quickStart', 'userManual', 'keyboardShortcuts', '-']);
+ this.addMenuItems(menu, ['-', 'quickStart', 'userManual', 'keyboardShortcuts', '-'], parent);
if (!mxClient.IS_CHROMEAPP)
{
- this.addMenuItems(menu, ['feedback']);
+ this.addMenuItems(menu, ['feedback'], parent);
}
- this.addMenuItems(menu, ['support', '-', 'about']);
+ this.addMenuItems(menu, ['support', '-', 'about'], parent);
}
if (urlParams['ruler'] == '1')
@@ -1732,11 +1735,14 @@
dlg.init();
}, parent);
}
-
- menu.addItem(mxResources.get('csv') + '...', null, function()
+
+ if (editorUi.showCsvImport)
{
- editorUi.showImportCsvDialog();
- }, parent);
+ menu.addItem(mxResources.get('csv') + '...', null, function()
+ {
+ editorUi.showImportCsvDialog();
+ }, parent);
+ }
})).isEnabled = isGraphEnabled;
this.put('theme', new Menu(mxUtils.bind(this, function(menu, parent)
@@ -1748,7 +1754,19 @@
editorUi.alert(mxResources.get('restartForChangeRequired'));
}, parent);
- if (uiTheme != 'atlas' && uiTheme != 'dark')
+ if (uiTheme != 'atlas' && uiTheme != 'dark' && uiTheme != 'min')
+ {
+ menu.addCheckmark(item, Editor.checkmarkImage);
+ }
+
+ item = menu.addItem(mxResources.get('minimal'), null, function()
+ {
+ mxSettings.setUi('min');
+ mxSettings.save();
+ editorUi.alert(mxResources.get('restartForChangeRequired'));
+ }, parent);
+
+ if (uiTheme == 'min')
{
menu.addCheckmark(item, Editor.checkmarkImage);
}
@@ -2006,19 +2024,24 @@
graph.getModel().endUpdate();
}
- graph.container.focus();
- graph.setSelectionCell(cell);
graph.scrollCellToVisible(cell);
-
- return cell;
+ graph.setSelectionCell(cell);
+ graph.container.focus();
+
+ if (graph.editAfterInsert)
+ {
+ graph.startEditing(cell);
+ }
+
+ return cell;
};
editorUi.actions.addAction('insertText', function()
{
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
- graph.startEditingAtCell(insertVertex('Text', 40, 20, 'text;html=1;resizable=0;autosize=1;' +
- 'align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;'));
+ graph.startEditingAtCell(insertVertex('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 = isGraphEnabled;
@@ -2026,7 +2049,7 @@
{
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
- insertVertex('', 120, 60, 'whiteSpace=wrap;html=1;');
+ insertVertex('', 120, 60, 'whiteSpace=wrap;html=1;');
}
}, null, null, Editor.ctrlKey + '+K').isEnabled = isGraphEnabled;
@@ -2034,7 +2057,7 @@
{
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
- insertVertex('', 80, 80, 'ellipse;whiteSpace=wrap;html=1;');
+ insertVertex('', 80, 80, 'ellipse;whiteSpace=wrap;html=1;');
}
}, null, null, Editor.ctrlKey + '+Shift+K').isEnabled = isGraphEnabled;
@@ -2042,7 +2065,7 @@
{
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
- insertVertex('', 80, 80, 'rhombus;whiteSpace=wrap;html=1;');
+ insertVertex('', 80, 80, 'rhombus;whiteSpace=wrap;html=1;');
}
}).isEnabled = isGraphEnabled;
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
new file mode 100644
index 00000000..0bcb98dd
--- /dev/null
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -0,0 +1,1287 @@
+/**
+ * Code for the minimal UI theme.
+ */
+EditorUi.initMinimalTheme = function()
+{
+ var iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+
+ try
+ {
+ var style = document.createElement('style')
+ style.type = 'text/css';
+ style.innerHTML = '* { -webkit-font-smoothing: antialiased; }' +
+ 'html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}' +
+ 'html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }' +
+ '.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }' +
+ 'div.geDialog { border-radius: 5px; }' +
+ 'html body div.geDialog button.geBigButton { color: #fff !important; }' +
+ '.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }' +
+ '.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }' +
+ 'html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }' +
+ 'div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: normal; background: none; }' +
+ 'div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }' +
+ '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:2px; 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 0 2px 0; box-sizing: border-box; }' +
+ // Make geItem look like a button
+ '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); }' +
+ 'a.geMenuItem:active { opacity: 0.4; }' +
+ // Styling for Minimal
+ '.geToolbarContainer { background:#fff !important; }' +
+ 'div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }' +
+ 'div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }' +
+ 'div.geSidebar { background-color: #fff !important;}' +
+ '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:#fff !important; }' +
+ 'div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}' +
+ 'div.mxWindow * { font-family: inherit !important; }' +
+ // Minimal Style UI
+ '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: rgb(249, 249, 249) !important; color:lightgray !important; } ' +
+ 'html div.geActivePage { background: white !important;color: #353535 !important; } ' +
+ 'html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !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: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }' +
+ 'html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }' +
+ 'html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !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; }';
+ document.getElementsByTagName('head')[0].appendChild(style);
+ }
+ catch (e)
+ {
+ // ignore
+ }
+
+ /**
+ *
+ */
+ var WrapperWindow = function(editorUi, title, x, y, w, h, fn)
+ {
+ var graph = editorUi.editor.graph;
+
+ var div = document.createElement('div');
+ div.className = 'geSidebarContainer';
+ div.style.position = 'absolute';
+ div.style.width = '100%';
+ div.style.height = '100%';
+ div.style.border = '1px solid whiteSmoke';
+ div.style.overflowX = 'hidden';
+ div.style.overflowY = 'auto';
+
+ fn(div);
+
+ this.window = new mxWindow(title, div, x, y, w, h, true, true);
+ this.window.destroyOnClose = false;
+ this.window.setMaximizable(false);
+ this.window.setResizable(true);
+ this.window.setClosable(true);
+ this.window.setVisible(true);
+
+ this.window.setLocation = function(x, y)
+ {
+ var iiw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ var ih = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+
+ x = Math.max(0, Math.min(x, iiw - this.table.clientWidth));
+ y = Math.max(0, Math.min(y, ih - this.table.clientHeight - 48));
+
+ if (this.getX() != x || this.getY() != y)
+ {
+ mxWindow.prototype.setLocation.apply(this, arguments);
+ }
+ };
+ };
+
+ function toggleFormat(ui)
+ {
+ var graph = ui.editor.graph;
+ graph.popupMenuHandler.hideMenu();
+
+ if (ui.formatWindow == null)
+ {
+ ui.formatWindow = new WrapperWindow(ui, mxResources.get('format'),
+ Math.max(0, ui.diagramContainer.clientWidth - ui.formatWidth - 12), 56,
+ ui.formatWidth, 546, function(container)
+ {
+ var format = ui.createFormat(container);
+ format.init();
+
+ return format;
+ });
+ ui.formatWindow.window.addListener('show', function()
+ {
+ ui.fireEvent(new mxEventObject('format'));
+ });
+ ui.formatWindow.window.addListener('format', function()
+ {
+ ui.fireEvent(new mxEventObject('format'));
+ });
+ ui.formatWindow.window.minimumSize = new mxRectangle(0, 0, ui.formatWidth, 80);
+ ui.formatWindow.window.setVisible(true);
+ ui.formatWindow.window.fit();
+ ui.fireEvent(new mxEventObject('sidebar'));
+ }
+ else
+ {
+ ui.formatWindow.window.setVisible(!ui.formatWindow.window.isVisible());
+
+ if (ui.formatWindow.window.isVisible())
+ {
+ ui.formatWindow.window.fit();
+ }
+ }
+
+ var offset = mxUtils.getOffset(ui.container);
+ ui.formatWindow.window.div.style.top = Math.max(parseInt(ui.formatWindow.window.div.style.top), offset.y) + 'px';
+ };
+
+ function toggleShapes(ui)
+ {
+ var graph = ui.editor.graph;
+ graph.popupMenuHandler.hideMenu();
+ var rect = new mxRectangle();
+
+ if (ui.sidebarWindow == null)
+ {
+ var w = Math.min(graph.container.clientWidth - 10, 300);
+
+ ui.sidebarWindow = new WrapperWindow(ui, mxResources.get('shapes'), 10, 56,
+ w - 6, Math.min(600, graph.container.clientHeight - 30),
+ function(container)
+ {
+ var div = document.createElement('div');
+ div.style.cssText = 'position:absolute;left:0;right:0;border-top:1px solid lightgray;' +
+ 'height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;';
+ div.className = 'geTitle';
+ mxUtils.write(div, mxResources.get('moreShapes'));
+ container.appendChild(div);
+
+ mxEvent.addListener(div, 'click', function()
+ {
+ ui.actions.get('shapes').funct();
+ });
+
+ var menuObj = new Menubar(ui, container);
+
+ function addMenu(id, label)
+ {
+ var menu = ui.menus.get(id);
+
+ var elt = menuObj.addMenu(label, mxUtils.bind(this, function()
+ {
+ // Allows extensions of menu.functid
+ menu.funct.apply(this, arguments);
+ }));
+
+ elt.style.cssText = 'position:absolute;border-top:1px solid lightgray;width:50%;' +
+ 'height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;';
+ elt.className = 'geTitle';
+ container.appendChild(elt);
+
+ return elt;
+ }
+
+ if (urlParams['embed'] != '1' || urlParams['libraries'] == '1')
+ {
+ // Defined in native apps together with openLibrary
+ if (ui.actions.get('newLibrary') != null)
+ {
+ var div = document.createElement('div');
+ div.style.cssText = 'position:absolute;left:0px;width:50%;border-top:1px solid lightgray;' +
+ 'height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;';
+ div.className = 'geTitle';
+ var span = document.createElement('span');
+ span.style.cssText = 'position:relative;top:6px;';
+ mxUtils.write(span, mxResources.get('newLibrary'));
+ div.appendChild(span);
+ container.appendChild(div);
+
+ mxEvent.addListener(div, 'click', ui.actions.get('newLibrary').funct);
+
+ var div = document.createElement('div');
+ div.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;';
+ div.className = 'geTitle';
+ var span = document.createElement('span');
+ span.style.cssText = 'position:relative;top:6px;';
+ mxUtils.write(span, mxResources.get('openLibrary'));
+ div.appendChild(span);
+ container.appendChild(div);
+
+ mxEvent.addListener(div, 'click', ui.actions.get('openLibrary').funct);
+ }
+ else
+ {
+ var elt = addMenu('newLibrary', mxResources.get('newLibrary'));
+ elt.style.left = '0';
+
+ var elt = addMenu('openLibraryFrom', mxResources.get('openLibraryFrom'));
+ elt.style.borderLeft = '1px solid lightgray';
+ elt.style.left = '50%';
+ }
+ }
+ else
+ {
+ div.style.bottom = '0';
+ }
+
+ container.appendChild(ui.sidebar.container);
+ container.style.overflow = 'hidden';
+
+ return container;
+ });
+ ui.sidebarWindow.window.addListener('show', function()
+ {
+ ui.fireEvent(new mxEventObject('sidebar'));
+ });
+ ui.sidebarWindow.window.addListener('sidebar', function()
+ {
+ ui.fireEvent(new mxEventObject('sidebar'));
+ });
+ ui.sidebarWindow.window.minimumSize = new mxRectangle(0, 0, 90, 90);
+ ui.sidebarWindow.window.setVisible(true);
+ ui.sidebarWindow.window.fit();
+ ui.fireEvent(new mxEventObject('sidebar'));
+
+ ui.getLocalData('sidebar', function(value)
+ {
+ ui.sidebar.showEntries(value, null, true);
+ });
+
+ ui.restoreLibraries();
+ }
+ else
+ {
+ ui.sidebarWindow.window.setVisible(!ui.sidebarWindow.window.isVisible());
+
+ if (ui.sidebarWindow.window.isVisible())
+ {
+ ui.sidebarWindow.window.fit();
+ }
+ }
+
+ var offset = mxUtils.getOffset(ui.container);
+ ui.sidebarWindow.window.div.style.top = Math.max(parseInt(ui.sidebarWindow.window.div.style.top), offset.y) + 'px';
+ };
+
+ // Changes colors for some UI elements
+ var fill = '#29b6f2';
+ var stroke = '#ffffff';
+
+ 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="' + fill + '"/>').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="#ffffff"/>').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="#ffffff"/>').src;
+ mxVertexHandler.prototype.handleImage = Graph.createSvgImage(16, 16, '<circle cx="8" cy="8" r="5" stroke="' + stroke + '" fill="' + fill + '"/>');
+ mxEdgeHandler.prototype.handleImage = mxVertexHandler.prototype.handleImage;
+ mxEdgeHandler.prototype.terminalHandleImage = Graph.createSvgImage(16, 16, '<circle cx="8" cy="8" r="5" stroke="' + stroke + '" fill="' + fill + '"/><circle cx="8" cy="8" r="3" stroke="' + stroke + '" fill="' + fill + '"/>');
+ mxEdgeHandler.prototype.fixedHandleImage = Graph.createSvgImage(16, 16, '<circle cx="8" cy="8" r="5" stroke="' + stroke + '" fill="' + fill + '"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="' + stroke + '"/>');
+ mxConstraintHandler.prototype.pointImage = Graph.createSvgImage(5, 5, '<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="' + fill + '"/>');
+ HoverIcons.prototype.triangleUp = Graph.createSvgImage(18, 36, '<path d="m 6 36 L 12 36 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="' + fill + '"/>');
+ HoverIcons.prototype.triangleRight = Graph.createSvgImage(36, 18, '<path d="m 1 6 L 24 6 L 24 1 L 36 9 L 24 18 L 24 12 L 1 12 z" stroke="#fff" fill="' + fill + '"/>');
+ HoverIcons.prototype.triangleDown = Graph.createSvgImage(18, 36, '<path d="m 6 1 L 6 24 L 1 24 L 9 36 L 18 24 L 12 24 L 12 1 z" stroke="#fff" fill="' + fill + '"/>');
+ HoverIcons.prototype.triangleLeft = Graph.createSvgImage(36, 18, '<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="' + fill + '"/>');
+ HoverIcons.prototype.roundDrop = Graph.createSvgImage(26, 26, '<circle cx="13" cy="13" r="12" stroke="#fff" fill="' + fill + '"/>');
+ HoverIcons.prototype.arrowSpacing = 0;
+ mxOutline.prototype.sizerImage = null;
+
+ if (window.Sidebar != null)
+ {
+ Sidebar.prototype.triangleUp = HoverIcons.prototype.triangleUp;
+ Sidebar.prototype.triangleRight = HoverIcons.prototype.triangleRight;
+ Sidebar.prototype.triangleDown = HoverIcons.prototype.triangleDown;
+ Sidebar.prototype.triangleLeft = HoverIcons.prototype.triangleLeft;
+ Sidebar.prototype.refreshTarget = HoverIcons.prototype.refreshTarget;
+ Sidebar.prototype.roundDrop = HoverIcons.prototype.roundDrop;
+ }
+
+ mxConstants.VERTEX_SELECTION_COLOR = '#C0C0C0';
+ mxConstants.EDGE_SELECTION_COLOR = '#C0C0C0';
+ mxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff';
+
+ mxConstants.DEFAULT_VALID_COLOR = fill;
+ mxConstants.GUIDE_COLOR = '#C0C0C0';
+
+ mxConstants.HIGHLIGHT_STROKEWIDTH = 5;
+ mxConstants.HIGHLIGHT_OPACITY = 35;
+ mxConstants.HIGHLIGHT_SIZE = 5;
+ 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.prototype.inactiveTabBackgroundColor = '#f0f0f0';
+ mxGraphHandler.prototype.previewColor = '#C0C0C0';
+ mxRubberband.prototype.defaultOpacity = 50;
+ HoverIcons.prototype.inactiveOpacity = 25;
+ EditorUi.prototype.closableScratchpad = false;
+ EditorUi.prototype.showCsvImport = false;
+ EditorUi.prototype.footerHeight = 0;
+ Graph.prototype.editAfterInsert = true;
+
+ // Overridden to ignore tabContainer height for diagramContainer
+ var editorUiRefresh = EditorUi.prototype.refresh;
+
+ EditorUi.prototype.refresh = function(sizeDidChange)
+ {
+ editorUiRefresh.apply(this, arguments);
+ this.diagramContainer.style.top = '47px';
+
+ if (this.tabContainer != null)
+ {
+ // Makes room for view zoom menu
+ this.tabContainer.style.right = '70px';
+ }
+ };
+
+ /**
+ * Sets the XML node for the current diagram.
+ */
+ Editor.prototype.isChromelessView = function()
+ {
+ return false;
+ };
+
+ /**
+ * Sets the XML node for the current diagram.
+ */
+ Graph.prototype.isLightboxView = function()
+ {
+ return false;
+ };
+
+ // Hides keyboard shortcuts in menus
+ var menusAddShortcut = Menus.prototype.addShortcut;
+
+ Menus.prototype.addShortcut = function(item, action)
+ {
+ if (action.shortcut != null && iw < 900 && !mxClient.IS_IOS)
+ {
+ var td = item.firstChild.nextSibling;
+ td.setAttribute('title', action.shortcut);
+ }
+ else
+ {
+ menusAddShortcut.apply(this, arguments);
+ }
+ };
+
+ var appUpdateUserElement = App.prototype.updateUserElement;
+
+ App.prototype.updateUserElement = function()
+ {
+ appUpdateUserElement.apply(this, arguments);
+
+ if (this.userElement != null)
+ {
+ var elt = this.userElement;
+ elt.style.cssText = 'display:inline-block;position:relative;margin-right:4px;';
+ elt.className = '';
+ elt.innerHTML = '';
+ elt.style.backgroundImage = 'url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)';
+ elt.style.backgroundPosition = 'center center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '24px 24px';
+ elt.style.height = '24px';
+ elt.style.width = '24px';
+ mxUtils.setOpacity(elt, 30);
+ elt.setAttribute('title', mxResources.get('changeUser'));
+ }
+ };
+
+ var appUpdateButtonContainer = App.prototype.updateButtonContainer;
+
+ App.prototype.updateButtonContainer = function()
+ {
+ appUpdateButtonContainer.apply(this, arguments);
+
+ if (this.shareButton != null)
+ {
+ var elt = this.shareButton;
+ elt.style.cssText = 'display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;';
+ elt.className = '';
+ elt.innerHTML = '';
+ elt.style.backgroundImage = 'url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)';
+ elt.style.backgroundPosition = 'center center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '24px 24px';
+ elt.style.height = '24px';
+ elt.style.width = '24px';
+ mxUtils.setOpacity(elt, 30);
+ elt.setAttribute('title', mxResources.get('share'));
+ }
+ };
+
+ EditorUi.prototype.addEmbedButtons = function()
+ {
+ if (this.buttonContainer != null)
+ {
+ var div = document.createElement('div');
+ div.style.display = 'inline-block';
+ div.style.position = 'relative';
+ div.style.marginTop = '2px';
+
+ var button = document.createElement('button');
+ mxUtils.write(button, mxResources.get('save'));
+ button.setAttribute('title', mxResources.get('save') + ' (' + Editor.ctrlKey + '+S)');
+ button.className = (urlParams['saveAndExit'] == '1') ? 'geMenuItem' : 'geMenuItem gePrimaryBtn';
+ button.style.fontSize = '14px';
+ button.style.padding = '6px';
+ button.style.borderRadius = '3px';
+ button.style.marginLeft = '8px';
+ button.style.cursor = 'pointer';
+
+ mxEvent.addListener(button, 'click', mxUtils.bind(this, function()
+ {
+ this.actions.get('save').funct();
+ }));
+
+ div.appendChild(button);
+
+ if (urlParams['saveAndExit'] == '1')
+ {
+ button = document.createElement('a');
+ mxUtils.write(button, mxResources.get('saveAndExit'));
+ button.setAttribute('title', mxResources.get('saveAndExit'));
+ button.className = 'geMenuItem gePrimaryBtn';
+ button.style.fontSize = '14px';
+ button.style.marginLeft = '6px';
+ button.style.padding = '6px';
+ button.style.cursor = 'pointer';
+
+ mxEvent.addListener(button, 'click', mxUtils.bind(this, function()
+ {
+ this.actions.get('saveAndExit').funct();
+ }));
+
+ div.appendChild(button);
+ }
+
+ button = document.createElement('a');
+ mxUtils.write(button, mxResources.get('exit'));
+ button.setAttribute('title', mxResources.get('exit'));
+ button.className = 'geMenuItem';
+ button.style.fontSize = '14px';
+ button.style.marginLeft = '6px';
+ button.style.padding = '6px';
+ button.style.cursor = 'pointer';
+
+ mxEvent.addListener(button, 'click', mxUtils.bind(this, function()
+ {
+ this.actions.get('exit').funct();
+ }));
+
+ div.appendChild(button);
+ this.buttonContainer.appendChild(div);
+ this.buttonContainer.style.top = '6px';
+ }
+ };
+
+ // Fixes sidebar tooltips (previews)
+ Sidebar.prototype.getTooltipOffset = function()
+ {
+ var off = mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);
+ off.y += 40;
+
+ return off;
+ };
+
+ // Adds context menu items
+ var menuCreatePopupMenu = Menus.prototype.createPopupMenu;
+
+ Menus.prototype.createPopupMenu = function(menu, cell, evt)
+ {
+ var graph = this.editorUi.editor.graph;
+ menu.smartSeparators = true;
+ menuCreatePopupMenu.apply(this, arguments);
+
+ var promptSpacing = mxUtils.bind(this, function(defaultValue, fn)
+ {
+ var dlg = new FilenameDialog(this.editorUi, defaultValue, mxResources.get('apply'), function(newValue)
+ {
+ fn(parseFloat(newValue));
+ }, mxResources.get('spacing'));
+ this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+ dlg.init();
+ });
+
+ if (graph.getSelectionCount() == 1)
+ {
+ this.addMenuItems(menu, ['editTooltip', '-'], null, evt);
+
+ if (graph.isCellFoldable(graph.getSelectionCell()))
+ {
+ this.addMenuItems(menu, (graph.isCellCollapsed(cell)) ? ['expand'] : ['collapse'], null, evt);
+ }
+
+ this.addMenuItems(menu, ['lockUnlock', 'enterGroup'], null, evt);
+ menu.addSeparator();
+ this.addSubmenu('layout', menu);
+ }
+ else if (graph.isSelectionEmpty() && graph.isEnabled())
+ {
+ menu.addSeparator();
+ this.addSubmenu('insert', menu);
+ this.addSubmenu('layout', menu);
+ menu.addSeparator();
+ this.addSubmenu('options', menu);
+
+ this.addMenuItems(menu, ['-', 'exitGroup'], null, evt);
+ }
+ else if (graph.isEnabled())
+ {
+ this.addMenuItems(menu, ['-', 'lockUnlock'], null, evt);
+ }
+ };
+
+ // Overridden to toggle window instead
+ EditorUi.prototype.toggleFormatPanel = function(forceHide)
+ {
+ if (this.formatWindow != null)
+ {
+ this.formatWindow.window.setVisible((forceHide) ?
+ false : !this.formatWindow.window.isVisible());
+ }
+ };
+
+ /**
+ * Adds math switch in format panel.
+ */
+ var diagramFormatPanelAddOptions = DiagramFormatPanel.prototype.addOptions;
+
+ DiagramFormatPanel.prototype.addOptions = function(div)
+ {
+ var div = diagramFormatPanelAddOptions.apply(this, arguments);
+
+ var ui = this.editorUi;
+ var editor = ui.editor;
+ var graph = editor.graph;
+
+ if (graph.isEnabled())
+ {
+ // Math
+ var option = this.createOption(mxResources.get('mathematicalTypesetting'), function()
+ {
+ return graph.mathEnabled;
+ }, function(checked)
+ {
+ ui.actions.get('mathematicalTypesetting').funct();
+ },
+ {
+ install: function(apply)
+ {
+ this.listener = function()
+ {
+ apply(graph.mathEnabled);
+ };
+
+ ui.addListener('mathEnabledChanged', this.listener);
+ },
+ destroy: function()
+ {
+ ui.removeListener(this.listener);
+ }
+ });
+
+ option.style.paddingTop = '0px';
+ div.appendChild(option);
+
+ var help = ui.menus.createHelpLink('https://desk.draw.io/support/solutions/articles/16000032875');
+ help.style.position = 'relative';
+ help.style.top = '4px';
+ option.appendChild(help);
+ }
+
+ return div;
+ };
+
+ // Initializes the user interface
+ var editorUiDestroy = EditorUi.prototype.destroy;
+ EditorUi.prototype.destroy = function()
+ {
+ if (this.sidebarWindow != null)
+ {
+ this.sidebarWindow.window.setVisible(false);
+ this.sidebarWindow.window.destroy();
+ this.sidebarWindow = null;
+ }
+
+ if (this.formatWindow != null)
+ {
+ this.formatWindow.window.setVisible(false);
+ this.formatWindow.window.destroy();
+ this.formatWindow = null;
+ }
+
+ if (this.actions.outlineWindow != null)
+ {
+ this.actions.outlineWindow.destroy();
+ this.actions.outlineWindow = null;
+ }
+
+ if (this.actions.layersWindow != null)
+ {
+ this.actions.layersWindow.destroy();
+ this.actions.layersWindow = null;
+ }
+
+ if (this.actions.tagsWindow != null)
+ {
+ this.actions.tagsWindow.window.setVisible(false);
+ this.actions.tagsWindow.window.destroy();
+ this.actions.tagsWindow = null;
+ }
+
+ if (this.actions.findWindow != null)
+ {
+ this.actions.findWindow.window.setVisible(false);
+ this.actions.findWindow.window.destroy();
+ this.actions.findWindow = null;
+ }
+
+ editorUiDestroy.apply(this, arguments);
+ };
+
+ // Disables centering of graph after iframe resize
+ EditorUi.prototype.chromelessWindowResize = function() {};
+
+ // Initializes the user interface
+ var editorUiInit = EditorUi.prototype.init;
+ EditorUi.prototype.init = function()
+ {
+ editorUiInit.apply(this, arguments);
+
+ var ui = this;
+ var graph = this.editor.graph;
+ var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+ var div = document.createElement('div');
+ div.style.cssText = 'position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;';
+ div.style.bottom = (urlParams['embed'] != '1' || urlParams['libraries'] == '1') ? '63px' : '32px';
+ this.sidebar = this.createSidebar(div);
+
+ ui.actions.get('insertText').label = mxResources.get('text');
+ ui.actions.get('insertText').label = mxResources.get('text');
+ ui.actions.get('editDiagram').label = mxResources.get('formatXml') + '...';
+ ui.actions.get('insertRectangle').label = mxResources.get('rectangle');
+ ui.actions.get('insertEllipse').label = mxResources.get('ellipse');
+ ui.actions.get('insertRhombus').label = mxResources.get('rhombus');
+ ui.actions.get('insertImage').label = mxResources.get('image') + '...';
+ ui.actions.get('insertLink').label = mxResources.get('link') + '...';
+ ui.actions.get('createShape').label = mxResources.get('shape') + '...';
+ ui.actions.get('outline').label = mxResources.get('outline') + '...';
+ ui.actions.get('layers').label = mxResources.get('layers') + '...';
+
+ ui.actions.put('importFile', new Action('File...', function()
+ {
+ graph.popupMenuHandler.hideMenu();
+ var input = document.createElement('input');
+ input.setAttribute('type', 'file');
+
+ mxEvent.addListener(input, 'change', function()
+ {
+ if (input.files != null)
+ {
+ // Using null for position will disable crop of input file
+ ui.importFiles(input.files, null, null, ui.maxImageSize);
+ }
+ });
+
+ input.click();
+ }));
+ ui.actions.put('importCsv', new Action(mxResources.get('csv') + '...', function()
+ {
+ graph.popupMenuHandler.hideMenu();
+ ui.showImportCsvDialog();
+ }));
+ ui.actions.put('importText', new Action(mxResources.get('text') + '...', function()
+ {
+ var dlg = new ParseDialog(ui, 'Insert from Text');
+ ui.showDialog(dlg.container, 620, 420, true, false);
+ dlg.init();
+ }));
+
+ ui.actions.put('toggleShapes', new Action(mxResources.get('shapes') + '...', function()
+ {
+ toggleShapes(ui);
+ }));
+ ui.actions.put('toggleFormat', new Action(mxResources.get('format') + '...', function()
+ {
+ toggleFormat(ui);
+ }));
+ var addInsertItem = function(menu, parent, title, method)
+ {
+ menu.addItem(title, null, mxUtils.bind(this, function()
+ {
+ var dlg = new CreateGraphDialog(ui, title, method);
+ ui.showDialog(dlg.container, 620, 420, true, false);
+ // Executed after dialog is added to dom
+ dlg.init();
+ }), parent);
+ };
+
+ ui.menus.put('diagram', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ ui.menus.addSubmenu('preferences', menu, parent);
+ menu.addSeparator(parent);
+
+ if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
+ {
+ ui.menus.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-'], parent);
+ }
+ else if (urlParams['embed'] == '1')
+ {
+ ui.menus.addMenuItems(menu, ['-', 'save'], parent);
+
+ if (urlParams['saveAndExit'] == '1')
+ {
+ ui.menus.addMenuItems(menu, ['saveAndExit'], parent);
+ }
+
+ menu.addSeparator(parent);
+ }
+ else
+ {
+ ui.menus.addMenuItems(menu, ['new'], parent);
+ ui.menus.addSubmenu('openFrom', menu, parent, mxResources.get('open'));
+ menu.addSeparator(parent);
+ ui.menus.addSubmenu('save', menu, parent);
+ }
+
+ ui.menus.addSubmenu('exportAs', menu, parent);
+ ui.menus.addMenuItems(menu, ['-', 'outline', 'layers', '-', 'find', 'tags', '-'], parent);
+
+ // Cannot use print in standalone mode on iOS as we cannot open new windows
+ if (!mxClient.IS_IOS || !navigator.standalone)
+ {
+ ui.menus.addMenuItems(menu, ['-', 'print', '-'], parent);
+ }
+
+ ui.menus.addSubmenu('help', menu, parent);
+
+ if (urlParams['embed'] == '1')
+ {
+ ui.menus.addMenuItems(menu, ['-', 'exit'], parent);
+ }
+ else
+ {
+ ui.menus.addMenuItems(menu, ['-', 'close']);
+ }
+ })));
+
+ if (isLocalStorage)
+ {
+ var openFromMenu = ui.menus.get('openFrom');
+ var oldFunct = openFromMenu.funct;
+
+ openFromMenu.funct = function(menu, parent)
+ {
+ oldFunct.apply(this, arguments);
+
+ menu.addSeparator(parent);
+ ui.menus.addSubmenu('openRecent', menu, parent);
+ };
+ }
+
+ ui.menus.put('save', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ var file = ui.getCurrentFile();
+
+ if (file != null && file.constructor == DriveFile)
+ {
+ ui.menus.addMenuItems(menu, ['share', '-', 'makeCopy', 'moveToFolder'], parent);
+ }
+ else
+ {
+ ui.menus.addMenuItems(menu, ['save', 'saveAs', '-', 'rename', 'makeCopy'], parent);
+ }
+
+ if (file != null && (file.constructor == DriveFile || file.constructor == DropboxFile))
+ {
+ ui.menus.addMenuItems(menu, ['-', 'revisionHistory'], parent);
+ }
+
+ if (file != null && file.constructor == DriveFile)
+ {
+ ui.menus.addMenuItems(menu, ['createRevision'], parent);
+ }
+
+ ui.menus.addMenuItems(menu, ['-', 'autosave'], parent);
+ })));
+
+ ui.menus.put('exportAs', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ ui.menus.addMenuItems(menu, ['exportPng', 'exportJpg', 'exportSvg', '-', 'exportPdf', 'exportVsdx', '-',
+ 'exportHtml', 'exportXml', 'exportUrl', '-'], parent);
+ ui.menus.addSubmenu('embed', menu, parent);
+ ui.menus.addSubmenu('publish', menu, parent);
+ })));
+
+ ui.menus.put('preferences', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ if (urlParams['embed'] != '1')
+ {
+ ui.menus.addSubmenu('theme', menu, parent);
+ }
+
+ ui.menus.addSubmenu('language', menu, parent);
+ menu.addSeparator(parent);
+
+ ui.menus.addMenuItems(menu, ['scrollbars', 'tooltips', 'pageScale'], parent);
+
+ if (urlParams['embed'] != '1' && isLocalStorage)
+ {
+ ui.menus.addMenuItems(menu, ['-', 'search', 'scratchpad', '-', 'showStartScreen'], parent);
+ }
+
+ if (!ui.isOfflineApp() && urlParams['embed'] != '1')
+ {
+ ui.menus.addMenuItems(menu, ['-', 'plugins'], parent);
+ }
+ })));
+
+ ui.menus.put('insertAdvanced', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ ui.menus.addMenuItems(menu, ['importText', 'createShape', '-', 'importCsv', 'editDiagram', '-', 'insertPage'], parent);
+ })));
+
+ mxResources.parse('insertLayout=' + mxResources.get('layout'));
+ mxResources.parse('insertAdvanced=' + mxResources.get('advanced'));
+
+ ui.menus.put('insert', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ ui.menus.addMenuItems(menu, ['insertRectangle', 'insertEllipse', 'insertRhombus', '-', 'insertText',
+ 'insertLink', '-', 'insertImage'], parent);
+ ui.menus.addSubmenu('importFrom', menu, parent);
+ menu.addSeparator(parent);
+ ui.menus.addSubmenu('insertLayout', menu, parent);
+ ui.menus.addSubmenu('insertAdvanced', menu, parent);
+ })));
+
+ var methods = ['horizontalFlow', 'verticalFlow', '-', 'horizontalTree', 'verticalTree',
+ 'radialTree', '-', 'organic', 'circle'];
+
+ ui.menus.put('insertLayout', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ for (var i = 0; i < methods.length; i++)
+ {
+ if (methods[i] == '-')
+ {
+ menu.addSeparator(parent);
+ }
+ else
+ {
+ addInsertItem(menu, parent, mxResources.get(methods[i]) + '...', methods[i]);
+ }
+ }
+ })));
+
+ ui.menus.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ ui.menus.addMenuItems(menu, ['grid', 'guides', '-', 'connectionArrows', 'connectionPoints', '-',
+ 'copyConnect', 'collapseExpand', '-', 'mathematicalTypesetting'], parent);
+ })));
+
+ ui.menus.put('embed', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ ui.menus.addMenuItems(menu, ['embedImage', 'embedSvg', '-', 'embedHtml', 'embedIframe'], parent);
+ })));
+
+ // Needed for creating elements in Format panel
+ ui.toolbar = ui.createToolbar(ui.createDiv('geToolbar'));
+ ui.defaultLibraryName = mxResources.get('untitledLibrary');
+
+ var menubar = document.createElement('div');
+ menubar.style.cssText = 'position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;';
+
+ var menuObj = new Menubar(ui, menubar);
+
+ function addMenu(id, small, img, opacity)
+ {
+ var menu = ui.menus.get(id);
+
+ var elt = menuObj.addMenu(mxResources.get(id), mxUtils.bind(this, function()
+ {
+ // Allows extensions of menu.functid
+ menu.funct.apply(this, arguments);
+ }));
+
+ elt.className = 'geMenuItem';
+ elt.style.display = 'inline-block';
+ elt.style.boxSizing = 'border-box';
+ elt.style.top = '6px';
+ elt.style.marginRight = '6px';
+ elt.style.height = '30px';
+ elt.style.paddingTop = '6px';
+ elt.style.paddingBottom = '6px';
+ elt.setAttribute('title', mxResources.get(id));
+ ui.menus.menuCreated(menu, elt, 'geMenuItem');
+
+ if (img != null)
+ {
+ elt.style.backgroundImage = 'url(' + img + ')';
+ elt.style.backgroundPosition = 'center center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '24px 24px';
+ elt.style.width = '34px';
+ elt.innerHTML = '';
+ mxUtils.setOpacity(elt, opacity || 40);
+ }
+ else if (!small)
+ {
+ elt.style.backgroundImage = 'url(' + mxWindow.prototype.normalizeImage + ')';
+ elt.style.backgroundPosition = 'right 6px center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.paddingRight = '22px';
+ }
+
+ return elt;
+ };
+
+ function addMenuItem(label, fn, small, tooltip, action, img)
+ {
+ var btn = document.createElement('a');
+ btn.setAttribute('href', 'javascript:void(0)');
+ btn.className = 'geMenuItem';
+ btn.style.display = 'inline-block';
+ btn.style.boxSizing = 'border-box';
+ btn.style.height = '30px';
+ btn.style.padding = '6px';
+ btn.style.position = 'relative';
+ btn.style.verticalAlign = 'top';
+ btn.style.top = '0px';
+ menubar.appendChild(btn);
+
+ if (img != null)
+ {
+ btn.style.backgroundImage = 'url(' + img + ')';
+ btn.style.backgroundPosition = 'center center';
+ btn.style.backgroundRepeat = 'no-repeat';
+ btn.style.backgroundSize = '24px 24px';
+ btn.style.width = '34px';
+ }
+ else
+ {
+ mxUtils.write(btn, label);
+ }
+
+ mxEvent.addListener(btn, 'click', function(evt)
+ {
+ if (btn.getAttribute('disabled') != 'disabled')
+ {
+ fn();
+ }
+
+ mxEvent.consume(evt);
+ });
+
+ if (small == null)
+ {
+ btn.style.marginRight = '4px';
+ }
+
+ if (tooltip != null)
+ {
+ btn.setAttribute('title', tooltip);
+ }
+
+ mxUtils.setOpacity(btn, (img != null) ? 40 : 100);
+
+ if (action != null)
+ {
+ function updateState()
+ {
+ if (action.isEnabled())
+ {
+ btn.removeAttribute('disabled');
+ mxUtils.setOpacity(btn, (img != null) ? 40 : 100);
+ btn.style.cursor = '';
+ }
+ else
+ {
+ btn.setAttribute('disabled', 'disabled');
+ mxUtils.setOpacity(btn, (img != null) ? 10 : 50);
+ btn.style.cursor = 'default';
+ }
+ };
+
+ action.addListener('stateChanged', updateState);
+ updateState();
+ }
+
+ return btn;
+ };
+
+ function createGroup(btns)
+ {
+ var btnGroup = document.createElement('div');
+ btnGroup.className = 'geMenuItem';
+ btnGroup.style.display = 'inline-block';
+ btnGroup.style.verticalAlign = 'top';
+ btnGroup.style.marginRight = '6px';
+ btnGroup.style.padding = '0 4px 0 4px';
+ btnGroup.style.height = '30px';
+ btnGroup.style.position = 'relative';
+ btnGroup.style.top = '0px';
+
+ for (var i = 0; i < btns.length; i++)
+ {
+ if (btns[i] != null)
+ {
+ btns[i].style.margin = '0px';
+ btns[i].style.boxShadow = 'none';
+ btnGroup.appendChild(btns[i]);
+ }
+ }
+
+ menubar.appendChild(btnGroup);
+
+ return btnGroup;
+ };
+
+ var small = iw < 900;
+
+ if (!small)
+ {
+ addMenu('diagram');
+ }
+
+ createGroup([((small) ? addMenu('diagram', null, IMAGE_PATH + '/drawlogo-gray.svg', 100) : null),
+ addMenuItem(mxResources.get('shapes'), ui.actions.get('toggleShapes').funct, null, mxResources.get('shapes'), ui.actions.get('image'),
+ (small) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+' : null),
+ addMenuItem(mxResources.get('format'), ui.actions.get('toggleFormat').funct, null,
+ mxResources.get('format') + ' (' + ui.actions.get('formatPanel').shortcut + ')', null,
+ (small) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==' : null)]);
+ var elt = addMenu('insert', true, (small) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==' : null, 40);
+ createGroup([elt, addMenuItem(mxResources.get('delete'), ui.actions.get('delete').funct, null, mxResources.get('delete'), ui.actions.get('delete'),
+ (small) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==' : null)]);
+
+ if (iw >= 480)
+ {
+ var undoAction = ui.actions.get('undo');
+ var redoAction = ui.actions.get('redo');
+
+ var undoElt = addMenuItem('', undoAction.funct, null, mxResources.get('undo') + ' (' + undoAction.shortcut + ')', undoAction,
+ 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+');
+ var redoElt = addMenuItem('', redoAction.funct, null, mxResources.get('redo') + ' (' + redoAction.shortcut + ')', redoAction,
+ 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==');
+
+ createGroup([undoElt, redoElt]);
+
+ if (iw >= 560)
+ {
+ createGroup([addMenuItem('', function()
+ {
+ graph.popupMenuHandler.hideMenu();
+
+ var scale = graph.view.scale;
+ var tx = graph.view.translate.x;
+ var ty = graph.view.translate.y;
+
+ ui.actions.get('resetView').funct();
+
+ // Toggle scale if nothing has changed
+ if (Math.abs(scale - graph.view.scale) < 0.00001 && tx == graph.view.translate.x && ty == graph.view.translate.y)
+ {
+ ui.actions.get((graph.pageVisible) ? 'fitPage' : 'fitWindow').funct();
+ }
+ }, true, mxResources.get('fit') + ' (' + Editor.ctrlKey + '+H)', null,
+ 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=='),
+ (iw >= 640) ? addMenuItem('', ui.actions.get('zoomIn').funct, true, mxResources.get('zoomIn') + ' (' + Editor.ctrlKey + ' +)', null,
+ 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=') : null,
+ (iw >= 640) ? addMenuItem('', ui.actions.get('zoomOut').funct, true, mxResources.get('zoomOut') + ' (' + Editor.ctrlKey + ' -)', null,
+ 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==') : null]);
+ }
+ }
+
+ ui.statusContainer = ui.createStatusContainer();
+ ui.statusContainer.style.position = 'relative';
+ ui.statusContainer.style.maxWidth = '';
+ ui.statusContainer.style.marginTop = '7px';
+ ui.statusContainer.style.marginLeft = '6px';
+ ui.statusContainer.style.color = 'gray';
+
+ // Connects the status bar to the editor status
+ ui.editor.addListener('statusChanged', mxUtils.bind(this, function()
+ {
+ ui.setStatusText(ui.editor.getStatus());
+ }));
+
+ ui.setStatusText(ui.editor.getStatus());
+ menubar.appendChild(ui.statusContainer);
+
+ ui.buttonContainer = document.createElement('div');
+ ui.buttonContainer.style.cssText = 'position:absolute;right:40px;top:12px;white-space:nowrap;';
+ menubar.appendChild(ui.buttonContainer);
+
+ // Container for the user element
+ ui.menubarContainer = ui.buttonContainer;
+
+ if (iw >= 480)
+ {
+ var langMenu = ui.menus.get('language');
+
+ if (langMenu != null)
+ {
+ var elt = menuObj.addMenu('', langMenu.funct);
+ elt.setAttribute('title', mxResources.get('language'));
+
+ elt.style.backgroundImage = 'url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)';
+ elt.style.backgroundPosition = 'center center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '24px 24px';
+ elt.style.position = 'absolute';
+ elt.style.height = '24px';
+ elt.style.width = '24px';
+ elt.style.zIndex = '1';
+ elt.style.top = '11px';
+ elt.style.right = '14px';
+ mxUtils.setOpacity(elt, 30);
+
+ menubar.appendChild(elt);
+ }
+ }
+
+ ui.tabContainer = document.createElement('div');
+ ui.tabContainer.style.cssText = 'position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;' +
+ 'border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;';
+
+ var previousParent = ui.diagramContainer.parentNode;
+
+ var wrapper = document.createElement('div');
+ wrapper.style.cssText = 'position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;';
+ ui.diagramContainer.style.top = '47px';
+ ui.diagramContainer.style.bottom = '30px';
+
+ var viewZoomMenu = ui.menus.get('viewZoom');
+
+ if (viewZoomMenu != null)
+ {
+ this.tabContainer.style.right = '70px';
+ var elt = menuObj.addMenu('100%', viewZoomMenu.funct);
+ elt.setAttribute('title', mxResources.get('zoom') + ' (Alt+Mousewheel)');
+ elt.style.whiteSpace = 'nowrap';
+ elt.style.backgroundImage = 'url(' + mxWindow.prototype.minimizeImage + ')';
+ elt.style.backgroundPosition = 'right 6px center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.paddingRight = '10px';
+ elt.style.display = 'block';
+ elt.style.position = 'absolute';
+ elt.style.textDecoration = 'none';
+ elt.style.textDecoration = 'none';
+ elt.style.right = '0px';
+ elt.style.bottom = '0px';
+ elt.style.overflow = 'hidden';
+ elt.style.textAlign = 'center';
+ elt.style.color = '#000';
+ elt.style.fontSize = '12px';
+ elt.style.color = '#707070';
+ elt.style.width = '59px';
+ elt.style.borderTop = '1px solid lightgray';
+ elt.style.borderLeft = '1px solid lightgray';
+ elt.style.height = (parseInt(ui.tabContainer.style.height) - 1) + 'px';
+ elt.style.lineHeight = (parseInt(ui.tabContainer.style.height) + 1) + 'px';
+ wrapper.appendChild(elt);
+
+ // Updates the label if the scale changes
+ var updateZoom = mxUtils.bind(this, function()
+ {
+ elt.innerHTML = Math.round(ui.editor.graph.view.scale * 100) + '%';
+ });
+
+ ui.editor.graph.view.addListener(mxEvent.EVENT_SCALE, updateZoom);
+ ui.editor.addListener('resetGraphView', updateZoom);
+ ui.editor.addListener('pageSelected', updateZoom);
+
+ // Augments setGraphEnabled to update visible state
+ var uiSetGraphEnabled = ui.setGraphEnabled;
+
+ ui.setGraphEnabled = function()
+ {
+ uiSetGraphEnabled.apply(this, arguments);
+
+ if (this.tabContainer != null)
+ {
+ elt.style.visibility = this.tabContainer.style.visibility;
+ }
+ };
+ }
+
+ wrapper.appendChild(ui.tabContainer);
+ wrapper.appendChild(menubar);
+ wrapper.appendChild(ui.diagramContainer);
+ previousParent.appendChild(wrapper);
+ ui.updateTabContainer();
+
+ mxEvent.addListener(window, 'resize', function()
+ {
+ if (ui.sidebarWindow != null)
+ {
+ ui.sidebarWindow.window.fit();
+ }
+
+ if (ui.formatWindow != null)
+ {
+ ui.formatWindow.window.fit();
+ }
+
+ if (ui.actions.outlineWindow != null)
+ {
+ ui.outlineWindow.fit();
+ }
+
+ if (ui.actions.layersWindow != null)
+ {
+ ui.outlineWindow.fit();
+ }
+
+ if (ui.actions.tagsWindow != null)
+ {
+ ui.tagsWindow.window.fit();
+ }
+
+ if (ui.actions.findWindow != null)
+ {
+ ui.findWindow.window.fit();
+ }
+ });
+ };
+};
+
+(function()
+{
+ var initialized = false;
+
+ // ChromeApp has async local storage
+ if (uiTheme == 'min' && !initialized && !mxClient.IS_CHROMEAPP)
+ {
+ EditorUi.initMinimalTheme();
+ initialized = true;
+ }
+
+ var uiInitTheme = EditorUi.initTheme;
+
+ // For async startup like chromeos
+ EditorUi.initTheme = function()
+ {
+ uiInitTheme.apply(this, arguments);
+
+ if (uiTheme == 'min' && !initialized)
+ {
+ this.initMinimalTheme();
+ initialized = true;
+ }
+ };
+})();
diff --git a/src/main/webapp/js/diagramly/Pages.js b/src/main/webapp/js/diagramly/Pages.js
index 5458f39c..38976a1c 100644
--- a/src/main/webapp/js/diagramly/Pages.js
+++ b/src/main/webapp/js/diagramly/Pages.js
@@ -200,7 +200,7 @@ SelectPage.prototype.execute = function()
editor.fireEvent(new mxEventObject('setViewState', 'change', this));
// Handles grid state in chromeless mode which is stored in Editor instance
- graph.gridEnabled = graph.gridEnabled && (!this.ui.editor.chromeless ||
+ graph.gridEnabled = graph.gridEnabled && (!this.ui.editor.isChromelessView() ||
urlParams['grid'] == '1');
// Updates the display
@@ -345,7 +345,7 @@ EditorUi.prototype.initPages = function()
{
this.resetScrollbars();
- if (graph.lightbox)
+ if (graph.isLightboxView())
{
this.lightboxFit();
}
@@ -448,7 +448,7 @@ Graph.prototype.createViewState = function(node)
guidesEnabled: node.getAttribute('guides') != '0',
foldingEnabled: node.getAttribute('fold') != '0',
shadowVisible: node.getAttribute('shadow') == '1',
- pageVisible: (this.lightbox) ? false : ((pv != null) ? (pv != '0') : this.defaultPageVisible),
+ pageVisible: (this.isLightboxView()) ? false : ((pv != null) ? (pv != '0') : this.defaultPageVisible),
background: (bg != null && bg.length > 0) ? bg : this.defaultGraphBackground,
backgroundImage: (bgImg != null) ? new mxImage(bgImg.src, bgImg.width, bgImg.height) : null,
pageScale: (ps != null) ? ps : mxGraph.prototype.pageScale,
@@ -869,7 +869,7 @@ EditorUi.prototype.updateTabContainer = function()
// Automatic tab width to match available width
// TODO: Fix tabWidth in chromeless mode
- var btnWidth = (this.editor.chromeless) ? 29 : 59;
+ var btnWidth = (this.editor.isChromelessView()) ? 29 : 59;
var tabWidth = Math.min(140, Math.max(20, (this.tabContainer.clientWidth - btnWidth) / this.pages.length) + 1);
var startIndex = null;
@@ -1331,7 +1331,7 @@ EditorUi.prototype.createPageMenu = function(page, label)
//Registers codec for MovePage
(function()
{
- var codec = new mxObjectCodec(new MovePage(), ['ui']);
+ var codec = new mxObjectCodec(new MovePage(), ['ui']);
codec.beforeDecode = function(dec, node, obj)
{
@@ -1346,7 +1346,7 @@ EditorUi.prototype.createPageMenu = function(page, label)
//Registers codec for RenamePage
(function()
{
- var codec = new mxObjectCodec(new RenamePage(), ['ui', 'page', 'previous']);
+ var codec = new mxObjectCodec(new RenamePage(), ['ui', 'page', 'previous']);
codec.afterEncode = function(enc, obj, node)
{
@@ -1376,7 +1376,7 @@ EditorUi.prototype.createPageMenu = function(page, label)
//Registers codec for ChangePage
(function()
{
- var codec = new mxObjectCodec(new ChangePage(), ['ui', 'relatedPage', 'index', 'neverShown']);
+ var codec = new mxObjectCodec(new ChangePage(), ['ui', 'relatedPage', 'index', 'neverShown']);
codec.afterEncode = function(enc, obj, node)
{
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar-BPMN.js b/src/main/webapp/js/diagramly/sidebar/Sidebar-BPMN.js
index 7becc85e..4bcff8cb 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar-BPMN.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar-BPMN.js
@@ -10,7 +10,7 @@
var w = 50;
var h = 50;
- var s = 'shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;';
+ var s = 'shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outlineConnect=0;';
//default tags
var dt = 'bpmn business process model gateway ';
@@ -100,7 +100,7 @@
this.createVertexTemplateEntry(s + 'outline=end;symbol=terminate;', w, h, '', 'Terminate Gateway', null, null, dt + 'terminate')
]);
- s = 'shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=ellipsePerimeter;';
+ s = 'shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=ellipsePerimeter;outlineConnect=0;';
var dt = 'bpmn business process model event ';
this.addPaletteFunctions('bpmnEvents', 'BPMN Events', false,
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index 1bc0b953..a83d703f 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.5.15",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),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:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1550,9 +1550,9 @@ function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel
null);return a}}};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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,c){c=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" version="1.1">'+c+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(c):Base64.encode(c,!0)),a,b)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
-Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
+Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,e=!0,f=null,g=mxUtils.bind(this,function(a){e=!0;f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),h=mxUtils.bind(this,function(a){e=e&&null!=f&&Math.abs(f.x-mxEvent.getClientX(a))<b&&Math.abs(f.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(e)for(var d=mxEvent.getSource(b);null!=
-d&&d!=c.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(c.node,g,h,k);mxEvent.addListener(c.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+d&&d!=c.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(c.node,g,h,k);mxEvent.addListener(c.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,b,c){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)&&mxEvent.isLeftMouseButton(c)&&!mxEvent.isPopupTrigger(c)||mxEvent.isTouchEvent(c)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(c)}};
Graph.prototype.openLink=function(a,b){var c=window;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 d=a.split("#")[1];window.location.hash=="#"+d&&(window.location.hash="");window.location.hash=d}else c=window.open(a,b);return c};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,b){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",b))};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)};
@@ -1674,7 +1674,7 @@ arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0
for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?
this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,
a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,
-b.x/a.scale-a.translate.x+(0==b.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+(0==b.height?1:2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
+b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-
e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};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.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js
index 5547d9de..e1c6b122 100644
--- a/src/main/webapp/js/mxgraph/Editor.js
+++ b/src/main/webapp/js/mxgraph/Editor.js
@@ -272,6 +272,14 @@ Editor.prototype.init = function() { };
/**
* Sets the XML node for the current diagram.
*/
+Editor.prototype.isChromelessView = function()
+{
+ return this.chromeless;
+};
+
+/**
+ * Sets the XML node for the current diagram.
+ */
Editor.prototype.setAutosave = function(value)
{
this.autosave = value;
@@ -293,6 +301,11 @@ Editor.prototype.editAsNew = function(xml, title)
{
var p = (title != null) ? '?title=' + encodeURIComponent(title) : '';
+ if (urlParams['ui'] != null)
+ {
+ p += ((p.length > 0) ? '&' : '?') + 'ui=' + urlParams['ui'];
+ }
+
if (this.editorWindow != null && !this.editorWindow.closed)
{
this.editorWindow.focus();
@@ -348,7 +361,7 @@ Editor.prototype.createGraph = function(themes, model)
*/
Editor.prototype.resetGraph = function()
{
- this.graph.gridEnabled = !this.chromeless || urlParams['grid'] == '1';
+ this.graph.gridEnabled = !this.isChromelessView() || urlParams['grid'] == '1';
this.graph.graphHandler.guidesEnabled = true;
this.graph.setTooltips(true);
this.graph.setConnectable(true);
@@ -369,7 +382,7 @@ Editor.prototype.resetGraph = function()
*/
Editor.prototype.readGraphState = function(node)
{
- this.graph.gridEnabled = node.getAttribute('grid') != '0' && (!this.chromeless || urlParams['grid'] == '1');
+ this.graph.gridEnabled = node.getAttribute('grid') != '0' && (!this.isChromelessView() || urlParams['grid'] == '1');
this.graph.gridSize = parseFloat(node.getAttribute('gridSize')) || mxGraph.prototype.gridSize;
this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
this.graph.setTooltips(node.getAttribute('tooltips') != '0');
@@ -394,7 +407,7 @@ Editor.prototype.readGraphState = function(node)
this.graph.pageScale = mxGraph.prototype.pageScale;
}
- if (!this.graph.lightbox)
+ if (!this.graph.isLightboxView())
{
var pv = node.getAttribute('page');
diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js
index 3e62151d..d0f3f757 100644
--- a/src/main/webapp/js/mxgraph/EditorUi.js
+++ b/src/main/webapp/js/mxgraph/EditorUi.js
@@ -487,6 +487,7 @@ EditorUi = function(editor, container, lightbox)
['strokeColor', 'strokeWidth'],
['fillColor', 'gradientColor'],
valueStyles,
+ ['opacity'],
['align'],
['html']];
@@ -1361,7 +1362,7 @@ EditorUi.prototype.initCanvas = function()
var resize = null;
var ui = this;
- if (this.editor.chromeless)
+ if (this.editor.isChromelessView())
{
resize = mxUtils.bind(this, function(autoscale, maxScale, cx, cy)
{
@@ -1518,7 +1519,6 @@ EditorUi.prototype.initCanvas = function()
mxEvent.consume(evt);
}), Editor.previousLargeImage, mxResources.get('previousPage'));
-
var pageInfo = document.createElement('div');
pageInfo.style.display = 'inline-block';
pageInfo.style.verticalAlign = 'top';
@@ -1582,7 +1582,7 @@ EditorUi.prototype.initCanvas = function()
addButton(mxUtils.bind(this, function(evt)
{
- if (graph.lightbox)
+ if (graph.isLightboxView())
{
if (graph.view.scale == 1)
{
@@ -2152,7 +2152,7 @@ EditorUi.prototype.addBeforeUnloadListener = function()
// This must be disabled during save and image export
window.onbeforeunload = mxUtils.bind(this, function()
{
- if (!this.editor.chromeless)
+ if (!this.editor.isChromelessView())
{
return this.onBeforeUnload();
}
@@ -2442,7 +2442,7 @@ EditorUi.prototype.resetScrollbars = function()
graph.view.setTranslate(0, 0);
}
}
- else if (!this.editor.chromeless)
+ else if (!this.editor.isChromelessView())
{
if (mxUtils.hasScrollbars(graph.container))
{
diff --git a/src/main/webapp/js/mxgraph/Format.js b/src/main/webapp/js/mxgraph/Format.js
index fcda1f12..735548d2 100644
--- a/src/main/webapp/js/mxgraph/Format.js
+++ b/src/main/webapp/js/mxgraph/Format.js
@@ -1274,7 +1274,7 @@ BaseFormatPanel.prototype.createRelativeOption = function(label, key, width, han
mxUtils.write(div, label);
div.style.fontWeight = 'bold';
- function update(evt)
+ var update = mxUtils.bind(this, function(evt)
{
if (handler != null)
{
@@ -1295,13 +1295,15 @@ BaseFormatPanel.prototype.createRelativeOption = function(label, key, width, han
}
graph.setCellStyles(key, value, graph.getSelectionCells());
+ this.editorUi.fireEvent(new mxEventObject('styleChanged', 'keys', [key],
+ 'values', [value], 'cells', graph.getSelectionCells()));
}
input.value = ((value != null) ? value : '100') + ' %';
}
mxEvent.consume(evt);
- };
+ });
var input = this.addUnitInput(div, '%', 20, width, update, 10, -15, handler != null);
@@ -5089,7 +5091,6 @@ DiagramFormatPanel.prototype.addGridOption = function(container)
if (color == mxConstants.NONE)
{
graph.setGridEnabled(false);
- ui.fireEvent(new mxEventObject('gridEnabledChanged'));
}
else
{
@@ -5099,6 +5100,7 @@ DiagramFormatPanel.prototype.addGridOption = function(container)
input.style.display = (graph.isGridEnabled()) ? '' : 'none';
stepper.style.display = input.style.display;
+ ui.fireEvent(new mxEventObject('gridEnabledChanged'));
}, '#e0e0e0',
{
install: function(apply)
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index ffcc778a..9ad71ebd 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -1036,6 +1036,11 @@ Graph.prototype.defaultThemes = {};
Graph.prototype.baseUrl = ((window != window.top) ? document.referrer : document.location.toString()).split('#')[0];
/**
+ * Specifies if the label should be edited after an insert.
+ */
+Graph.prototype.editAfterInsert = false;
+
+/**
* Installs child layout styles.
*/
Graph.prototype.init = function(container)
@@ -1095,6 +1100,14 @@ Graph.prototype.init = function(container)
};
/**
+ * Sets the XML node for the current diagram.
+ */
+Graph.prototype.isLightboxView = function()
+{
+ return this.lightbox;
+};
+
+/**
* Installs automatic layout via styles
*/
Graph.prototype.labelLinkClicked = function(state, elt, evt)
@@ -1938,6 +1951,7 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
// var elbowValue = (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH) ? 'vertical' : 'horizontal';
// edge.style = mxUtils.setStyle(edge.style, 'edgeStyle', 'elbowEdgeStyle');
// edge.style = mxUtils.setStyle(edge.style, 'elbow', elbowValue);
+// edge.style = mxUtils.setStyle(edge.style, 'sourcePortConstraint', direction);
result.push(edge);
}
@@ -3071,6 +3085,9 @@ HoverIcons.prototype.drag = function(evt, x, y)
// Uses elbow edges with vertical or horizontal direction
// var direction = this.getDirection();
+// var es = this.graph.connectionHandler.edgeState;
+// es.cell.style = mxUtils.setStyle(es.cell.style, 'sourcePortConstraint', direction);
+// es.style['sourcePortConstraint'] = direction;
// var elbowValue = (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_SOUTH) ? 'vertical' : 'horizontal';
//
// var es = this.graph.connectionHandler.edgeState;
@@ -5113,9 +5130,9 @@ if (typeof mxVertexHandler != 'undefined')
// Places at same x-coord and 2 grid sizes below existing graph
var x = this.snap(Math.round(Math.max(pt.x, bds.x / view.scale - view.translate.x +
- ((bds.width == 0) ? this.gridSize : 0))));
+ ((bds.width == 0) ? 2 * this.gridSize : 0))));
var y = this.snap(Math.round(Math.max(pt.y, (bds.y + bds.height) / view.scale - view.translate.y +
- ((bds.height == 0) ? 1 : 2) * this.gridSize)));
+ 2 * this.gridSize)));
return new mxPoint(x, y);
};
diff --git a/src/main/webapp/js/mxgraph/Menus.js b/src/main/webapp/js/mxgraph/Menus.js
index 83970198..8c98fc61 100644
--- a/src/main/webapp/js/mxgraph/Menus.js
+++ b/src/main/webapp/js/mxgraph/Menus.js
@@ -510,13 +510,13 @@ Menus.prototype.get = function(name)
/**
* Adds the given submenu.
*/
-Menus.prototype.addSubmenu = function(name, menu, parent)
+Menus.prototype.addSubmenu = function(name, menu, parent, label)
{
var enabled = this.get(name).isEnabled();
-
+
if (menu.showDisabled || enabled)
{
- var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, enabled);
+ var submenu = menu.addItem(label || mxResources.get(name), null, null, parent, null, enabled);
this.addMenu(name, menu, submenu);
}
};
@@ -1118,17 +1118,19 @@ Menus.prototype.createMenubar = function(container)
/**
* Creates the keyboard event handler for the current graph and history.
*/
-Menus.prototype.menuCreated = function(menu, elt)
+Menus.prototype.menuCreated = function(menu, elt, className)
{
if (elt != null)
{
+ className = (className != null) ? className : 'geItem';
+
menu.addListener('stateChanged', function()
{
elt.enabled = menu.enabled;
if (!menu.enabled)
{
- elt.className = 'geItem mxDisabled';
+ elt.className = className + ' mxDisabled';
if (document.documentMode == 8)
{
@@ -1137,7 +1139,7 @@ Menus.prototype.menuCreated = function(menu, elt)
}
else
{
- elt.className = 'geItem';
+ elt.className = className;
if (document.documentMode == 8)
{
diff --git a/src/main/webapp/js/mxgraph/Sidebar.js b/src/main/webapp/js/mxgraph/Sidebar.js
index b04e2667..0ecdb96a 100644
--- a/src/main/webapp/js/mxgraph/Sidebar.js
+++ b/src/main/webapp/js/mxgraph/Sidebar.js
@@ -1610,7 +1610,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
var cell = new mxCell('Sub-Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
cell.vertex = true;
- var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;');
+ var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;outlineConnect=0;');
cell1.vertex = true;
cell1.geometry.relative = true;
cell1.geometry.offset = new mxPoint(-7, -14);
@@ -1623,7 +1623,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
var cell = new mxCell('Looped\nSub-Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1');
cell.vertex = true;
- var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=mxgraph.bpmn.loop;');
+ var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=mxgraph.bpmn.loop;outlineConnect=0;');
cell1.vertex = true;
cell1.geometry.relative = true;
cell1.geometry.offset = new mxPoint(-15, -14);
@@ -1642,7 +1642,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
var cell = new mxCell('Receive', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
cell.vertex = true;
- var cell1 = new mxCell('', new mxGeometry(0, 0, 20, 14), 'html=1;shape=message;');
+ var cell1 = new mxCell('', new mxGeometry(0, 0, 20, 14), 'html=1;shape=message;outlineConnect=0;');
cell1.vertex = true;
cell1.geometry.relative = true;
cell1.geometry.offset = new mxPoint(7, 7);
@@ -1655,13 +1655,13 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
var cell = new mxCell('User', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
cell.vertex = true;
- var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=mxgraph.bpmn.user_task;');
+ var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=mxgraph.bpmn.user_task;outlineConnect=0;');
cell1.vertex = true;
cell1.geometry.relative = true;
cell1.geometry.offset = new mxPoint(7, 7);
cell.insert(cell1);
- var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;');
+ var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;outlineConnect=0;');
cell2.vertex = true;
cell2.geometry.relative = true;
cell2.geometry.offset = new mxPoint(-7, -14);
@@ -1674,7 +1674,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
var cell = new mxCell('Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
cell.vertex = true;
- var cell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;');
+ var cell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;');
cell1.vertex = true;
cell1.geometry.relative = true;
cell1.geometry.offset = new mxPoint(-40, -15);
@@ -1687,7 +1687,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
var cell = new mxCell('Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
cell.vertex = true;
- var cell1 = new mxCell('', new mxGeometry(1, 0, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;');
+ var cell1 = new mxCell('', new mxGeometry(1, 0, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;outlineConnect=0;');
cell1.vertex = true;
cell1.geometry.relative = true;
cell1.geometry.offset = new mxPoint(-15, 10);
@@ -1697,11 +1697,11 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
}),
this.createVertexTemplateEntry('swimlane;html=1;horizontal=0;startSize=20;', 320, 240, 'Pool', 'Pool', null, null, 'bpmn pool'),
this.createVertexTemplateEntry('swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;', 300, 120, 'Lane', 'Lane', null, null, 'bpmn lane'),
- this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;', 60, 50, '', 'Conversation', null, null, 'bpmn conversation'),
- this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4', 60, 50, '', 'Call Conversation', null, null, 'bpmn call conversation'),
+ this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;rounded=0;', 60, 50, '', 'Conversation', null, null, 'bpmn conversation'),
+ this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4;rounded=0;', 60, 50, '', 'Call Conversation', null, null, 'bpmn call conversation'),
this.addEntry('bpmn subconversation sub conversation sub-conversation', function()
{
- var cell = new mxCell('', new mxGeometry(0, 0, 60, 50), 'shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;');
+ var cell = new mxCell('', new mxGeometry(0, 0, 60, 50), 'shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;rounded=0;');
cell.vertex = true;
var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;');
@@ -1717,13 +1717,13 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
var cell = new mxCell('', new mxGeometry(0, 0, 40, 60), 'shape=note;whiteSpace=wrap;size=16;html=1;');
cell.vertex = true;
- var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;');
+ var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;outlineConnect=0;');
cell1.vertex = true;
cell1.geometry.relative = true;
cell1.geometry.offset = new mxPoint(2, 2);
cell.insert(cell1);
- var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;whiteSpace=wrap;shape=parallelMarker;');
+ var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;whiteSpace=wrap;shape=parallelMarker;outlineConnect=0;');
cell2.vertex = true;
cell2.geometry.relative = true;
cell2.geometry.offset = new mxPoint(-7, -14);
@@ -1732,19 +1732,19 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Data Object');
}),
this.createVertexTemplateEntry('shape=datastore;whiteSpace=wrap;html=1;', 60, 60, '', 'Data Store', null, null, 'bpmn data store'),
- this.createVertexTemplateEntry('shape=plus;html=1;', 14, 14, '', 'Sub-Process Marker', null, null, 'bpmn subprocess sub process sub-process marker'),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.loop;html=1;', 14, 14, '', 'Loop Marker', null, null, 'bpmn loop marker'),
- this.createVertexTemplateEntry('shape=parallelMarker;html=1;', 14, 14, '', 'Parallel MI Marker', null, null, 'bpmn parallel mi marker'),
- this.createVertexTemplateEntry('shape=parallelMarker;direction=south;html=1;', 14, 14, '', 'Sequential MI Marker', null, null, 'bpmn sequential mi marker'),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;', 14, 14, '', 'Ad Hoc Marker', null, null, 'bpmn ad hoc marker'),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.compensation;html=1;', 14, 14, '', 'Compensation Marker', null, null, 'bpmn compensation marker'),
- this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;', 40, 30, '', 'Send Task', null, null, 'bpmn send task'),
- this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;', 40, 30, '', 'Receive Task', null, null, 'bpmn receive task'),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.user_task;html=1;', 14, 14, '', 'User Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.manual_task;html=1;', 14, 14, '', 'Manual Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.business_rule_task;html=1;', 14, 14, '', 'Business Rule Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'business_rule_task').join(' ')),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.service_task;html=1;', 14, 14, '', 'Service Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'service_task').join(' ')),
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.script_task;html=1;', 14, 14, '', 'Script Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'script_task').join(' ')),
+ this.createVertexTemplateEntry('shape=plus;html=1;outlineConnect=0;', 14, 14, '', 'Sub-Process Marker', null, null, 'bpmn subprocess sub process sub-process marker'),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.loop;html=1;outlineConnect=0;', 14, 14, '', 'Loop Marker', null, null, 'bpmn loop marker'),
+ this.createVertexTemplateEntry('shape=parallelMarker;html=1;outlineConnect=0;', 14, 14, '', 'Parallel MI Marker', null, null, 'bpmn parallel mi marker'),
+ this.createVertexTemplateEntry('shape=parallelMarker;direction=south;html=1;outlineConnect=0;', 14, 14, '', 'Sequential MI Marker', null, null, 'bpmn sequential mi marker'),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;outlineConnect=0;', 14, 14, '', 'Ad Hoc Marker', null, null, 'bpmn ad hoc marker'),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.compensation;html=1;outlineConnect=0;', 14, 14, '', 'Compensation Marker', null, null, 'bpmn compensation marker'),
+ this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;outlineConnect=0;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;', 40, 30, '', 'Send Task', null, null, 'bpmn send task'),
+ this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;outlineConnect=0;', 40, 30, '', 'Receive Task', null, null, 'bpmn receive task'),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.user_task;html=1;outlineConnect=0;', 14, 14, '', 'User Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.manual_task;html=1;outlineConnect=0;', 14, 14, '', 'Manual Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.business_rule_task;html=1;outlineConnect=0;', 14, 14, '', 'Business Rule Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'business_rule_task').join(' ')),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.service_task;html=1;outlineConnect=0;', 14, 14, '', 'Service Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'service_task').join(' ')),
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.script_task;html=1;outlineConnect=0;', 14, 14, '', 'Script Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'script_task').join(' ')),
this.createVertexTemplateEntry('html=1;shape=mxgraph.flowchart.annotation_2;align=left;', 50, 100, '', 'Annotation', null, null, this.getTagsForStencil('bpmn', 'annotation_1', 'bpmn business process model ').join(' ')),
this.createVertexTemplateEntry('rounded=1;arcSize=10;dashed=1;strokeColor=#000000;fillColor=none;gradientColor=none;dashPattern=8 3 1 3;strokeWidth=2;',
200, 200, '', 'Group', null, null, this.getTagsForStencil('bpmn', 'group', 'bpmn business process model ').join(' ')),
@@ -1760,9 +1760,8 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
edge.geometry.relative = true;
edge.edge = true;
- var cell = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message;html=1;');
+ var cell = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message;html=1;outlineConnect=0;');
cell.geometry.relative = true;
- cell.setConnectable(false);
cell.vertex = true;
cell.geometry.offset = new mxPoint(-10, -7);
edge.insert(cell);
@@ -2015,9 +2014,18 @@ Sidebar.prototype.createDropHandler = function(cells, allowSplit, allowCellsInse
{
allowCellsInserted = (allowCellsInserted != null) ? allowCellsInserted : true;
- return mxUtils.bind(this, function(graph, evt, target, x, y)
+ return mxUtils.bind(this, function(graph, evt, target, x, y, force)
{
- if (graph.isEnabled())
+ var elt = (force) ? null : ((mxEvent.isTouchEvent(evt) || mxEvent.isPenEvent(evt)) ?
+ document.elementFromPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)) :
+ mxEvent.getSource(evt));
+
+ while (elt != null && elt != this.container)
+ {
+ elt = elt.parentNode;
+ }
+
+ if (elt == null && graph.isEnabled())
{
cells = graph.getImportableCells(cells);
@@ -2090,6 +2098,15 @@ Sidebar.prototype.createDropHandler = function(cells, allowSplit, allowCellsInse
graph.scrollCellToVisible(select[0]);
graph.setSelectionCells(select);
}
+
+ if (graph.editAfterInsert && evt != null && mxEvent.isMouseEvent(evt) &&
+ select != null && select.length == 1)
+ {
+ window.setTimeout(function()
+ {
+ graph.startEditing(select[0]);
+ }, 0);
+ }
}
}
@@ -2114,7 +2131,7 @@ Sidebar.prototype.createDragPreview = function(width, height)
/**
* Creates a drag source for the given element.
*/
-Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCellIndex)
+Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCellIndex, evt)
{
var geo = this.getDropAndConnectGeometry(source, targets[dropCellIndex], direction, targets);
@@ -2124,6 +2141,7 @@ Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCell
if (geo != null)
{
var graph = this.editorUi.editor.graph;
+ var editingCell = null;
graph.model.beginUpdate();
try
@@ -2218,6 +2236,7 @@ Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCell
graph.model.setGeometry(targets[dropCellIndex], geo);
graph.cellsMoved(targets, dx, dy, null, null, true);
tmp = targets.slice();
+ editingCell = (tmp.length == 1) ? tmp[0] : null;
targets.push(graph.insertEdge(null, null, '', source, targets[dropCellIndex],
graph.createCurrentEdgeStyle()));
}
@@ -2228,6 +2247,15 @@ Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCell
{
graph.model.endUpdate();
}
+
+ if (graph.editAfterInsert && evt != null && mxEvent.isMouseEvent(evt) &&
+ editingCell != null)
+ {
+ window.setTimeout(function()
+ {
+ graph.startEditing(editingCell);
+ }, 0);
+ }
}
return tmp;
@@ -2431,7 +2459,7 @@ Sidebar.prototype.createDragSource = function(elt, dropHandler, preview, cells,
else if (cells != null && activeArrow != null && currentTargetState != null && activeArrow != styleTarget)
{
var index = (graph.model.isEdge(currentTargetState.cell) || freeSourceEdge == null) ? firstVertex : freeSourceEdge;
- graph.setSelectionCells(this.dropAndConnect(currentTargetState.cell, cells, direction, index));
+ graph.setSelectionCells(this.dropAndConnect(currentTargetState.cell, cells, direction, index, evt));
}
else
{
@@ -3081,6 +3109,7 @@ Sidebar.prototype.createDragSource = function(elt, dropHandler, preview, cells,
Sidebar.prototype.itemClicked = function(cells, ds, evt, elt)
{
var graph = this.editorUi.editor.graph;
+ graph.container.focus();
// Alt+Click inserts and connects
if (mxEvent.isAltDown(evt))
@@ -3101,7 +3130,8 @@ Sidebar.prototype.itemClicked = function(cells, ds, evt, elt)
{
graph.setSelectionCells(this.dropAndConnect(graph.getSelectionCell(), cells, (mxEvent.isMetaDown(evt) || mxEvent.isControlDown(evt)) ?
(mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_WEST : mxConstants.DIRECTION_NORTH) :
- (mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_EAST : mxConstants.DIRECTION_SOUTH), firstVertex));
+ (mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_EAST : mxConstants.DIRECTION_SOUTH),
+ firstVertex, evt));
graph.scrollCellToVisible(graph.getSelectionCell());
}
}
@@ -3115,7 +3145,7 @@ Sidebar.prototype.itemClicked = function(cells, ds, evt, elt)
else
{
var pt = graph.getFreeInsertPoint();
- ds.drop(graph, evt, null, pt.x, pt.y);
+ ds.drop(graph, evt, null, pt.x, pt.y, true);
if (this.editorUi.hoverIcons != null && (mxEvent.isTouchEvent(evt) || mxEvent.isPenEvent(evt)))
{
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index cd749d2e..092d5c66 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.5.15",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),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:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1550,9 +1550,9 @@ function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel
null);return a}}};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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,c){c=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" version="1.1">'+c+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(c):Base64.encode(c,!0)),a,b)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
-Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
+Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,e=!0,f=null,g=mxUtils.bind(this,function(a){e=!0;f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),h=mxUtils.bind(this,function(a){e=e&&null!=f&&Math.abs(f.x-mxEvent.getClientX(a))<b&&Math.abs(f.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(e)for(var d=mxEvent.getSource(b);null!=
-d&&d!=c.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(c.node,g,h,k);mxEvent.addListener(c.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+d&&d!=c.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(c.node,g,h,k);mxEvent.addListener(c.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,b,c){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)&&mxEvent.isLeftMouseButton(c)&&!mxEvent.isPopupTrigger(c)||mxEvent.isTouchEvent(c)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(c)}};
Graph.prototype.openLink=function(a,b){var c=window;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 d=a.split("#")[1];window.location.hash=="#"+d&&(window.location.hash="");window.location.hash=d}else c=window.open(a,b);return c};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,b){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",b))};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)};
@@ -1674,7 +1674,7 @@ arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0
for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?
this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,
a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,
-b.x/a.scale-a.translate.x+(0==b.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+(0==b.height?1:2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
+b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=
!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-
e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};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.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 8555954d..05ee670a 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -104,7 +104,7 @@ window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Ba
ko:"한국어",ja:"日本語",zh:"中文(中国)","zh-tw":"中文(台灣)"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}return a}();
function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL="https://log.draw.io"))})();
-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");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";
+if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");"min"==uiTheme&&(urlParams.toolbar="0");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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.9.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
@@ -272,7 +272,7 @@ g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume
mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.buttons.appendChild(this.closeImg);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",a));this.destroyOnClose?this.destroy():
this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
mxWindow.prototype.isVisible=function(){return null!=this.div?"none"!=this.div.style.display:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
-mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.show=function(){this.div.style.display="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_QUIRKS||"auto"!=a.overflow&&null==this.resize||"none"==this.contentWrapper.style.display||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
mxForm.prototype.addText=function(a,b,c){var d=document.createElement("input");d.setAttribute("type",c||"text");d.value=b;return this.addField(a,d)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
@@ -282,22 +282,23 @@ function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=windo
mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}));mxEvent.addListener(a,"dragstart",function(a){mxEvent.consume(a)});this.eventConsumer=function(a,b){var c=b.getProperty("eventName"),d=b.getProperty("event");c!=mxEvent.MOUSE_DOWN&&d.consume()}}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;
mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;
-mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
+mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.checkEventSource=!0;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};
mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c,d){return a.getCellAt(b,c)};mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};mxDragSource.prototype.isActive=function(){return null!=this.mouseMoveHandler};
mxDragSource.prototype.reset=function(){null!=this.currentGraph&&(this.dragExit(this.currentGraph),this.currentGraph=null);this.removeDragElement();this.removeListeners();this.stopDrag()};
mxDragSource.prototype.mouseDown=function(a){this.enabled&&!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))};
-mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
-mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);this.checkEventSource&&mxClient.IS_SVG&&(this.dragElement.style.pointerEvents="none")};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
+mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.getElementForEvent=function(a){return mxEvent.isTouchEvent(a)||mxEvent.isPenEvent(a)?document.elementFromPoint(mxEvent.getClientX(a),mxEvent.getClientY(a)):mxEvent.getSource(a)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin(),g=this.getElementForEvent(b);if(this.checkEventSource)for(;null!=g&&g!=a.container;)g=g.parentNode;return null!=g&&c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null==b||this.graphContainsEvent(b,a)||(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility=
"hidden");else{var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}mxEvent.consume(a)};
mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)};
mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null};
-mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)};
-mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents="none");this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,
+this.eventConsumer)};mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x-a.panDx,c=mxEvent.getClientY(b)-c.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c,b),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==
this.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,
g=a.view.translate,k=a.gridSize/2,e=(a.snap(e/d-g.x-k)+g.x)*d,c=(a.snap(c/d-g.y-k)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};
-mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler.apply(this,arguments);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),k=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
g.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
@@ -1948,7 +1949,7 @@ b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rg
0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=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=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),y=!1,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);p()},jscolor.addEvent(u,"keyup",
q),jscolor.addEvent(u,"input",q),jscolor.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:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}jscolor.requireImage("cross.gif");jscolor.requireImage("arrow.gif");this.importColor()}};jscolor.install();
-Editor=function(a,b,e,c,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=k?k:!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,e,c,h){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=h?h:!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,c){var b=null!=c?c.getProperty("edit"):null;null!=b&&b.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.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+
@@ -1967,27 +1968,28 @@ Editor.closeLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCA
Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAgVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9d3yJTAAAAKnRSTlMA+hzi3nRQWyXzkm0h2j3u54gzEgSXjlYoTBgJxL2loGpAOS3Jt7Wxm35Ga7gRAAAA6UlEQVQ4y63Q2XaCMBSF4Q0JBasoQ5DJqbXjfv8HbCK2BZNwo/8FXHx7rcMC7lQu0iX8qU/qtvAWCpoqH8dYzS0SwaV5eK/UAf8X9pd2CWKzuF5Jrftp1owXwnIGLUaL3PYndOHf4kNNXWrXK/m7CHunk7K8LE6YtBpcknwG9GKxnroY+ylBXcx4xKyx/u/EuXi509cP9V7OO1oyHnzrdFTcqLG/4ibBA5pIMr/4xvKzuQDkVy9wW8SgBFD6HDvuzMvrZcC9QlkfMzI7w64m+b4PqBMNHB05lH21PVxJo2/fBXxV4hB38PcD+5AkI4FuETsAAAAASUVORK5CYII=";
Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFZJREFUOMvdkskRgDAMA4lDwg2B7b9XOlge/KKvdsa25KFb5XlRvxXC/DNBEv8IFNjBgGdDgXtFgTyhwDXiQAUHCvwa4Uv6mR6UR+1led2mVonvl+tML45qCQNQLIx7AAAAAElFTkSuQmCC";Editor.nextLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFRJREFUOMvd0skRgCAQBVEFwQ0V7fxzNQP6wI05v6pZ/kyj1b7FNgik2gQzzLcAwiUAigHOTwDHK4A1CmB5BJANJG1hQ9qafYcqFlZP3IFc9eVGrR+iIgkDQRUXIAAAAABJRU5ErkJggg==";
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";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.init=function(){};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 e=null!=b?"?title="+encodeURIComponent(b):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){"ready"==c.data&&c.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"))):
-this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
-Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.chromeless||"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=this.graph.defaultGraphBackground;this.graph.pageScale=
-mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.chromeless||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled="0"!=
-a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var b=a.getAttribute("pageScale");this.graph.pageScale=null!=b?b:mxGraph.prototype.pageScale;this.graph.lightbox?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=null!=b?"0"!=b:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
+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.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 e=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){"ready"==c.data&&c.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+
+(0<e.length?"&":"?")+"client=1"))):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
+Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!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=this.graph.defaultGraphBackground;
+this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)};
+Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled=
+"0"!=a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var b=a.getAttribute("pageScale");this.graph.pageScale=null!=b?b:mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=null!=b?"0"!=b:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=
this.graph.pageBreaksVisible;var b=a.getAttribute("pageWidth"),e=a.getAttribute("pageHeight");null!=b&&null!=e&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(b),parseFloat(e)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var e=b.document.createElement("mxGraphModel");e.appendChild(a);b.decode(e,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
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":"hidden",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,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],t=0;t<e.length;t++)(k.isVertex(e[t])||k.isEdge(e[t]))&&null!=a.view.getState(e[t])&&
-q.push(e[t]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),h=a.getModel(),q=[],u=0;u<e.length;u++)(h.isVertex(e[u])||h.isEdge(e[u]))&&null!=a.view.getState(e[u])&&
+q.push(e[u]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);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,e,c,k,l,n,q){var t=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(t=80);e+=t;c+=t;var d=e,h=c,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((f-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,f-64);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=f+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var g=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=g.x+"px";this.bg.style.top=g.y+"px";p+=g.x;m+=g.y;k&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");k=this.getPosition(p,m,
-e,c);p=k.x;m=k.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=p+"px";w.style.top=m+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=m+14+"px",l.style.left=p+e+38-t+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",
-mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){f=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=f+"px";p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((f-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
-Math.min(h,f-64);var g=this.getPosition(p,m,e,c);p=g.x;m=g.y;w.style.left=p+"px";w.style.top=m+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=p+e+38-t+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+function Dialog(a,b,e,c,h,m,p,q){var u=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(u=80);e+=u;c+=u;var d=e,g=c,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),t=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),n=Math.max(1,Math.round((f-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,f-64);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=f+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var l=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=l.x+"px";this.bg.style.top=l.y+"px";t+=l.x;n+=l.y;h&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");h=this.getPosition(t,n,
+e,c);t=h.x;n=h.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=t+"px";w.style.top=n+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=n+14+"px",m.style.left=t+e+38-u+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",
+mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){f=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=f+"px";t=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));n=Math.max(1,Math.round((f-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
+Math.min(g,f-64);var k=this.getPosition(t,n,e,c);t=k.x;n=k.y;w.style.left=t+"px";w.style.top=n+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=n+14+"px",this.dialogImg.style.left=t+e+38-u+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
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";
@@ -1998,30 +2000,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
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){null!=this.onDialogClose&&(this.onDialogClose(a),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 PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,p=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var r=q.checked?1:parseInt(h.value);isNaN(r)||(m=mxUtils.getScaleForPageCount(r,e,p))}e.getGraphBounds();var k=r=0,p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*b);p.height=Math.ceil(p.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),r-=b.x*p.width,k-=b.y*p.height):
-c=!0;c=PrintDialog.createPrintPreview(e,m,p,0,r,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage"));
-k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(k);n.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t,
-"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var h=document.createElement("input");h.setAttribute("value","1");h.setAttribute("type","number");h.setAttribute("min","1");h.setAttribute("size","4");h.setAttribute("disabled","disabled");h.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(h);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);n.appendChild(c);mxEvent.addListener(d,"change",
-function(){d.checked?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled");q.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);c.appendChild(k);n.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";k.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst||
-k.appendChild(t);c.appendChild(k);n.appendChild(c);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,e,c,k,l,n){b=new mxPrintPreview(a,b,e,c,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.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.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(c){var t=q.checked?1:parseInt(g.value);isNaN(t)||(n=mxUtils.getScaleForPageCount(t,e,k))}e.getGraphBounds();var h=t=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*b);k.height=Math.ceil(k.height*b);n*=b;!c&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*k.width,h-=b.y*k.height):
+c=!0;c=PrintDialog.createPrintPreview(e,n,k,0,t,h,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,h,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+h.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(h);p.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(d);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");h.appendChild(u);mxEvent.addListener(u,
+"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(h);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(g);mxUtils.write(h," "+mxResources.get("pages")+" (max)");c.appendChild(h);p.appendChild(c);mxEvent.addListener(d,"change",
+function(){d.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!d.checked});c=c.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");c.appendChild(h);h=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";h.appendChild(f);c.appendChild(h);p.appendChild(c);c=document.createElement("tr");h=document.createElement("td");h.colSpan=2;
+h.style.paddingTop="20px";h.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&h.appendChild(u);if(PrintDialog.previewEnabled){var t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});t.className="geBtn";h.appendChild(t)}t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});t.className="geBtn gePrimaryBtn";h.appendChild(t);a.editor.cancelFirst||
+h.appendChild(u);c.appendChild(h);p.appendChild(c);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,e,c,h,m,p){b=new mxPrintPreview(a,b,e,c,h,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 q=b.writeHead;b.writeHead=function(a){q.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==h||h==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=h,d.style.backgroundImage="")}function e(){null==m?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",m.src),p.style.fontSize="11px",p.innerHTML=m.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,n=document.createElement("table");n.style.width=
-"100%";n.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
-mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var h=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(h||"none",function(a){h=a;b()});mxEvent.consume(d)});
-l.appendChild(d);mxUtils.write(l,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();l.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
-":");k.appendChild(l);l=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var m=c.backgroundImage;mxEvent.addListener(p,"click",function(d){a.showBackgroundImageDialog(function(a){m=a;e()});mxEvent.consume(d)});e();l.appendChild(p);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var g=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var d=new ChangePageSetup(a,h,m,t.get());d.ignoreColor=c.background==h;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=m?m.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
-d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";l.appendChild(w);a.editor.cancelFirst||l.appendChild(g);k.appendChild(l);q.appendChild(k);n.appendChild(q);this.container=n};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,c){if(c||f!=document.activeElement&&p!=document.activeElement){a=!1;for(d=0;d<g.length;d++)c=g[d],r?"custom"==c.key&&(q.value=c.key,r=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
-e.height==c.format.height?(q.value=c.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(q.value=c.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,a=n.checked=!0));a?(t.style.display="",h.style.display="none"):(f.value=e.width/100,p.value=e.height/100,l.setAttribute("checked","checked"),
-q.value="custom",t.style.display="none",h.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft="4px";t.style.width="210px";
-t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);n.style.marginLeft="10px";n.style.marginRight="6px";t.appendChild(n);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));t.appendChild(d);var h=document.createElement("div");h.style.marginLeft="4px";h.style.width="210px";h.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";h.appendChild(f);mxUtils.write(h," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";h.appendChild(p);mxUtils.write(h," in");t.style.display="none";h.style.display="none";for(var m={},g=PageSetupDialog.getFormats(),w=0;w<g.length;w++){var u=g[w];m[u.key]=u;var v=document.createElement("option");v.setAttribute("value",u.key);mxUtils.write(v,u.title);q.appendChild(v)}var r=!1;k();a.appendChild(q);mxUtils.br(a);
-a.appendChild(t);a.appendChild(h);var z=e,A=function(a,d){var b=m[q.value];null!=b.format?(f.value=b.format.width/100,p.value=b.format.height/100,h.style.display="none",t.style.display=""):(t.style.display="none",h.style.display="");isNaN(parseFloat(f.value))&&(f.value=e.width/100);isNaN(parseFloat(p.value))&&(p.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(p.value)));"custom"!=q.value&&n.checked&&(b=new mxRectangle(0,0,b.height,b.width));
-d&&r||b.width==z.width&&b.height==z.height||(z=b,null!=c&&c(z))};mxEvent.addListener(b,"click",function(a){l.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){n.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",A);mxEvent.addListener(f,"click",A);mxEvent.addListener(p,"blur",A);mxEvent.addListener(p,"click",A);mxEvent.addListener(n,"change",A);mxEvent.addListener(l,"change",A);mxEvent.addListener(q,"change",function(a){r="custom"==q.value;A(a,!0)});A();
-return{set:function(a){e=a;k(null,null,!0)},get:function(){return z},widthInput:f,heightInput:p}};
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=g,d.style.backgroundImage="")}function e(){null==n?(t.removeAttribute("title"),t.style.fontSize="",t.innerHTML=mxResources.get("change")+"..."):(t.setAttribute("title",n.src),t.style.fontSize="11px",t.innerHTML=n.src.substring(0,42)+"...")}var c=a.editor.graph,h,m,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var q=document.createElement("tbody");h=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");h.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",c.pageFormat);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");
+mxUtils.write(m,mxResources.get("background")+":");h.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var g=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(d)});
+m.appendChild(d);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
+":");h.appendChild(m);m=document.createElement("td");var t=document.createElement("a");t.style.textDecoration="underline";t.style.cursor="pointer";t.style.color="#a0a0a0";var n=c.backgroundImage;mxEvent.addListener(t,"click",function(d){a.showBackgroundImageDialog(function(a){n=a;e()});mxEvent.consume(d)});e();m.appendChild(t);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var l=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&m.appendChild(l);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var d=new ChangePageSetup(a,g,n,u.get());d.ignoreColor=c.background==g;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=n?n.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
+d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";m.appendChild(w);a.editor.cancelFirst||m.appendChild(l);h.appendChild(m);q.appendChild(h);p.appendChild(q);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function h(a,d,c){if(c||f!=document.activeElement&&t!=document.activeElement){a=!1;for(d=0;d<l.length;d++)c=l[d],r?"custom"==c.key&&(q.value=c.key,r=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
+e.height==c.format.height?(q.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(q.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",g.style.display="none"):(f.value=e.width/100,t.value=e.height/100,m.setAttribute("checked","checked"),
+q.value="custom",u.style.display="none",g.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 q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
+u.style.height="24px";m.style.marginRight="6px";u.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";u.appendChild(p);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));u.appendChild(d);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var f=document.createElement("input");
+f.setAttribute("size","7");f.style.textAlign="right";g.appendChild(f);mxUtils.write(g," in x ");var t=document.createElement("input");t.setAttribute("size","7");t.style.textAlign="right";g.appendChild(t);mxUtils.write(g," in");u.style.display="none";g.style.display="none";for(var n={},l=PageSetupDialog.getFormats(),w=0;w<l.length;w++){var k=l[w];n[k.key]=k;var v=document.createElement("option");v.setAttribute("value",k.key);mxUtils.write(v,k.title);q.appendChild(v)}var r=!1;h();a.appendChild(q);mxUtils.br(a);
+a.appendChild(u);a.appendChild(g);var E=e,G=function(a,d){var b=n[q.value];null!=b.format?(f.value=b.format.width/100,t.value=b.format.height/100,g.style.display="none",u.style.display=""):(u.style.display="none",g.style.display="");isNaN(parseFloat(f.value))&&(f.value=e.width/100);isNaN(parseFloat(t.value))&&(t.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(t.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,b.height,b.width));
+d&&r||b.width==E.width&&b.height==E.height||(E=b,null!=c&&c(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;G(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){p.checked=!0;G(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",G);mxEvent.addListener(f,"click",G);mxEvent.addListener(t,"blur",G);mxEvent.addListener(t,"click",G);mxEvent.addListener(p,"change",G);mxEvent.addListener(m,"change",G);mxEvent.addListener(q,"change",function(a){r="custom"==q.value;G(a,!0)});G();
+return{set:function(a){e=a;h(null,null,!0)},get:function(){return E},widthInput:f,heightInput:t}};
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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{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:"custom",title:mxResources.get("custom"),format:null}]};
(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 d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2031,33 +2033,33 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
b="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-d,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-e,f))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
c,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=c,d.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var d=this.gridSteps*c,b=[],f=1;f<this.gridSteps;f++){var e=f*c;b.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+
d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" 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(c,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
-this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var h=this.gridSize*this.view.scale*this.view.gridSteps,h=-Math.round(h-mxUtils.mod(this.view.translate.x*this.view.scale+c,h))+"px "+-Math.round(h-mxUtils.mod(this.view.translate.y*this.view.scale+b,h))+"px";d.style.backgroundPosition=h}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,f=this.view.translate,e=this.pageFormat,m=b*this.pageScale,g=this.view.getBackgroundPageBounds();c=g.width;d=g.height;var k=
-new mxRectangle(b*f.x,b*f.y,e.width*m,e.height*m),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(d/k.height)-1:0,v=a?Math.ceil(c/k.width)-1:0,r=g.x+c,q=g.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:v,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(c+1)*k.height)),
-new mxPoint(Math.round(r),Math.round(g.y+(c+1)*k.height))]:[new mxPoint(Math.round(g.x+(c+1)*k.width),Math.round(g.y)),new mxPoint(Math.round(g.x+(c+1)*k.width),Math.round(q))];null!=a[c]?(a[c].points=b,a[c].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[c]=b)}for(c=d;c<a.length;c++)a[c].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var h=0;h<c.length;h++)if(this.graph.getModel().isVertex(c[h])){var f=this.graph.getCellGeometry(c[h]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,d){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,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,f=this.graph.pageScale,e=b.width*f,b=b.height*f,f=Math.floor(Math.min(0,c)/e),m=Math.floor(Math.min(0,
-d)/b);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+m*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-f)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-m)*b)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.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=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,d,b,f,e){var h=k.apply(this,arguments);null==e||e||mxEvent.addListener(h,"mousedown",function(a){mxEvent.consume(a)});return h};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),f=c.getParent(b);
-if(null==d||d!=b&&d!=f)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(f)&&c.isVertex(f)&&!this.graph.isContainer(f);)b=f,f=this.graph.getModel().getParent(b);return b};var n=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=n.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),f=b.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&b.isVertex(f)){d=!0;break}f=b.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed=
+this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+c,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+b,g))+"px";d.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,f=this.view.translate,e=this.pageFormat,n=b*this.pageScale,l=this.view.getBackgroundPageBounds();c=l.width;d=l.height;var w=
+new mxRectangle(b*f.x,b*f.y,e.width*n,e.height*n),k=(a=a&&Math.min(w.width,w.height)>this.minPageBreakDist)?Math.ceil(d/w.height)-1:0,v=a?Math.ceil(c/w.width)-1:0,r=l.x+c,h=l.y+d;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:v,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(c+1)*w.height)),
+new mxPoint(Math.round(r),Math.round(l.y+(c+1)*w.height))]:[new mxPoint(Math.round(l.x+(c+1)*w.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(c+1)*w.width),Math.round(h))];null!=a[c]?(a[c].points=b,a[c].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[c]=b)}for(c=d;c<a.length;c++)a[c].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var g=0;g<c.length;g++)if(this.graph.getModel().isVertex(c[g])){var f=this.graph.getCellGeometry(c[g]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,d){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,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,f=this.graph.pageScale,e=b.width*f,b=b.height*f,f=Math.floor(Math.min(0,c)/e),n=Math.floor(Math.min(0,
+d)/b);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+n*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-f)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-n)*b)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.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=b+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,d,b,f,e){var g=h.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=m.apply(this,arguments),f=c.getParent(b);
+if(null==d||d!=b&&d!=f)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(f)&&c.isVertex(f)&&!this.graph.isContainer(f);)b=f,f=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=p.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),f=b.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&b.isVertex(f)){d=!0;break}f=b.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();null==c&&(c=this.cell);var d=this.graph.view.getState(c);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),b=d.getParent(c);!this.graph.isCellSelected(b)&&d.isVertex(b);)c=b,b=d.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),d=c.getParent(a);c.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&&
(a=d),d=c.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var c=this.editor.graph;c.lightbox=e;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,c.isEnabled=function(){return!1},c.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
-k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var d=mxEvent.getSource(a);
-if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
-mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,n=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||n.apply(this,arguments)};this.keydownHandler=
-mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return t.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 d=!1,h=null,f=null,p=null,m=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var g=0;g<p.length;g++)this.toolbar.container.appendChild(p[g]);this.toolbar.fontMenu=h;this.toolbar.sizeMenu=
-f}d=c.cellEditor.isContentEditing();h=a;f=e;p=b}}),g=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this,arguments);m();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=g.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
-b.substring(0,b.length-1));g.toolbar.setFontName(b);g.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var u=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){u.apply(this,arguments);m()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";
-if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(D){}var v=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,c){this.menus.createPopupMenu(a,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],h=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),h.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],p=0;p<e.length;p++){var g=e[p],
-m=g.indexOf("=");0<=m&&(f=g.substring(0,m),g=g.substring(m+1),null!=a[f]&&"none"==g&&(b.push(g),h.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",h,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var A=
-["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)r.push(F[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(r,z[a])&&r.push(z[a]);var y=function(a,d){var b=c.getModel();b.beginUpdate();
-try{if(d)for(var f=b.isEdge(p),h=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var g=h[f[e]];null!=g&&c.setCellStyles(f[e],g,a)}else for(g=0;g<a.length;g++){for(var p=a[g],m=b.getStyle(p),u=null!=m?m.split(";"):[],O=r.slice(),e=0;e<u.length;e++){var v=u[e],k=v.indexOf("=");if(0<=k){var w=v.substring(0,k),q=mxUtils.indexOf(O,w);0<=q&&O.splice(q,1);for(var x=0;x<F.length;x++){var l=F[x];if(0<=mxUtils.indexOf(l,w))for(var n=0;n<l.length;n++){var A=
-mxUtils.indexOf(O,l[n]);0<=A&&O.splice(A,1)}}}}for(var h=(f=b.isEdge(p))?c.currentEdgeStyle:c.currentVertexStyle,t=b.getStyle(p),e=0;e<O.length;e++){var w=O[e],D=h[w];null==D||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(z,w))||(t=mxUtils.setStyle(t,w,D))}b.setStyle(p,t)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){y(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){y(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=
-[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));y(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,h=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(h=c.getModel().isEdge(b[e])||h)||!f);e++);else h=f=!0;for(var b=d.getProperty("keys"),g=d.getProperty("values"),e=0;e<b.length;e++){var p=0<=mxUtils.indexOf(A,b[e]);if("strokeColor"!=b[e]||null!=g[e]&&"none"!=g[e])if(0<=mxUtils.indexOf(z,
-b[e]))h||0<=mxUtils.indexOf(x,b[e])?null==g[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=g[e]:f&&0<=mxUtils.indexOf(r,b[e])&&(null==g[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=g[e]);else if(0<=mxUtils.indexOf(r,b[e])){if(f||p)null==g[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=g[e];if(h||p||0<=mxUtils.indexOf(x,b[e]))null==g[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=g[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||
+this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,c.isEnabled=function(){return!1},c.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var h=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=h,this.menubarContainer.onmousedown=
+h,this.toolbarContainer.onselectstart=h,this.toolbarContainer.onmousedown=h,this.diagramContainer.onselectstart=h,this.diagramContainer.onmousedown=h,this.sidebarContainer.onselectstart=h,this.sidebarContainer.onmousedown=h,this.formatContainer.onselectstart=h,this.formatContainer.onmousedown=h,this.footerContainer.onselectstart=h,this.footerContainer.onmousedown=h,null!=this.tabContainer&&(this.tabContainer.onselectstart=h));!this.editor.chromeless||this.editor.editable?(b=function(a){var d=mxEvent.getSource(a);
+if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}return h(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
+mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return m||p.apply(this,arguments)};this.keydownHandler=
+mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
+function(a){return q.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return u.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 d=!1,g=null,f=null,t=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var k=0;k<t.length;k++)this.toolbar.container.appendChild(t[k]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
+f}d=c.cellEditor.isContentEditing();g=a;f=e;t=b}}),l=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this,arguments);n();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=l.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+b.substring(0,b.length-1));l.toolbar.setFontName(b);l.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var k=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){k.apply(this,arguments);n()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";
+if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(y){}var v=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,c){this.menus.createPopupMenu(a,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),E="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],g=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),g.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],k=0;k<e.length;k++){var n=e[k],
+l=n.indexOf("=");0<=l&&(f=n.substring(0,l),n=n.substring(l+1),null!=a[f]&&"none"==n&&(b.push(n),g.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=
+["fontFamily","fontSize","fontColor"],H="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<C.length;a++)for(b=0;b<C[a].length;b++)r.push(C[a][b]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(r,E[a])&&r.push(E[a]);var x=function(a,d){var b=c.getModel();
+b.beginUpdate();try{if(d)for(var f=b.isEdge(n),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var k=g[f[e]];null!=k&&c.setCellStyles(f[e],k,a)}else for(k=0;k<a.length;k++){for(var n=a[k],l=b.getStyle(n),t=null!=l?l.split(";"):[],Q=r.slice(),e=0;e<t.length;e++){var v=t[e],w=v.indexOf("=");if(0<=w){var h=v.substring(0,w),H=mxUtils.indexOf(Q,h);0<=H&&Q.splice(H,1);for(var q=0;q<C.length;q++){var m=C[q];if(0<=mxUtils.indexOf(m,h))for(var p=0;p<
+m.length;p++){var G=mxUtils.indexOf(Q,m[p]);0<=G&&Q.splice(G,1)}}}}for(var g=(f=b.isEdge(n))?c.currentEdgeStyle:c.currentVertexStyle,u=b.getStyle(n),e=0;e<Q.length;e++){var h=Q[e],y=g[h];null==y||"shape"==h&&!f||f&&!(0>mxUtils.indexOf(E,h))||(u=mxUtils.setStyle(u,h,y))}b.setStyle(n,u)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){x(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){x(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));x(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),k=d.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(G,b[e]);if("strokeColor"!=b[e]||null!=k[e]&&"none"!=
+k[e])if(0<=mxUtils.indexOf(E,b[e]))g||0<=mxUtils.indexOf(H,b[e])?null==k[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=k[e]:f&&0<=mxUtils.indexOf(r,b[e])&&(null==k[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=k[e]);else if(0<=mxUtils.indexOf(r,b[e])){if(f||n)null==k[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=k[e];if(g||n||0<=mxUtils.indexOf(H,b[e]))null==k[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||"none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(c.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2077,35 +2079,35 @@ a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==c?"geSprite geSprite-"+a+"block":"g
a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"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"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(c){c.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var c=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
-!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale*a.width*d.width,
-this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container){c=null!=c?c:0;f=null!=f?f:0;var h=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),g=a.view.translate,p=a.view.scale,m=mxRectangle.fromRectangle(h);
-m.x=m.x/p-g.x;m.y=m.y/p-g.y;m.width/=p;m.height/=p;var g=a.container.scrollTop,u=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var v=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,v/m.width)):p;b=(v-d*m.width)/2/d;var k=0==this.lightboxVerticalDivider?0:(r-d*m.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||h.width<v||h.height<r)a.view.scaleAndTranslate(d,
-Math.floor(b-m.x),Math.floor(k-m.y)),a.container.scrollTop=g*d/p,a.container.scrollLeft=u*d/p;else if(0!=c||0!=f)h=a.view.translate,a.view.setTranslate(Math.floor(h.x+c/p),Math.floor(h.y+f/p))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
+this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),k=a.view.translate,n=a.view.scale,l=mxRectangle.fromRectangle(g);
+l.x=l.x/n-k.x;l.y=l.y/n-k.y;l.width/=n;l.height/=n;var k=a.container.scrollTop,t=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var v=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,v/l.width)):n;b=(v-d*l.width)/2/d;var w=0==this.lightboxVerticalDivider?0:(r-d*l.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),w=Math.max(w,0));if(e||g.width<v||g.height<r)a.view.scaleAndTranslate(d,
+Math.floor(b-l.x),Math.floor(w-l.y)),a.container.scrollTop=k*d/n,a.container.scrollLeft=t*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){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="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||
-0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,d,b){l++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);
-return c}),n=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
-d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var h=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",n.style.display="",q.style.display="inline-block"):(t.style.display="none",n.style.display=
-"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",h);this.editor.addListener("pageSelected",d);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(d){a.lightbox?(1==a.view.scale?
-this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var f=null,p=null,m=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=
-null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var w=k(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
+"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var h=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||
+0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",h);h();var m=0,h=mxUtils.bind(this,function(a,d,b){m++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);
+return c}),p=h(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var u=h(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),
+d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",q.style.display="inline-block"):(u.style.display="none",p.style.display=
+"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",d);h(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");h(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");h(mxUtils.bind(this,function(d){a.isLightboxView()?(1==a.view.scale?
+this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var f=null,t=null,n=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=
+null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var w=h(mxUtils.bind(this,function(d){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 b=w.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){w.style.display=1<u.getChildCount(u.root)?
-"":"none"})}this.addChromelessToolbarItems(k);null!=this.editor.editButtonLink&&k(mxUtils.bind(this,function(d){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
-mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||g(30),m())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=
-b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?m():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var r=
-a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}r.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*
-c.width),h=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=h)a.minimumGraphSize=new mxRectangle(0,0,f,h);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),
-this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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-.01)/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(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=A&&(c=a.container.offsetWidth/2-A.x+d.x,f=a.container.offsetHeight/2-A.y+d.y);d=this.view.scale;
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),k=a.getModel();k.addListener(mxEvent.CHANGE,function(){w.style.display=1<k.getChildCount(k.root)?
+"":"none"})}this.addChromelessToolbarItems(h);null!=this.editor.editButtonLink&&h(mxUtils.bind(this,function(d){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||h(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
+mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||l(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||l(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=
+b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():l(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var r=
+a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}r.apply(this,arguments)};var E=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*
+c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),
+this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var G=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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-.01)/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(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=G&&(c=a.container.offsetWidth/2-G.x+d.x,f=a.container.offsetHeight/2-G.y+d.y);d=this.view.scale;
this.zoom(this.cumulativeZoomFactor);this.view.scale!=d&&(null!=b&&e.chromelessResize(!1,null,c*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==c&&0==f||(a.container.scrollLeft-=c*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(d))for(var c=
-mxEvent.getSource(d);null!=c;){if(c==a.container){A=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+mxEvent.getSource(d);null!=c;){if(c==a.container){G=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};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.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"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,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,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.chromeless)return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
+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 e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
this.editor.fireEvent(new mxEventObject("resetGraphView"))};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){}};
@@ -2113,32 +2115,32 @@ EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing())
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,e;for(e in urlParams)a=0==b?a+"?":a+"&",a+=e+"="+urlParams[e],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,e=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();e!=b.container.style.overflow&&("hidden"==b.container.style.overflow?(a=b.view.translate,b.view.setTranslate(a.x-b.container.scrollLeft/b.view.scale,a.y-b.container.scrollTop/b.view.scale),b.container.scrollLeft=0,b.container.scrollTop=0,b.minimumGraphSize=null,b.sizeDidChange()):(a=b.view.translate.x,e=b.view.translate.y,b.view.translate.x=0,b.view.translate.y=
0,b.sizeDidChange(),b.container.scrollLeft-=Math.round(a*b.view.scale),b.container.scrollTop-=Math.round(e*b.view.scale)));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.chromeless)if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing);a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2));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(),e=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-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-b.height)/
-4))-b.y)))};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),c=0,k=0;e&&(c=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-c,b.container.scrollTop=b.view.translate.y*
-b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,c){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=c;this.ignoreImage=this.ignoreColor=!1}
+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);a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2));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(),e=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-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
+b.height)/4))-b.y)))};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),c=0,h=0;e&&(c=b.view.translate.x*b.view.scale-b.container.scrollLeft,h=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-c,b.container.scrollTop=b.view.translate.y*
+b.view.scale-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,c){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=c;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}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),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)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);return c};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){this.editor.graph.pageFormat=a;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"),e=this.editor.undoManager,c=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,c);e.addListener(mxEvent.UNDO,c);e.addListener(mxEvent.REDO,c);e.addListener(mxEvent.CLEAR,c);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);c()};var l=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);c()};c()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var n=k[l];a.getModel().isEdge(n)&&(c=!0);a.getModel().isVertex(n)&&(e=!0);if(c&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
-0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(c);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);c=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,c=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,c);e.addListener(mxEvent.UNDO,c);e.addListener(mxEvent.REDO,c);e.addListener(mxEvent.CLEAR,c);var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);c()};var m=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){m.apply(this,arguments);c()};c()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,h=a.getSelectionCells();if(null!=h)for(var m=0;m<h.length;m++){var p=h[m];a.getModel().isEdge(p)&&(c=!0);a.getModel().isVertex(p)&&(e=!0);if(c&&e)break}h="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
+0;m<h.length;m++)this.actions.get(h[m]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(c);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);c=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
c&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||c&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(c&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(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()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());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);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());
this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight: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 l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&!mxClient.IS_QUIRKS&&(n+=1);var q=0;if(null!=this.sidebarFooterContainer){var t=
-this.footerHeight+k,q=Math.max(0,Math.min(c-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
-null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;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=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=
-this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var h=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(h=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var u=
+this.footerHeight+h,q=Math.max(0,Math.min(c-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+null!=this.hsplit.parentNode?m+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+h+"px";this.hsplit.style.left=m+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
+b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
+this.footerHeight+h+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=h+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+h+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+h+"px",this.formatContainer.style.bottom=
+this.footerHeight+h+"px",this.diagramContainer.style.bottom=this.footerHeight+h+e+"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-2;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};
@@ -2147,64 +2149,64 @@ 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";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");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,e,c){function k(a){if(null!=n){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?f.x-n.x:n.y-f.y)-e));mxEvent.consume(a);q!=h()&&(t=!0,d=null)}}function l(a){k(a);n=q=null}var n=null,q=null,t=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var h=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){n=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=h();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!t){var b=null!=d?d-e:0;d=h();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,n){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,n);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,c){function h(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?f.x-p.x:p.y-f.y)-e));mxEvent.consume(a);q!=g()&&(u=!0,d=null)}}function m(a){h(a);p=q=null}var p=null,q=null,u=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=g();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!u){var b=null!=d?d-e:0;d=g();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,h,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,m)})};EditorUi.prototype.showDialog=function(a,b,e,c,h,m,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,h,m,p);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
-EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(k.container,230,430,!0,!1);k.init()};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),h=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(h.container,230,430,!0,!1);h.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 e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var c=a.lastIndexOf("&lt;/mxGraphModel&gt;");c>e&&(b=a.substring(e,c+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var c=a.lastIndexOf("&lt;/mxGraphModel&gt;");c>e&&(b=a.substring(e,c+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(h){}return b};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
(b=e);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(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,e){var c=this.editor.graph;if(c.isEnabled()){c.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var n=new Image;n.onload=function(){e(l,n.width,n.height)};n.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};n.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,b,e){var c=this.editor.graph;if(c.isEnabled()){c.getModel().beginUpdate();try{a()}catch(h){throw h;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var h=c.saveSelection(),m=mxUtils.prompt(a,b);c.restoreSelection(h);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){e(m,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showBackgroundImageDialog=function(a){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 b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else 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,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){n.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),h=0;h<f.length;h++)if(c.getModel().isVertex(f[h])&&c.isCellResizable(f[h])){var e=c.getCellGeometry(f[h]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[h],e))}}finally{c.getModel().endUpdate()}}else f=
-c.getSelectionCell(),h=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(h)),null!=e&&e.constructor==mxStackLayout?(e=h.getIndex(f),37==a||38==a?c.model.add(h,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(h,f,Math.min(c.model.getChildCount(h),e+1))):(h=f=0,37==a?f=-d:38==a?h=-d:39==a?f=d:40==a&&(h=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,h))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-n.length){c.getModel().beginUpdate();try{for(var a=0;a<n.length;a++)n[a]();n=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!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)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var n=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,h={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
-80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var f=h[a.keyCode];if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=t[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
-c.connectVertex(c.getSelectionCell(),t[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return d.apply(this,
-arguments)};k.bindAction=mxUtils.bind(this,function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):c?k.bindShiftKey(a,b):k.bindKey(a,b))});var f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,
-!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),k.bindControlKey(35,function(){c.isEnabled()&&c.foldCells(!1)}),k.bindControlKey(13,function(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,
-"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,
-"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",
-!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){c.isEnabled()&&c.startEditingAtCell()}),k.bindKey(113,function(){c.isEnabled()&&c.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){p.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),g=0;g<f.length;g++)if(c.getModel().isVertex(f[g])&&c.isCellResizable(f[g])){var e=c.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[g],e))}}finally{c.getModel().endUpdate()}}else f=
+c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
+p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,h=new mxKeyHandler(c),m=h.isEventIgnored;h.isEventIgnored=function(a){return(!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)};h.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};h.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=h.getFunction,g={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),76:this.actions.get("editLink"),
+80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var f=g[a.keyCode];if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=u[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
+c.connectVertex(c.getSelectionCell(),u[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return d.apply(this,
+arguments)};h.bindAction=mxUtils.bind(this,function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?h.bindControlShiftKey(a,b):h.bindControlKey(a,b):c?h.bindShiftKey(a,b):h.bindKey(a,b))});var f=h.escape;h.escape=function(a){f.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){c.exitGroup()});h.bindControlShiftKey(35,function(){c.enterGroup()});h.bindKey(36,function(){c.home()});h.bindKey(35,function(){c.refresh()});h.bindAction(107,
+!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(80,!0,"print");h.bindAction(79,!0,"outline",!0);h.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)h.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),h.bindControlKey(35,function(){c.isEnabled()&&c.foldCells(!1)}),h.bindControlKey(13,function(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(46,!1,
+"delete"),h.bindAction(46,!0,"deleteAll"),h.bindAction(72,!0,"resetView"),h.bindAction(72,!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,!0,
+"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,"toBack",!0),h.bindAction(70,!0,"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,!0,"lockUnlock"),h.bindAction(76,!0,"layers",
+!0),h.bindAction(80,!0,"formatPanel",!0),h.bindAction(85,!0,"underline"),h.bindAction(85,!0,"ungroup",!0),h.bindAction(190,!0,"superscript"),h.bindAction(188,!0,"subscript"),h.bindKey(13,function(){c.isEnabled()&&c.startEditingAtCell()}),h.bindKey(113,function(){c.isEnabled()&&c.startEditingAtCell()});mxClient.IS_WIN?h.bindAction(89,!0,"redo"):h.bindAction(90,!0,"redo",!0);return h};
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);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.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-Graph=function(a,b,e,c,k){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);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){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,n=null,q=null,t=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,n=c,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=n){if(c=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var h=this.selectionCellsHandler.getHandler(c.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var e=h.getHandleForEvent(n),g=this.view.getEdgeStyle(c);f=g==mxEdgeStyle.EntityRelation;d||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=h.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==h.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==g&&null==e||g==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=h.bends.length-1:null!=g&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==g?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),e),t=l=n=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){h=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
-b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))h="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))h="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)g=this.view.getEdgeStyle(c),h="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(g=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
-g<f.length-1&&0<=g&&(h=0==Math.round(f[g].x-f[g+1].x)?"col-resize":"row-resize"));null!=h&&c.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,d){t=l=n=q=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
-this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var h=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=h.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,f=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),p=0;p<g.width;p++)d.push(new mxRectangle(((g.x+p)*f+c.x)*e,(g.y*b+c.y)*e,f*e,b*e));for(p=0;p<g.height;p++)d.push(new mxRectangle((g.x*f+c.x)*e,((g.y+p)*b+c.y)*e,f*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+Graph=function(a,b,e,c,h){mxGraph.call(this,a,b,e,c);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);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){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a);
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var m=null,p=null,q=null,u=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(m=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,p=c,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=m&&null!=q&&null!=p){if(c=q,Math.abs(m.x-b.getGraphX())>f||Math.abs(m.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),k=this.view.getEdgeStyle(c);f=k==mxEdgeStyle.EntityRelation;d||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(m.x,m.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=k&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),u=m=p=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)k=this.view.getEdgeStyle(c),g="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(k=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
+k<f.length-1&&0<=k&&(g=0==Math.round(f[k].x-f[k+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){u=m=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,f=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),n=0;n<k.width;n++)d.push(new mxRectangle(((k.x+n)*f+c.x)*e,(k.y*b+c.y)*e,f*e,b*e));for(n=0;n<k.height;n++)d.push(new mxRectangle((k.x*f+c.x)*e,((k.y+n)*b+c.y)*e,f*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,d){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)};this.graphHandler.getCells=function(a){for(var d=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]),f=null!=f?f.style:this.graph.getCellStyle(d[c]);
"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var f=new mxRubberband(this);
-this.getRubberband=function(){return f};var p=(new Date).getTime(),m=0,g=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;g.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),m=0):m=(new Date).getTime()-p};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<m||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&w.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var r=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(r=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=r)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||a.isConsumed())return z.apply(this,
-arguments);d=d?a.sourceState.cell:a.getCell();if(null!=d){var b=this.getLinkForCell(d);null!=b&&(this.isPageLink(b)?this.pageLinkClicked(d,b):this.openLink(b))}};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};var A=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
-this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return A.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,h){h=null!=h?h:[];if(0<b||0<c){var e=this.getModel(),g=a+b,p=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),O=0;O<m;O++){var u=e.getChildAt(f,O),
-r=this.view.getState(u);if(null!=r&&this.isCellVisible(u)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var v=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(r=mxUtils.getBoundingBox(r,v));(e.isEdge(u)||e.isVertex(u))&&r.x>=a&&r.y+r.height<=p&&r.y>=d&&r.x+r.width<=g&&h.push(u);this.getAllCells(a,d,b,c,u,h)}}}return h};var x=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:x.apply(this,
-arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);F=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored=
-function(a,d){return d&&a.view.graph.isCellSelected(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 y=this.updateMouseEvent;this.updateMouseEvent=function(a){a=y.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
+this.getRubberband=function(){return f};var t=(new Date).getTime(),n=0,l=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;l.apply(this,arguments);a!=this.currentState?(t=(new Date).getTime(),n=0):n=(new Date).getTime()-t};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&w.apply(this,arguments)};var k=this.isToggleEvent;this.isToggleEvent=function(a){return k.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var r=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(r=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=r)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var E=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||a.isConsumed())return E.apply(this,
+arguments);d=d?a.sourceState.cell:a.getCell();if(null!=d){var b=this.getLinkForCell(d);null!=b&&(this.isPageLink(b)?this.pageLinkClicked(d,b):this.openLink(b))}};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};var G=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
+this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return G.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),k=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var l=e.getChildCount(f),t=0;t<l;t++){var r=e.getChildAt(f,t),
+v=this.view.getState(r);if(null!=v&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(v.style,"locked","0")){var h=mxUtils.getValue(v.style,mxConstants.STYLE_ROTATION)||0;0!=h&&(v=mxUtils.getBoundingBox(v,h));(e.isEdge(r)||e.isVertex(r))&&v.x>=a&&v.y+v.height<=n&&v.y>=d&&v.x+v.width<=k&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:H.apply(this,
+arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();C=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f.start(b.x,b.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);C=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+function(a,d){return d&&a.view.graph.isCellSelected(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 x=this.updateMouseEvent;this.updateMouseEvent=function(a){a=x.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
null);return a}}};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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,e){e=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" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
-Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,n=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,n,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+Graph.prototype.transparentBackground=!0;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=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,h=!0,m=null,p=mxUtils.bind(this,function(a){h=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){h=h&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(d){if(h)for(var b=mxEvent.getSource(d);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
Graph.prototype.openLink=function(a,b){var e=window;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 c=a.split("#")[1];window.location.hash=="#"+c&&(window.location.hash="");window.location.hash=c}else e=window.open(a,b);return e};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,b){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",b))};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)};
@@ -2213,42 +2215,42 @@ Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutMana
"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",
30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",
mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};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 e=Math.ceil(b.x/this.view.scale-this.view.translate.x),c=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(c/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((c+Math.floor(b.height/this.view.scale))/a.height)-l)};
+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 e=Math.ceil(b.x/this.view.scale-this.view.translate.x),c=Math.ceil(b.y/this.view.scale-this.view.translate.y),h=Math.floor(e/a.width),m=Math.floor(c/a.height);return new mxRectangle(h,m,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-h,Math.ceil((c+Math.floor(b.height/this.view.scale))/a.height)-m)};
Graph.prototype.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.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!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)&&!mxClient.IS_MAC||null!=this.panningHandler&&this.panningHandler.isActive()};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&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.view.getState(a),b=null!=b?b.style:this.getCellStyle(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.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,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,n=function(a,d){a=String(a);for(d=d||2;a.length<d;)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(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",t=a[q+"Date"](),d=a[q+"Day"](),h=a[q+"Month"](),f=a[q+"FullYear"](),p=a[q+"Hours"](),m=a[q+"Minutes"](),g=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),u={d:t,dd:n(t),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:h+1,mm:n(h+1),mmm:c.i18n.monthNames[h],mmmm:c.i18n.monthNames[h+
-12],yy:String(f).slice(2),yyyy:f,h:p%12||12,hh:n(p%12||12),H:p,HH:n(p),M:m,MM:n(m),s:g,ss:n(g),l:n(q,3),L:n(99<q?Math.round(q/10):q),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<w?"-":"+")+n(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,h=/\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,d){a=String(a);for(d=d||2;a.length<d;)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(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),d=a[q+"Day"](),g=a[q+"Month"](),f=a[q+"FullYear"](),t=a[q+"Hours"](),n=a[q+"Minutes"](),l=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),k={d:u,dd:p(u),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:g+1,mm:p(g+1),mmm:c.i18n.monthNames[g],mmmm:c.i18n.monthNames[g+
+12],yy:String(f).slice(2),yyyy:f,h:t%12||12,hh:p(t%12||12),H:t,HH:p(t),M:n,MM:p(n),s:l,ss:p(l),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>t?"a":"p",tt:12>t?"am":"pm",T:12>t?"A":"P",TT:12>t?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(m,""),o:(0<w?"-":"+")+p(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in k?k[a]:a.slice(1,
a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)(function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(c)&&(k.setAttribute("checked","checked"),k.defaultChecked=
-!0);e.appendChild(k);var q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var n=k.substring(1,k.length-1);if(0>n.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(n)?null!=q.getAttribute(n)?q.getAttribute(n):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(c,
-match.index)+(null!=l?l:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var 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(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,t=this.view.translate,d=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(d=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+n.x*q,t+n.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
-null));if(k=!mxEvent.isShiftDown(c)||k)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;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var d=a,h=this.getCellGeometry(a);null!=
-h&&h.relative;)d=this.getModel().getParent(d),h=this.getCellGeometry(d);var f=this.view.getState(d),p=null!=f?f.style:this.getCellStyle(d);if(mxUtils.getValue(p,"part",!1)){var m=this.model.getParent(d);this.model.isVertex(m)&&(d=m)}q=this.duplicateCells([d],!1)[0];h=this.getCellGeometry(q);null!=h&&(h.x=n.x-h.width/2,h.y=n.y-h.height/2)}h=null;null!=this.layoutManager&&(h=this.layoutManager.getLayout(this.model.getParent(a)));var g=mxEvent.isControlDown(c)&&k||null==l&&null!=h&&h.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=g&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=g.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==g.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,g,w))}null==l&&null!=q&&null!=h&&null!=a.parent&&h.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,
-q,w));null!=g&&e.push(g);null==l&&null!=q&&e.push(q);null==q&&null!=g&&g.geometry.setTerminalPoint(n,!1);null!=g&&this.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)(function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var h=document.createElement("input");h.style.display="inline-block";h.setAttribute("type","checkbox");b.isVisible(c)&&(h.setAttribute("checked","checked"),h.defaultChecked=
+!0);e.appendChild(h);var q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(h,"click",function(){null!=h.getAttribute("checked")?h.removeAttribute("checked"):h.setAttribute("checked","checked");b.setVisible(c,h.checked)})})(b.getChildAt(b.root,c));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var h=match[0];if(2<h.length&&"%label%"!=h&&"%tooltip%"!=h){var m=null;if(match.index>c&&"%"==b.charAt(match.index-1))m=h.substring(1);else{var p=h.substring(1,h.length-1);if(0>p.indexOf("{"))for(var q=a;null==m&&null!=q;)null!=q.value&&"object"==typeof q.value&&(m=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==m&&(m=this.getGlobalVariable(p))}e.push(b.substring(c,
+match.index)+(null!=m?m:h));c=match.index+h.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
+Graph.prototype.connectVertex=function(a,b,e,c,h,m){m=m?m:!1;var p=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(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
+var q=this.view.scale,u=this.view.translate,d=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(d=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(c)&&!h?null:this.getCellAt(d+p.x*q,u+p.y*q);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),q=this.view.getState(m),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(m=
+null));if(h=!mxEvent.isShiftDown(c)||h)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];this.model.beginUpdate();try{q=m;if(null==q&&h){for(var d=a,g=this.getCellGeometry(a);null!=
+g&&g.relative;)d=this.getModel().getParent(d),g=this.getCellGeometry(d);var f=this.view.getState(d),t=null!=f?f.style:this.getCellStyle(d);if(mxUtils.getValue(t,"part",!1)){var n=this.model.getParent(d);this.model.isVertex(n)&&(d=n)}q=this.duplicateCells([d],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=p.x-g.width/2,g.y=p.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var l=mxEvent.isControlDown(c)&&h||null==m&&null!=g&&g.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=l.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==l.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,l,w))}null==m&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,
+q,w));null!=l&&e.push(l);null==m&&null!=q&&e.push(q);null==q&&null!=l&&l.geometry.setTerminalPoint(p,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}return e};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,c=null;null==c&&null!=e;)null!=e.value&&"object"==typeof e.value&&(c=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return c||""}return a.value.getAttribute("label")}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.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var c=this.layoutManager.getLayout(this.model.getParent(a));null!=c&&c.constructor==mxStackLayout&&(c.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var n=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=n&&null!=q){var t=Math.round(q.width-n.width/this.view.scale),d=Math.round(q.height-n.height/this.view.scale);if(0!=d||0!=t){var h=this.model.getParent(e[l]),f=this.layoutManager.getLayout(h);
-null==f?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(n,h,t,d):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(h,f,t,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),n=this.getCellGeometry(k[b]);null!=l&&null!=n&&(n=n.clone(),n.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],n))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),n=this.view.getState(a);null!=n&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,n.width/this.view.scale-l.width):l.height+=c+Math.min(0,n.height/this.view.scale-l.height),this.model.setGeometry(a,
-l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(a,b,e,c,h){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),q=this.getCellGeometry(e[m]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),d=Math.round(q.height-p.height/this.view.scale);if(0!=d||0!=u){var g=this.model.getParent(e[m]),f=this.layoutManager.getLayout(g);
+null==f?null!=h&&this.isMoveCellsEvent(h)&&this.moveSiblings(p,g,u,d):null!=h&&mxEvent.isAltDown(h)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(g,f,u,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<h.length;b++)if(h[b]!=a.cell){var m=this.view.getState(h[b]),p=this.getCellGeometry(h[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(h[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var h=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==h&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,p.width/this.view.scale-m.width):m.height+=c+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.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.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,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!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.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var c=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&c.push({name:a[k].nodeName,value:a[k].nodeValue});c.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(k=0;k<c.length;k++)"link"==c[k].name&&this.isPageLink(c[k].value)||(b+=("link"!=c[k].name?c[k].name+":":"")+mxUtils.htmlEntities(c[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var c=[];this.isEnabled()&&e.push("link");for(var h=0;h<a.length;h++)0>mxUtils.indexOf(e,a[h].nodeName)&&0<a[h].nodeValue.length&&c.push({name:a[h].nodeName,value:a[h].nodeValue});c.sort(function(a,
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(h=0;h<c.length;h++)"link"==c[h].name&&this.isPageLink(c[h].value)||(b+=("link"!=c[h].name?c[h].name+":":"")+mxUtils.htmlEntities(c[h].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(26,14,'<path d="m 1 14 L 13 1 L 26 14 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(14,26,'<path d="m 1 1 L 14 13 L 1 26 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
@@ -2259,7 +2261,7 @@ HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;b
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.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);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,
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,c){b=!1;var e=c.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(c.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
+!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,c){b=!1;var e=c.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var m=this.getState(c.getState());null==m&&mxEvent.isTouchEvent(e)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
this.update(this.getState(c.getState()),c.getGraphX(),c.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.isActive()&&null!=this.mouseDownPoint&&Math.abs(c.getGraphX()-this.mouseDownPoint.x)<this.graph.tolerance&&Math.abs(c.getGraphY()-this.mouseDownPoint.y)<this.graph.tolerance?b||this.click(this.currentState,this.getDirection(),c):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(c.getGraphX(),c.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,c.getGraphX(),c.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};
HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
@@ -2269,14 +2271,14 @@ this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redire
this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,a=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=a&&a.setHandlesVisible(!1))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
-HoverIcons.prototype.click=function(a,b,e){var c=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(c)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,c),this.graph.selectCellsForConnectVertex(a,c,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(c)?this.update(this.getState(this.graph.view.getState(a[1]))):
-this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};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.click=function(a,b,e){var c=e.getEvent(),h=e.getGraphX(),m=e.getGraphY(),h=this.getStateAt(a,h,m);null==h||!this.graph.model.isEdge(h.cell)||mxEvent.isControlDown(c)||h.getVisibleTerminalState(!0)!=a&&h.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,c),this.graph.selectCellsForConnectVertex(a,c,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(c)?this.update(this.getState(this.graph.view.getState(a[1]))):
+this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(h.cell),this.reset());e.consume()};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);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&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
"px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+
"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),c=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==c&&c==a&&(a=c=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==k||c.height<6*k.height&&c.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"});
-l(b,this.arrowRight);l(e,this.arrowLeft);l(c,this.arrowUp);l(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",
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==c&&c==a&&(a=c=e=b=null);var h=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==h||c.height<6*h.height&&c.width<6*h.width)?b.style.visibility="hidden":b.style.visibility="visible"});
+m(b,this.arrowRight);m(e,this.arrowLeft);m(c,this.arrowUp);m(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){a=a.cell;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)}return a};
@@ -2285,23 +2287,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activa
this.reset())}else 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};
(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,d){var c=this.getState(a);null!=c&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,arguments);null!=
c&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,d){return e.apply(this,arguments)||null!=a.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var h=new mxPoint(b,f);h.type=d;c.push(h);h=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==h||h.type!=d||h.x!=b||h.y!=f},m=.5*this.scale,b=!1,c=[],g=0;g<d.length-1;g++){for(var k=d[g+1],u=d[g],v=[],r=d[g+2];g<
-d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,r.x,r.y,k.x,k.y)<1*this.scale*this.scale;)k=r,g++,r=d[g+2];for(var b=e(0,u.x,u.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],n=l.absolutePoints;if(null!=n&&mxUtils.intersects(a,l)&&"1"!=l.style.noJump)for(l=0;l<n.length-1;l++){for(var t=n[l+1],y=n[l],r=n[l+2];l<n.length-2&&mxUtils.ptSegDistSq(y.x,y.y,r.x,r.y,t.x,t.y)<1*this.scale*this.scale;)t=r,l++,r=n[l+2];r=mxUtils.intersection(u.x,u.y,k.x,k.y,y.x,y.y,t.x,t.y);if(null!=r&&(Math.abs(r.x-
-y.x)>m||Math.abs(r.y-y.y)>m)&&(Math.abs(r.x-t.x)>m||Math.abs(r.y-t.y)>m)){t=r.x-u.x;y=r.y-u.y;r={distSq:t*t+y*y,x:r.x,y:r.y};for(t=0;t<v.length;t++)if(v[t].distSq>r.distSq){v.splice(t,0,r);r=null;break}null==r||0!=v.length&&v[v.length-1].x===r.x&&v[v.length-1].y===r.y||v.push(r)}}}for(l=0;l<v.length;l++)b=e(1,v[l].x,v[l].y)||b}r=d[d.length-1];b=e(0,r.x,r.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,h=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),g,q=!0,u=null,v=null;g=[];var r=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var n=
-this.state.routedPoints[l],x=new mxPoint(n.x/this.scale,n.y/this.scale);0==l?x=d[0]:l==this.state.routedPoints.length-1&&(x=d[d.length-1]);var t=!1;if(null!=u&&1==n.type){var y=this.state.routedPoints[l+1],n=y.x/this.scale-x.x,y=y.y/this.scale-x.y,n=n*n+y*y;null==r&&(r=new mxPoint(x.x-u.x,x.y-u.y),v=Math.sqrt(r.x*r.x+r.y*r.y),r.x=r.x*h/v,r.y=r.y*h/v);n>h*h&&0<v&&(n=u.x-x.x,y=u.y-x.y,n=n*n+y*y,n>h*h&&(t=new mxPoint(x.x-r.x,x.y-r.y),n=new mxPoint(x.x+r.x,x.y+r.y),g.push(t),this.addPoints(a,g,b,c,!1,
-null,q),g=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,q=!1,"sharp"==e?(a.lineTo(t.x-r.y*g,t.y+r.x*g),a.lineTo(n.x-r.y*g,n.y+r.x*g),a.lineTo(n.x,n.y)):"arc"==e?(g*=1.3,a.curveTo(t.x-r.y*g,t.y+r.x*g,n.x-r.y*g,n.y+r.x*g,n.x,n.y)):(a.moveTo(n.x,n.y),q=!0),g=[n],t=!0))}else r=null;t||(g.push(x),u=x)}this.addPoints(a,g,b,c,!1,null,q);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
-a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),h=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=e)var u=Math.cos(-e),v=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,v,k);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);f=this.getPerimeterPoint(d,f,0==e&&h,u);0!=e&&(u=Math.cos(e),v=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var h=this.graph.getConnectionPoint(d,a[f]);if(null!=h){var p=(h.x-e.x)*(h.x-e.x)+(h.y-e.y)*(h.y-e.y);if(null==c||p<c)b=h,c=p}}null!=b&&(e=b)}return e};var n=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=n.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
-return new mxShape(new mxStencil(c.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var k=b[c];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l=
-mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(n){null!=window.console&&console.log("error in getStencil:",k,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var e=new mxPoint(b,f);e.type=d;c.push(e);e=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==e||e.type!=d||e.x!=b||e.y!=f},n=.5*this.scale,b=!1,c=[],l=0;l<d.length-1;l++){for(var h=d[l+1],k=d[l],v=[],r=d[l+2];l<
+d.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,h.x,h.y)<1*this.scale*this.scale;)h=r,l++,r=d[l+2];for(var b=e(0,k.x,k.y)||b,q=0;q<this.validEdges.length;q++){var m=this.validEdges[q],p=m.absolutePoints;if(null!=p&&mxUtils.intersects(a,m)&&"1"!=m.style.noJump)for(m=0;m<p.length-1;m++){for(var u=p[m+1],x=p[m],r=p[m+2];m<p.length-2&&mxUtils.ptSegDistSq(x.x,x.y,r.x,r.y,u.x,u.y)<1*this.scale*this.scale;)u=r,m++,r=p[m+2];r=mxUtils.intersection(k.x,k.y,h.x,h.y,x.x,x.y,u.x,u.y);if(null!=r&&(Math.abs(r.x-
+x.x)>n||Math.abs(r.y-x.y)>n)&&(Math.abs(r.x-u.x)>n||Math.abs(r.y-u.y)>n)){u=r.x-k.x;x=r.y-k.y;r={distSq:u*u+x*x,x:r.x,y:r.y};for(u=0;u<v.length;u++)if(v[u].distSq>r.distSq){v.splice(u,0,r);r=null;break}null==r||0!=v.length&&v[v.length-1].x===r.x&&v[v.length-1].y===r.y||v.push(r)}}}for(m=0;m<v.length;m++)b=e(1,v[m].x,v[m].y)||b}r=d[d.length-1];b=e(0,r.x,r.y)||b}a.routedPoints=c;return b}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l,w=!0,k=null,v=null;l=[];var r=null;a.begin();for(var q=0;q<this.state.routedPoints.length;q++){var m=
+this.state.routedPoints[q],p=new mxPoint(m.x/this.scale,m.y/this.scale);0==q?p=d[0]:q==this.state.routedPoints.length-1&&(p=d[d.length-1]);var u=!1;if(null!=k&&1==m.type){var x=this.state.routedPoints[q+1],m=x.x/this.scale-p.x,x=x.y/this.scale-p.y,m=m*m+x*x;null==r&&(r=new mxPoint(p.x-k.x,p.y-k.y),v=Math.sqrt(r.x*r.x+r.y*r.y),r.x=r.x*e/v,r.y=r.y*e/v);m>e*e&&0<v&&(m=k.x-p.x,x=k.y-p.y,m=m*m+x*x,m>e*e&&(u=new mxPoint(p.x-r.x,p.y-r.y),m=new mxPoint(p.x+r.x,p.y+r.y),l.push(u),this.addPoints(a,l,b,c,!1,
+null,w),l=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,w=!1,"sharp"==g?(a.lineTo(u.x-r.y*l,u.y+r.x*l),a.lineTo(m.x-r.y*l,m.y+r.x*l),a.lineTo(m.x,m.y)):"arc"==g?(l*=1.3,a.curveTo(u.x-r.y*l,u.y+r.x*l,m.x-r.y*l,m.y+r.x*l,m.x,m.y)):(a.moveTo(m.x,m.y),w=!0),l=[m],u=!0))}else r=null;u||(l.push(p),k=p)}this.addPoints(a,l,b,c,!1,null,w);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
+a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),h=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=g)var k=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,k,v,h);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);f=this.getPerimeterPoint(d,f,0==g&&e,k);0!=g&&(k=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,k,v,h));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var t=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||t<c)b=g,c=t}}null!=b&&(e=b)}return e};var p=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
+return new mxShape(new mxStencil(c.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var h=b[c];if(".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,null);else if(".js"==h.toLowerCase().substring(h.length-3,h.length))try{if(mxStencilRegistry.allowEval){var m=
+mxUtils.load(h);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",h,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(n){null!=window.console&&console.log("error in loadStencilSet:",a,n)}null!=k&&null!=
-k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};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,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var n=c.getAttribute("w"),
-q=c.getAttribute("h"),n=null==n?80:parseInt(n,10),q=null==q?80:parseInt(q,10);b(k,l,a,n,q)}}c=c.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,e,c){var h=mxStencilRegistry.packages[a];if(null!=e&&e||null==h){var m=!1;if(null==h)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,m=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,m))}));return}h=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=h;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=h&&null!=
+h.documentElement&&mxStencilRegistry.parseStencilSet(h.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,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,h="";a=a.getAttribute("name");for(null!=a&&(h=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var h=h.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(h+m.toLowerCase(),new mxStencil(c));if(null!=b){var p=c.getAttribute("w"),
+q=c.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(h,m,a,p,q)}}c=c.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}mxConstants.HANDLE_FILLCOLOR="#99ccff";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=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
b.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));
@@ -2309,72 +2311,72 @@ for(var d in this.graph.currentEdgeStyle)a.style[d]=this.graph.currentEdgeStyle[
a.getCell=mxUtils.bind(this,function(a){var b=d.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+
this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"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.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.importGraphModel=function(a,d,b,c){d=null!=d?
-d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var h={},g=0;g<a;g++){var p=e.getChildAt(e.getRoot(),g);if(1!=a||this.isCellLocked(this.getDefaultParent()))p=this.importCells([p],0,0,this.model.getRoot(),null,h)[0],m=this.model.getChildren(p),this.moveCells(m,d,b),f=f.concat(m);else var m=e.getChildren(p),f=f.concat(this.importCells(m,d,b,this.getDefaultParent(),
-null,h))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,d-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(X){}return c}if(null!=
+d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},k=0;k<a;k++){var n=e.getChildAt(e.getRoot(),k);if(1!=a||this.isCellLocked(this.getDefaultParent()))n=this.importCells([n],0,0,this.model.getRoot(),null,g)[0],l=this.model.getChildren(n),this.moveCells(l,d,b),f=f.concat(l);else var l=e.getChildren(n),f=f.concat(this.importCells(l,d,b,this.getDefaultParent(),
+null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var r=this.getBoundingBoxFromGeometry(f,!0);null!=r&&this.moveCells(f,d-r.x,b-r.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(X){}return c}if(null!=
a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a]))}};
Graph.prototype.isValidRoot=function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(d,"dropTarget",
"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),h=d.getTerminal(f,!1);d.setTerminal(f,h,!0);d.setTerminal(f,e,!1);var g=d.getGeometry(f);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var p=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);
-g.setTerminalPoint(p,!1);g.setTerminalPoint(m,!0);d.setGeometry(f,g);var u=this.view.getState(f),r=this.view.getState(e),v=this.view.getState(h);if(null!=u){var O=null!=r?this.getConnectionConstraint(u,r,!0):null,k=null!=v?this.getConnectionConstraint(u,v,!1):null;this.setConnectionConstraint(f,e,!0,k);this.setConnectionConstraint(f,h,!1,O)}b.push(f)}}else if(d.isVertex(f)&&(g=this.getCellGeometry(f),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var q=g.width;g.width=g.height;
-g.height=q;d.setGeometry(f,g);var w=this.view.getState(f);if(null!=w){var l=w.style[mxConstants.STYLE_DIRECTION]||"east";"east"==l?l="south":"south"==l?l="west":"west"==l?l="north":"north"==l&&(l="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,l,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
+arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var k=d.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var n=k.getTerminalPoint(!0),l=k.getTerminalPoint(!1);
+k.setTerminalPoint(n,!1);k.setTerminalPoint(l,!0);d.setGeometry(f,k);var r=this.view.getState(f),t=this.view.getState(e),v=this.view.getState(g);if(null!=r){var Q=null!=t?this.getConnectionConstraint(r,t,!0):null,h=null!=v?this.getConnectionConstraint(r,v,!1):null;this.setConnectionConstraint(f,e,!0,h);this.setConnectionConstraint(f,g,!1,Q)}b.push(f)}}else if(d.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var w=k.width;k.width=k.height;
+k.height=w;d.setGeometry(f,k);var q=this.view.getState(f);if(null!=q){var m=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==m?m="south":"south"==m?m="west":"west"==m?m="north":"north"==m&&(m="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,m,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
if(0<d.length)for(var b=0;b<d.length;b++)this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!1,!1)}};Graph.prototype.replaceElement=function(a,d){for(var b=a.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.updateLabelElements=function(a,d,b){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),f=
-0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var h=c.getElementsByTagName(null!=b?b:"*"),g=0;g<h.length;g++)d(h[g]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),
+0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var g=c.getElementsByTagName(null!=b?b:"*"),k=0;k<g.length;k++)d(g[k]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),
f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(c)){this.setAttributeForCell(f,c,d);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",d);d=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(var c=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||
-d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),h=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&h==mxConstants.NONE){e=!0;for(h=0;h<this.model.getChildCount(f.cell)&&e;h++)d.get(this.model.getChildAt(f.cell,h))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,
+d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)d.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,
arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var d=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var c=this.view.getState(a[b]);if(null!=c){var f=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&c==mxConstants.NONE&&d.push(a[b])}}a=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,d){this.setAttributeForCell(a,
"link",d)};Graph.prototype.setTooltipForCell=function(a,d){this.setAttributeForCell(a,"tooltip",d)};Graph.prototype.setAttributeForCell=function(a,d,b){var c;null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=b&&0<b.length?c.setAttribute(d,b):c.removeAttribute(d);this.model.setValue(a,c)};Graph.prototype.getDropTarget=function(a,d,b,c){this.getModel();if(mxEvent.isAltDown(d))return null;
for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,d){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?
this.view.getState(d):null,f=mxEvent.getSource(a);this.firstClickState!=c||this.firstClickSource!=f||null!=c&&null!=c.text&&null!=c.text.node&&(mxUtils.contains(c.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(a)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(d=this.addText(b.x,b.y,c))}mxGraph.prototype.dblClick.call(this,
a,d)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),f=this.getPageSize(),d=Math.max(d,c.x*f.width),b=Math.max(b,c.y*f.height);return new mxPoint(this.snap(d+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,d=this.getGraphBounds(),b=this.getInsertPoint(),c=this.snap(Math.round(Math.max(b.x,
-d.x/a.scale-a.translate.x+(0==d.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+(0==d.height?1:2)*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;resizable=0;points=[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b){c.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";c.geometry.relative=
+d.x/a.scale-a.translate.x+(0==d.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;resizable=0;points=[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b){c.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";c.geometry.relative=
!0;c.connectable=!1;var f=this.view.getRelativePoint(b,a,d);c.geometry.x=Math.round(1E4*f.x)/1E4;c.geometry.y=Math.round(f.y);c.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,c.geometry),e=this.view.scale;c.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((d-f.y)/e))}else c.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(a/this.view.scale)-f.x,c.geometry.y=Math.round(d/this.view.scale)-
f.y;this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};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.addClickHandler=function(a,d,b){var c=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");
-if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),h=this,g={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
-a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-
-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!h.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),g=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-
-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(g)||mxEvent.isMiddleMouseButton(g))&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(f=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(g,this.currentLink),mxEvent.isConsumed(g)||(g=mxEvent.isMiddleMouseButton(g)?"_blank":f?h.linkTarget:"_top",h.openLink(this.currentLink,
-g),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&(h.container.style.cursor=
-f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};h.click=function(a){};h.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),h=0;h<a.length;h++){var g=b.getParent(a[h]),p=this.moveCells([e[h]],c,c,!1)[0];
-f.push(p);if(d)b.add(g,e[h]);else{var m=g.getIndex(a[h]);b.add(g,e[h],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};
+if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
+a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-
+d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!g.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),k=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-
+g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=mxEvent.isMiddleMouseButton(k)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,
+k),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=
+f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var k=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1)[0];
+f.push(n);if(d)b.add(k,e[g]);else{var l=k.getIndex(a[g]);b.add(k,e[g],l+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};
Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());
-if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var h=this.view.getState(d[e]);if(null!=h){var g=a?h.getCenterX():h.getCenterY(),c=null!=c?Math.max(c,g):g,f=null!=f?Math.min(f,g):g;b.push(h)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});h=this.view.translate;g=this.view.scale;f=f/g-(a?h.x:h.y);c=c/g-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var p=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),
-u=this.getCellGeometry(b[e].cell),c=c+p;null!=u&&null!=m&&(u=u.clone(),a?u.x=Math.round(c-u.width/2)-m.origin.x:u.y=Math.round(c-u.height/2)-m.origin.y,this.getModel().setGeometry(b[e].cell,u))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=
+if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var k=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,k):k,f=null!=f?Math.min(f,k):k;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});g=this.view.translate;k=this.view.scale;f=f/k-(a?g.x:g.y);c=c/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var l=this.view.getState(this.model.getParent(b[e].cell)),
+r=this.getCellGeometry(b[e].cell),c=c+n;null!=r&&null!=l&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-l.origin.x:r.y=Math.round(c-r.height/2)-l.origin.y,this.getModel().setGeometry(b[e].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=
this.view.getState(a[c]);if(null!=f){var e=this.getCellGeometry(d[c]);null==e||!e.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(e,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});
-return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,h,g){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;h=null!=h?h:!0;c=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,m=mxUtils.createXmlDocument(),u=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+
-a));null==m.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/p;u.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");u.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");u.setAttribute("version","1.1");var r=u;f&&(r=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),r.setAttribute("transform",
-"translate(0.5,0.5)"),u.appendChild(r));m.appendChild(u);m=this.createSvgCanvas(r);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=f?-.5:0;m.translate(Math.floor((b/d-c.x)/p),Math.floor((b/d-c.y)/p));var v=document.createElement("textarea"),k=m.createAlternateContent;m.createAlternateContent=function(a,d,b,c,f,e,h,g,m,p,u,r,q){var w=this.state;if(null!=this.foAltText&&(0==c||0!=w.fontSize&&e.length<5*c/w.fontSize)){var l=this.createElement("text");l.setAttribute("x",Math.round(c/2));l.setAttribute("y",
-Math.round((f+w.fontSize)/2));l.setAttribute("fill",w.fontColor||"black");l.setAttribute("text-anchor","middle");l.setAttribute("font-size",Math.round(w.fontSize)+"px");l.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&l.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&l.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.setAttribute("text-decoration",
-"underline");try{return v.innerHTML=e,l.textContent=v.value,l}catch(Ba){return k.apply(this,arguments)}}else return k.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=p/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&m.image(d.x,d.y,b.width,b.height,b.src,!0));m.scale(a);m.textEnabled=h;g=null!=g?g:this.createSvgImageExport();var q=g.drawCellState;g.drawCellState=function(a,d){(e||a.view.graph.isCellSelected(a.cell))&&q.apply(this,arguments)};
-g.drawState(this.getView().getState(this.model.root),m);return u};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;
+return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,k){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;c=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var n=this.view.scale,l=mxUtils.createXmlDocument(),r=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=r.style?r.style.backgroundColor=a:r.setAttribute("style","background-color:"+
+a));null==l.createElementNS?(r.setAttribute("xmlns",mxConstants.NS_SVG),r.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/n;r.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");r.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");r.setAttribute("version","1.1");var t=r;f&&(t=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),t.setAttribute("transform",
+"translate(0.5,0.5)"),r.appendChild(t));l.appendChild(r);l=this.createSvgCanvas(t);l.foOffset=f?-.5:0;l.textOffset=f?-.5:0;l.imageOffset=f?-.5:0;l.translate(Math.floor((b/d-c.x)/n),Math.floor((b/d-c.y)/n));var v=document.createElement("textarea"),h=l.createAlternateContent;l.createAlternateContent=function(a,d,b,c,f,e,g,k,n,l,r,t,w){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&e.length<5*c/q.fontSize)){var m=this.createElement("text");m.setAttribute("x",Math.round(c/2));m.setAttribute("y",
+Math.round((f+q.fontSize)/2));m.setAttribute("fill",q.fontColor||"black");m.setAttribute("text-anchor","middle");m.setAttribute("font-size",Math.round(q.fontSize)+"px");m.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&m.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&m.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&m.setAttribute("text-decoration",
+"underline");try{return v.innerHTML=e,m.textContent=v.value,m}catch(Ba){return h.apply(this,arguments)}}else return h.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=n/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&l.image(d.x,d.y,b.width,b.height,b.src,!0));l.scale(a);l.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var w=k.drawCellState;k.drawCellState=function(a,d){(e||a.view.graph.isCellSelected(a.cell))&&w.apply(this,arguments)};
+k.drawState(this.getView().getState(this.model.root),l);return r};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;
a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),
f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=
a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=
function(a,d){d=null!=d?d:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});
var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=
-this.fireMouseEvent;this.fireMouseEvent=function(a,e,h){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&
+this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&
(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(R){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var n=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){n.apply(this,
+document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(R){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
+"1"));h.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?m.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){p.apply(this,
arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||
mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=
a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}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)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"),b=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(d?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
-this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=h?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(d?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
+"1"),b=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(d?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
+this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,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 k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>"));k=this.graph.sanitizeHtml(d?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
+this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,
-"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};
+"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",u.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(O){}};var h=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(h.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,
+this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Q){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=
-function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var f=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,d,b,c,e,h){mxEvent.isAltDown(h)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/
+function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var f=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,d,b,c,e,g){mxEvent.isAltDown(g)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/
c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!mxEvent.isControlDown(d.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,d){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(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};
-var p=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=p.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
+var t=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=t.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(d=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/d)+" x "+this.roundLength(this.bounds.height/d)),d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==d&&(d=this.bounds),this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=d.y+d.height+12+"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="")};mxEdgeHandler.prototype.updateHint=function(d,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-c.x),c=this.roundLength(b.y/f-c.y);this.hint.innerHTML=e+", "+c;this.hint.style.visibility=
"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
@@ -2387,106 +2389,106 @@ Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((n
(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing=
-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=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=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null==
-a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var m=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){m.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&
-(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};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.mouseUp=function(a,d){var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,h=null;null!=this.first&&
-null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,h=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),g=
-this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<g.length;b++)if(this.graph.isCellMovable(g[b])){var m=this.graph.view.getState(g[b]),p=this.graph.getCellGeometry(g[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(e,h),this.graph.model.setGeometry(g[b],p))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
-this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(f)>h||Math.abs(e)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),
+a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var n=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){n.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&
+(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};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.mouseUp=function(a,d){var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&&
+null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),k=
+this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<k.length;b++)if(this.graph.isCellMovable(k[b])){var n=this.graph.view.getState(k[b]),l=this.graph.getCellGeometry(k[b]);null!=n&&null!=l&&(l=l.clone(),l.translate(e,g),this.graph.model.setGeometry(k[b],l))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
+this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),
this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=b-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)),d.consume()}};var g=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);g.apply(this,
-arguments)};var w=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){v.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),u=0):u=(new Date).getTime()-w;this.currentTerminalState=b};var r=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||
+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)),d.consume()}};var l=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);l.apply(this,
+arguments)};var w=(new Date).getTime(),k=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){v.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),k=0):k=(new Date).getTime()-w;this.currentTerminalState=b};var r=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<k||(null==this.currentTerminalState||
"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&r.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),
-f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var A=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return A.apply(this,
-arguments)};var x=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):x.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;
-mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
-this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(a,d){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
+f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var E=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return E.apply(this,arguments)};var G=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return G.apply(this,
+arguments)};var H=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):H.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;
+mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
+this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var x=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){x.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var y=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(a,d){y.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
d()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,b){if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=
this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c=
document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/edit.gif");c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));c=document.createElement("img");c.setAttribute("src",Dialog.prototype.clearImage);
c.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));c.setAttribute("width","13");c.setAttribute("height","10");c.style.marginLeft="4px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(c=0;c<b.length;c++){var f=document.createElement("div");f.style.marginTop=null!=d||0<c?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"),
-mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var L=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){L.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!=
+mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var I=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){I.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.selectionHandler=mxUtils.bind(this,function(d,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(d,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,
-this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var C=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){C.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this);
+this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this);
if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=d&&(b=Math.max(b,
-d.y+d.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(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(){J.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var W=mxEdgeHandler.prototype.redrawHandles;
+d.y+d.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(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var D=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(){K.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var W=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(W.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+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function d(){mxActor.call(this)}function h(){mxActor.call(this)}function f(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function g(a,d){this.canvas=
-a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,g.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function r(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function y(){mxShape.call(this)}function D(){mxShape.call(this)}
-function G(){mxEllipse.call(this)}function L(){mxShape.call(this)}function C(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function J(){mxShape.call(this)}function W(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function O(){mxDoubleEllipse.call(this)}function M(){mxArrowConnector.call(this);this.spacing=0}function H(){mxArrowConnector.call(this);this.spacing=0}function R(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}
-function P(){mxActor.call(this)}function X(){mxActor.call(this)}function B(){mxActor.call(this)}function V(){mxActor.call(this)}function N(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function ha(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,h,g,m,p){h+=m;var la=c.clone();c.x-=f*(2*h+m);c.y-=e*(2*h+m);f*=h+m;e*=h+m;return function(){a.ellipse(la.x-f-h,la.y-e-h,2*h,2*h);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
+this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function d(){mxActor.call(this)}function g(){mxActor.call(this)}function f(){mxActor.call(this)}function t(){mxActor.call(this)}function n(){mxActor.call(this)}function l(a,d){this.canvas=
+a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function r(){mxActor.call(this)}function E(){mxActor.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function x(){mxShape.call(this)}function y(){mxShape.call(this)}
+function B(){mxEllipse.call(this)}function I(){mxShape.call(this)}function z(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function D(){mxShape.call(this)}function K(){mxShape.call(this)}function W(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function M(){mxArrowConnector.call(this);this.spacing=0}function J(){mxArrowConnector.call(this);this.spacing=0}function R(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}
+function O(){mxActor.call(this)}function X(){mxActor.call(this)}function A(){mxActor.call(this)}function V(){mxActor.call(this)}function N(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
+function ha(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,k,n,l){g+=n;var la=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(la.x-f-g,la.y-e-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d,f),a.lineTo(d,d),a.lineTo(0,0),a.moveTo(d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(d,f),a.lineTo(0,f-d),a.lineTo(0,0),a.close());a.end()};a.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",
a);var xa=Math.tan(mxUtils.toRadians(30)),pa=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/xa);a.translate((c-d)/2,(f-d)/2+d/4);a.moveTo(0,.25*d);a.lineTo(.5*d,d*pa);a.lineTo(d,.25*d);a.lineTo(.5*d,(.5-pa)*d);a.lineTo(0,.25*d);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(c,f/(.5+xa));e?(a.moveTo(0,.25*d),a.lineTo(.5*
d,(.5-pa)*d),a.lineTo(d,.25*d),a.moveTo(.5*d,(.5-pa)*d),a.lineTo(.5*d,(1-pa)*d)):(a.translate((c-d)/2,(f-d)/2),a.moveTo(0,.25*d),a.lineTo(.5*d,d*pa),a.lineTo(d,.25*d),a.lineTo(d,.75*d),a.lineTo(.5*d,(1-pa)*d),a.lineTo(0,.75*d),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(c,mxCylinder);c.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||
(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,-d);e||(a.moveTo(0,d),a.curveTo(0,-d/3,c,-d/3,c,d),a.lineTo(c,f-d),a.curveTo(c,f+d/3,0,f+d/3,0,f-d),a.close())};c.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",
-c);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5*
-c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
-e?"left"==h?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==h?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",n);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*
-c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",
-t);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};d.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();
-a.end()};mxCellRenderer.registerShape("document",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",h);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded,
-b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};
-mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",m);g.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};g.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)};g.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};g.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};g.prototype.arcTo=function(a,d,b,c,f,e,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=
-h};g.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var h=Math.round(e/10),la=this.defaultVariation;5>h&&(h=5,la/=3);for(var g=b(a-this.lastX)*c/h,b=b(d-this.lastY)*f/h,c=c/e,f=f/e,e=0;e<h;e++){var m=(Math.random()-.5)*la;this.originalLineTo.call(this.canvas,
-g*e+this.lastX-m*f,b*e+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};g.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};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
-function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new g(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};
+c);mxUtils.extend(h,mxCylinder);h.prototype.size=30;h.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",h);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5*
+c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
+e?"left"==g?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==g?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*
+c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",
+u);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};d.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();
+a.end()};mxCellRenderer.registerShape("document",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",g);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded,
+b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(t,mxActor);t.prototype.size=.5;t.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};
+mxCellRenderer.registerShape("curlyBracket",t);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",n);l.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};l.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)};l.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};l.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};l.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=
+g};l.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),k=this.defaultVariation;5>g&&(g=5,k/=3);for(var la=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*k;this.originalLineTo.call(this.canvas,
+la*e+this.lastX-n*f,b*e+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};l.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};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
+function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new l(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};
var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)?e=Math.min(c/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(c*e,f*e)),a.moveTo(d+e,b),a.lineTo(d+c-e,b),a.quadTo(d+c,b,d+c,b+e),a.lineTo(d+c,b+f-e),a.quadTo(d+c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d,
b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.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 d=
-a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};w.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*h,f*h));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground=
-function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),h=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+g),f-b),new mxPoint(h,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
+a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};w.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(k,mxRectangleShape);k.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};k.prototype.paintForeground=
+function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",k);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+k),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
v);mxUtils.extend(r,mxActor);r.prototype.size=.2;r.prototype.fixedSize=20;r.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-
-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],
-this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",A);var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
+d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],
+this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",G);var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ca.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ca.apply(this,[a,d,
-b,c,f]))}};mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};x.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,h;do{h=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=h){var g=this.style["symbol"+e+"Align"],la=this.style["symbol"+e+"VerticalAlign"],m=this.style["symbol"+e+"Width"],p=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||u,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth,
-f+this.strokewidth),u+=v,r+=v);var v=d,k=b,v=g==mxConstants.ALIGN_CENTER?v+(c-m)/2:g==mxConstants.ALIGN_RIGHT?v+(c-m-u):v+u,k=la==mxConstants.ALIGN_MIDDLE?k+(f-p)/2:la==mxConstants.ALIGN_BOTTOM?k+(f-p-r):k+r;a.save();g=new h;g.style=this.style;h.prototype.paintVertexShape.call(g,a,v,k,m,p);a.restore()}e++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",x);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,d,b,c,f,e){e?
-(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(y,mxShape);y.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};
-mxCellRenderer.registerShape("umlActor",y);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};D.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,d,
-b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(C,mxShape);C.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
-a.height/8,a.width,7*a.height/8)};C.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,f/8,c,7*f/8);a.fillAndStroke()};C.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",C);mxUtils.extend(I,mxRectangleShape);I.prototype.size=40;I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=
-function(a){var d=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,d)};I.prototype.paintBackground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=I&&(h=new h,
-h.apply(this.state),a.save(),h.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};I.prototype.paintForeground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",I);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=
-10;E.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))};E.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,h=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
-mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+h,b);a.lineTo(d+h,b+Math.max(0,g-1.5*e));a.lineTo(d+Math.max(0,h-e),b+g);a.lineTo(d,b+g);a.close();a.fillAndStroke();a.begin();
-a.moveTo(d+h,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=I.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
+b,c,f]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};H.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var k=this.style["symbol"+e+"Align"],n=this.style["symbol"+e+"VerticalAlign"],l=this.style["symbol"+e+"Width"],la=this.style["symbol"+e+"Height"],r=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||r,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth,
+f+this.strokewidth),r+=v,t+=v);var v=d,h=b,v=k==mxConstants.ALIGN_CENTER?v+(c-l)/2:k==mxConstants.ALIGN_RIGHT?v+(c-l-r):v+r,h=n==mxConstants.ALIGN_MIDDLE?h+(f-la)/2:n==mxConstants.ALIGN_BOTTOM?h+(f-la-t):h+t;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,v,h,l,la);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",H);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?
+(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(x,mxShape);x.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};
+mxCellRenderer.registerShape("umlActor",x);mxUtils.extend(y,mxShape);y.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};y.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",y);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(a,d,
+b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(I,mxShape);I.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",I);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,f/8,c,7*f/8);a.fillAndStroke()};z.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",z);mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=
+function(a){var d=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,d)};F.prototype.paintBackground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=F&&(g=new g,
+g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};F.prototype.paintForeground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",F);mxUtils.extend(D,mxShape);D.prototype.width=60;D.prototype.height=30;D.prototype.corner=
+10;D.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))};D.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,
+mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,k-1.5*e));a.lineTo(d+Math.max(0,g-e),b+k);a.lineTo(d,b+k);a.close();a.fillAndStroke();a.begin();
+a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+k);a.stroke()};mxCellRenderer.registerShape("umlFrame",D);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=F.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x<
a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",v.prototype.size))*
-d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var f=h.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,m=a.width,p=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=p*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g),new mxPoint(e+
-m,g+f),new mxPoint(e+m,g+p),new mxPoint(e,g+p-f),new mxPoint(e,g)]):(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+m,g),new mxPoint(e+m-f,g+p),new mxPoint(e,g+p),new mxPoint(e+f,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=
-mxUtils.getValue(d.style,"size",e));var h=a.x,g=a.y,m=a.width,p=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+e,g),new mxPoint(h+m-e,g),new mxPoint(h+m,g+p),new mxPoint(h,g+p),new mxPoint(h+e,g)]):d==mxConstants.DIRECTION_WEST?(e=m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m,g),new mxPoint(h+m-e,g+p),new mxPoint(h+e,g+p),new mxPoint(h,
-g)]):d==mxConstants.DIRECTION_NORTH?(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g+e),new mxPoint(h+m,g),new mxPoint(h+m,g+p),new mxPoint(h,g+p-e),new mxPoint(h,g+e)]):(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m,g+e),new mxPoint(h+m,g+p-e),new mxPoint(h,g+p),new mxPoint(h,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<h||b.x>h+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
-mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?r.prototype.fixedSize:r.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var h=a.x,g=a.y,m=a.width,p=a.height,u=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m-
-f,g),new mxPoint(h+m,a),new mxPoint(h+m-f,g+p),new mxPoint(h,g+p),new mxPoint(h+f,a),new mxPoint(h,g)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+f,g),new mxPoint(h+m,g),new mxPoint(h+m-f,a),new mxPoint(h+m,g+p),new mxPoint(h+f,g+p),new mxPoint(h,a),new mxPoint(h+f,g)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g+f),new mxPoint(u,g),new mxPoint(h+m,g+f),new mxPoint(h+m,
-g+p),new mxPoint(u,g+p-f),new mxPoint(h,g+p),new mxPoint(h,g+f)]):(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(u,g+f),new mxPoint(h+m,g),new mxPoint(h+m,g+p-f),new mxPoint(u,g+p),new mxPoint(h,g+p-f),new mxPoint(h,g)]);u=new mxPoint(u,a);c&&(b.x<h||b.x>h+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(g,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=z.prototype.size;null!=
-d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,g=a.width,m=a.height,p=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(p,h),new mxPoint(e+g,h+f),new mxPoint(e+g,h+m-f),new mxPoint(p,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f),new mxPoint(p,h)]):(f=g*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+
-f,h),new mxPoint(e+g-f,h),new mxPoint(e+g,a),new mxPoint(e+g-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,a),new mxPoint(e+f,h)]);p=new mxPoint(p,a);c&&(b.x<e||b.x>e+g?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(h,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();
-a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",J);mxUtils.extend(W,mxShape);W.prototype.size=10;W.prototype.inset=2;W.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+h);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-h,e/2);a.quadTo((c-e)/2-h,e+h,c/
-2,e+h);a.quadTo((c+e)/2+h,e+h,(c+e)/2+h,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",W);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,d,b,c,f,e){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,g=.3*f-d/2,m=.7*f-d/2;e?(a.moveTo(b,g),a.lineTo(h,g),a.lineTo(h,g+d),a.lineTo(b,g+d),a.moveTo(b,m),
-a.lineTo(h,m),a.lineTo(h,m+d),a.lineTo(b,m+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,m+d),a.lineTo(0,m+d),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,g+d),a.lineTo(0,g+d),a.lineTo(0,g),a.lineTo(b,g),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);
-this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",U);mxUtils.extend(O,U);O.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",O);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=4;M.prototype.isOpenEnded=function(){return!0};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};M.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-M);mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=10;H.prototype.defaultArrowWidth=20;H.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};H.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-H);mxUtils.extend(R,mxActor);R.prototype.size=30;R.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",R);mxUtils.extend(K,mxRectangleShape);K.prototype.dx=20;K.prototype.dy=20;K.prototype.isHtmlAllowed=
-function(){return!1};K.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*h,f*h));h=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e);
-a.end();a.stroke();a.begin();a.moveTo(d+h,b);a.lineTo(d+h,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",K);mxUtils.extend(P,mxActor);P.prototype.dx=20;P.prototype.dy=20;P.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,f/2);a.end()};mxCellRenderer.registerShape("crossbar",X);mxUtils.extend(B,mxActor);B.prototype.dx=20;B.prototype.dy=
-20;B.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c-
-d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",B);mxUtils.extend(V,mxActor);V.prototype.arrowWidth=.3;V.prototype.arrowSize=.2;V.prototype.redrawPath=function(a,d,b,c,f){var e=f*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=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("singleArrow",V);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",V.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",V.prototype.arrowSize))));
-b=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",N);mxUtils.extend(Z,mxActor);Z.prototype.size=.1;Z.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,k=a.y,n=a.width,l=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=l*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+
+n,k+f),new mxPoint(e+n,k+l),new mxPoint(e,k+l-f),new mxPoint(e,k)]):(f=n*Math.max(0,Math.min(1,f)),k=[new mxPoint(e+f,k),new mxPoint(e+n,k),new mxPoint(e+n-f,k+l),new mxPoint(e,k+l),new mxPoint(e+f,k)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);c&&(b.x<e||b.x>e+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=
+mxUtils.getValue(d.style,"size",e));var g=a.x,k=a.y,n=a.width,l=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+e,k),new mxPoint(g+n-e,k),new mxPoint(g+n,k+l),new mxPoint(g,k+l),new mxPoint(g+e,k)]):d==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+n,k),new mxPoint(g+n-e,k+l),new mxPoint(g+e,k+l),new mxPoint(g,
+k)]):d==mxConstants.DIRECTION_NORTH?(e=l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k+e),new mxPoint(g+n,k),new mxPoint(g+n,k+l),new mxPoint(g,k+l-e),new mxPoint(g,k+e)]):(e=l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+n,k+e),new mxPoint(g+n,k+l-e),new mxPoint(g,k+l),new mxPoint(g,k)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
+mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?r.prototype.fixedSize:r.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,k=a.y,n=a.width,l=a.height,t=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+n-
+f,k),new mxPoint(g+n,a),new mxPoint(g+n-f,k+l),new mxPoint(g,k+l),new mxPoint(g+f,a),new mxPoint(g,k)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+f,k),new mxPoint(g+n,k),new mxPoint(g+n-f,a),new mxPoint(g+n,k+l),new mxPoint(g+f,k+l),new mxPoint(g,a),new mxPoint(g+f,k)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k+f),new mxPoint(t,k),new mxPoint(g+n,k+f),new mxPoint(g+n,
+k+l),new mxPoint(t,k+l-f),new mxPoint(g,k+l),new mxPoint(g,k+f)]):(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(t,k+f),new mxPoint(g+n,k),new mxPoint(g+n,k+l-f),new mxPoint(t,k+l),new mxPoint(g,k+l-f),new mxPoint(g,k)]);t=new mxPoint(t,a);c&&(b.x<g||b.x>g+n?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(k,t,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=E.prototype.size;null!=
+d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,k=a.width,n=a.height,l=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(l,g),new mxPoint(e+k,g+f),new mxPoint(e+k,g+n-f),new mxPoint(l,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(l,g)]):(f=k*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+
+f,g),new mxPoint(e+k-f,g),new mxPoint(e+k,a),new mxPoint(e+k-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);l=new mxPoint(l,a);c&&(b.x<e||b.x>e+k?l.y=b.y:l.x=b.x);return mxUtils.getPerimeterPoint(g,l,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(K,mxShape);K.prototype.size=10;K.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();
+a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",K);mxUtils.extend(W,mxShape);W.prototype.size=10;W.prototype.inset=2;W.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/
+2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",W);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,k=.3*f-d/2,n=.7*f-d/2;e?(a.moveTo(b,k),a.lineTo(g,k),a.lineTo(g,k+d),a.lineTo(b,k+d),a.moveTo(b,n),
+a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,k+d),a.lineTo(0,k+d),a.lineTo(0,k),a.lineTo(b,k),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);
+this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",U);mxUtils.extend(Q,U);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=4;M.prototype.isOpenEnded=function(){return!0};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};M.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+M);mxUtils.extend(J,mxArrowConnector);J.prototype.defaultWidth=10;J.prototype.defaultArrowWidth=20;J.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};J.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};J.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
+J);mxUtils.extend(R,mxActor);R.prototype.size=30;R.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",R);mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=
+function(){return!1};L.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));g=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e);
+a.end();a.stroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",L);mxUtils.extend(O,mxActor);O.prototype.dx=20;O.prototype.dy=20;O.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",O);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,f/2);a.end()};mxCellRenderer.registerShape("crossbar",X);mxUtils.extend(A,mxActor);A.prototype.dx=20;A.prototype.dy=
+20;A.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c-
+d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",A);mxUtils.extend(V,mxActor);V.prototype.arrowWidth=.3;V.prototype.arrowSize=.2;V.prototype.redrawPath=function(a,d,b,c,f){var e=f*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=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",V);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",V.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",V.prototype.arrowSize))));
+b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",N);mxUtils.extend(Z,mxActor);Z.prototype.size=.1;Z.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Z);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",aa);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close();
a.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,.8*d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
T);mxUtils.extend(da,mxActor);da.prototype.size=.375;da.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",da);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=
@@ -2496,76 +2498,76 @@ arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end
function(a,d,b,c,f){var e=b+f-5;a.begin();a.moveTo(d,b);a.lineTo(d,b+f);a.moveTo(d,e);a.lineTo(d+10,e-5);a.moveTo(d,e);a.lineTo(d+10,e+5);a.moveTo(d,e);a.lineTo(d+c,e);a.moveTo(d+c,b);a.lineTo(d+c,b+f);a.moveTo(d+c,e);a.lineTo(d+c-10,e-5);a.moveTo(d+c,e);a.lineTo(d+c-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ra);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,d,b,c,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,
arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(d,b,c,f),a.fill(),a.begin(),a.moveTo(d,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(d+c,b):a.moveTo(d+c,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(d+c,b+f):a.moveTo(d+c,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(d,b+f):a.moveTo(d,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(d,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ha);mxUtils.extend(ia,
mxEllipse);ia.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(d+c/2,b),a.lineTo(d+c/2,b+f)):(a.moveTo(d,b+f/2),a.lineTo(d+c,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ia);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);a.moveTo(0,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(0,
-f);a.close();a.end()};mxCellRenderer.registerShape("delay",ca);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(f-e)/2;b=d+e;var h=(c-e)/2,e=h+e;a.moveTo(0,d);a.lineTo(h,d);a.lineTo(h,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(h,f);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",
+f);a.close();a.end()};mxCellRenderer.registerShape("delay",ca);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(f-e)/2;b=d+e;var g=(c-e)/2,e=g+e;a.moveTo(0,d);a.lineTo(g,d);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",
ja);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);b=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ka);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,d,b){for(var c=
[],f=0;f<d.length;f++)c.push(mxUtils.clone(d[f]));var f=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,c,b]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),oa.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;
-StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,h,g,m,p){var u=f*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,h,g,m,
-p){var u=f*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.moveTo(c.x-u/2+r/2,c.y-r/2-u/2);a.lineTo(c.x-r/2-3*u/2,c.y-3*r/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,h,g,m,p){var u=c.clone(),r=Aa.apply(this,arguments),v=f*(h+2*m),k=e*(h+2*m);return function(){r.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*v+f*m,u.y-2*k+e*m);a.moveTo(u.x-
-v-k+e*m,u.y-k+v-f*m);a.lineTo(u.x+k-v-e*m,u.y-k-v+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,h,g,m,p){d=f*m*1.118;b=e*m*1.118;f*=h+m;e*=h+m;var u=c.clone();u.x-=d;u.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);g?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,h,g,m,p,u){e*=g+p;h*=g+p;var r=
-f.clone();return function(){d.begin();d.moveTo(r.x,r.y);m?d.lineTo(r.x-e-h/a,r.y-h+e/a):d.lineTo(r.x+h/a-e,r.y-h-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,d,b){return sa(a,["width"],d,function(d,c,f,e,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*h/2,e.y+f*d/4-c*h/2)},function(d,c,f,e,h,g){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return Q(a,d,
-function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var h=a.view.scale,g=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-g.x,m=f.y-g.y,p=Math.sqrt(e*e+m*m),g=c.call(this,p,e/p,m/p,g,f);return new mxPoint(g.x/h-d.x,g.y/h-d.y)},function(d,c,e){var h=a.absolutePoints,g=h.length-1;d=a.view.translate;var m=a.view.scale,p=b?h[0]:h[g],h=b?h[1]:h[g-1],g=h.x-p.x,u=h.y-p.y,r=Math.sqrt(g*g+u*u);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;f.call(this,r,g/r,u/r,p,h,c,e)})},ma=function(a){return function(d){return[Q(d,["arrowWidth",
+StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,k,n,l){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-t/2,c.y-t/2+r/2);a.lineTo(c.x+t/2-3*r/2,c.y-3*t/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,k,n,
+l){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-t/2,c.y-t/2+r/2);a.lineTo(c.x+t/2-3*r/2,c.y-3*t/2-r/2);a.moveTo(c.x-r/2+t/2,c.y-t/2-r/2);a.lineTo(c.x-t/2-3*r/2,c.y-3*t/2+r/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,k,n,l){var r=c.clone(),t=Aa.apply(this,arguments),v=f*(g+2*n),h=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*v+f*n,r.y-2*h+e*n);a.moveTo(r.x-
+v-h+e*n,r.y-h+v-f*n);a.lineTo(r.x+h-v-e*n,r.y-h-v+f*n);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,k,n,l){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=c.clone();r.x-=d;r.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);k?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,k,n,l,r){e*=k+l;g*=k+l;var t=
+f.clone();return function(){d.begin();d.moveTo(t.x,t.y);n?d.lineTo(t.x-e-g/a,t.y-g+e/a):d.lineTo(t.x+g/a-e,t.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,d,b){return sa(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,k){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return P(a,d,
+function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,k=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-k.x,n=f.y-k.y,l=Math.sqrt(e*e+n*n),k=c.call(this,l,e/l,n/l,k,f);return new mxPoint(k.x/g-d.x,k.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,k=g.length-1;d=a.view.translate;var n=a.view.scale,l=b?g[0]:g[k],g=b?g[1]:g[k-1],k=g.x-l.x,r=g.y-l.y,t=Math.sqrt(k*k+r*r);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,t,k/t,r/t,l,g,c,e)})},ma=function(a){return function(d){return[P(d,["arrowWidth",
"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",V.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",V.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},ya=function(a,d,b){return function(c){var f=
-[Q(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var h=[Q(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var h=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=h?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));h&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fa(e));return h}},Ea=function(a){return function(d){var b=
-[Q(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d}},fa=function(a,d){return Q(a,
+[P(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(fa(e));return g}},Ea=function(a){return function(d){var b=
+[P(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d}},fa=function(a,d){return P(a,
[mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*
-f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},Q=function(a,d,b,c,f,e){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};
-h.getPosition=b;h.setPosition=c;h.ignoreGrid=null!=f?f:!0;if(e){var g=h.positionChanged;h.positionChanged=function(){g.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},za={link:function(a){return[Da(a,!0,10),Da(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
-b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;
-a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,
-Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth=
+f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},P=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};
+g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var k=g.positionChanged;g.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Da(a,!0,10),Da(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
+b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,k,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;
+a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
+a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,k,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,
+Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth=
a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(sa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,
-e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
-d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,h,g,m){b=
-Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[Q(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),
+e,g,k,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,k,n){b=
+Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[P(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),
d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(fa(a,b/2))}return d},
-label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[Q(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
-"width",E.prototype.width))),b=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[Q(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",w.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},cross:function(a){return[Q(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ja.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,
-a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=
-[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",R.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},dataStorage:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.x+
-(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[Q(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,
-"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),Q(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),Q(a,["base"],function(a){var d=
+label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[P(a,["width","height"],function(a){var d=Math.max(D.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",D.prototype.width))),b=Math.max(1.5*D.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",D.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(D.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*D.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[P(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",w.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},cross:function(a){return[P(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ja.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=
+[P(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",R.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},dataStorage:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.x+
+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[P(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,
+"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),P(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),P(a,["base"],function(a){var d=
Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,
-d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},internalStorage:function(a){var d=[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",K.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",K.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},corner:function(a){return[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",B.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",B.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),
-folder:function(a){return[Q(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,
-"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[Q(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},
-tape:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},
-function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:ua(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ua(z.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=Q;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
+d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},internalStorage:function(a){var d=[P(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d},corner:function(a){return[P(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[P(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",A.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",A.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),
+folder:function(a){return[P(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,
+"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},
+tape:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[P(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},
+function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:ua(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ua(E.prototype.size,!0,.5,!0),curlyBracket:ua(t.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=P;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);
-a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=c&&(c=e.transformControlPoint(a,
-c));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,p=va.y,u=wa.x,r=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=h&&null!=g){a=function(a,d,b){a-=k.x;var c=d-k.y;d=(r*a-u*c)/(m*r-p*u);a=(p*a-m*c)/(p*u-m*r);v?(b&&(k=new mxPoint(k.x+m*d,k.y+p*d),f.push(k)),k=new mxPoint(k.x+u*a,k.y+r*a)):(b&&(k=new mxPoint(k.x+u*a,k.y+r*a),f.push(k)),k=new mxPoint(k.x+m*d,k.y+p*d));f.push(k)};
-var k=g;null==c&&(c=new mxPoint(g.x+(h.x-g.x)/2,g.y+(h.y-g.y)/2));a(c.x,c.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints=
+a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,
+c));null==k&&null!=d&&(k=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=va.x,l=va.y,r=wa.x,t=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){a=function(a,d,b){a-=h.x;var c=d-h.y;d=(t*a-r*c)/(n*t-l*r);a=(l*a-n*c)/(l*r-n*t);v?(b&&(h=new mxPoint(h.x+n*d,h.y+l*d),f.push(h)),h=new mxPoint(h.x+r*a,h.y+t*a)):(b&&(h=new mxPoint(h.x+r*a,h.y+t*a),f.push(h)),h=new mxPoint(h.x+n*d,h.y+l*d));f.push(h)};
+var h=k;null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=
-mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=
mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;
T.prototype.constraints=mxRectangleShape.prototype.constraints;da.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)];y.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,
+.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,
1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Y.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)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
+.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)];m.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)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
0),!1)];r.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
+.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
-.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];h.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;B.prototype.constraints=null;P.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;A.prototype.constraints=null;O.prototype.constraints=null;X.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)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
-new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];I.prototype.constraints=null;aa.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,
+new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];F.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",function(){c.openLink(b.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(h){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+h.message)}}));b.showDialog((new OpenDialog(this)).container,
-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
-function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
+Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",function(){c.openLink(b.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,
+320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
+function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=h;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(c)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate();try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var d=0;d<b.length&&
-a;d++)a=a&&c.model.isEdge(b[d]);var e=c.view.translate,f=c.view.scale,p=e.x,m=e.y,e=null;if(1==b.length&&a){var g=c.getCellGeometry(b[0]);null!=g&&(e=g.getTerminalPoint(!0))}e=null!=e?e:c.getBoundingBoxFromGeometry(b,a);if(null!=e){var k=Math.round(c.snap(c.popupMenuHandler.triggerX/f-p)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/f-m));c.cellsMoved(b,k-e.x,u-e.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+a;d++)a=a&&c.model.isEdge(b[d]);var e=c.view.translate,f=c.view.scale,t=e.x,n=e.y,e=null;if(1==b.length&&a){var l=c.getCellGeometry(b[0]);null!=l&&(e=l.getTerminalPoint(!0))}e=null!=e?e:c.getBoundingBoxFromGeometry(b,a);if(null!=e){var h=Math.round(c.snap(c.popupMenuHandler.triggerX/f-t)),k=Math.round(c.snap(c.popupMenuHandler.triggerY/f-n));c.cellsMoved(b,h-e.x,k-e.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){c.setSelectionCells(c.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){c.turnShapes(c.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()},
null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.isCellMovable(c.getSelectionCell())?1:0;c.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);c.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);c.toggleCellStyles(mxConstants.STYLE_ROTATABLE,
a);c.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);c.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);c.toggleCellStyles("connectable",a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){c.home()},null,null,"Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)},
@@ -2573,48 +2575,48 @@ null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){c.foldCells
c.getSelectionCount()&&0==c.getModel().getChildCount(c.getSelectionCell())?c.setCellStyles("container","0"):c.setSelectionCells(c.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){c.removeCellsFromParent()});this.addAction("edit",function(){c.isEnabled()&&c.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=c.getSelectionCell()||c.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container,
340,340,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var e=c.value.getAttribute("tooltip");null!=e&&(d=e)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=
c.getLinkForCell(c.getSelectionCell());null!=a&&c.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(d){d=mxUtils.trim(d);a.setLinkForCell(c,0<d.length?d:null)})}},null,null,"Alt+Shift+L");this.addAction("insertLink...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),
-function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,h=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var f=a.indexOf(",");0<f&&(h=b.getPageById(a.substring(f+1)),h=null!=h?h.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,h=e[0].name||e[0].type,h=h.charAt(0).toUpperCase()+h.substring(1),30<h.length&&(h=h.substring(0,30)+"..."));f=c.getFreeInsertPoint();d=new mxCell(h,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
-(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);c.scrollCellToVisible(c.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=
-a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var e=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(e);null!=d&&a.insertLink(d)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();try{for(var b=
+function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,g=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var f=a.indexOf(",");0<f&&(g=b.getPageById(a.substring(f+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,g=e[0].name||e[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));f=c.getFreeInsertPoint();d=new mxCell(g,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);c.scrollCellToVisible(c.getSelectionCell())}})}).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=
+a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var e=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(e);null!=d&&a.insertLink(d)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();try{for(var b=
0;b<a.length;b++){var d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d],20);else{var e=c.view.getState(d),f=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=e&&null!=e.text&&null!=f&&c.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,f)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=
-a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var h=document.createElement("div");h.innerHTML=d;d=mxUtils.extractTextWithWhitespace(h.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
+a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=d;d=mxUtils.extractTextWithWhitespace(g.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
c.sanitizeHtml(d));c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=c.getView().getState(c.getSelectionCell());
null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&c.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){c.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
this.addAction("zoomOut",function(a){c.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){c.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/a.width/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=
a.y*c.view.scale,c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/(2*a.width)/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=Math.min(a.y,
(c.container.scrollHeight-c.container.clientHeight)/2),c.container.scrollLeft=Math.min(a.x,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();c.zoomTo(Math.floor(20*(c.container.clientWidth-10)/c.pageFormat.width/c.pageScale)/20);if(mxUtils.hasScrollbars(c.container)){var a=c.getPagePadding();c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-
c.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
-parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){c.setGridEnabled(!c.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isGridEnabled()});l.setEnabled(!1);
-l=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=
-new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return c.pageVisible});
-l=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});
-l=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var n=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){n||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){n=!1}),n=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,e){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){c.setGridEnabled(!c.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.isGridEnabled()});m.setEnabled(!1);
+m=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=
+new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.foldingEnabled});m.isEnabled=h;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return c.pageVisible});
+m=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});
+m=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var a=
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,b,d,e){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
b),(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?c.updateLabelElements(c.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?c.updateLabelElements(c.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.updateLabelElements(c.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&
-c.replaceElement(a)})}finally{c.getModel().endUpdate()}}},null,null,e)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
+c.replaceElement(a)})}finally{c.getModel().endUpdate()}}},null,null,e)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,null),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});
this.addAction("dashed",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dotted",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("sharp",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});
this.addAction("rounded",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!c.isSelectionEmpty()&&c.isEnabled()){c.getModel().beginUpdate();try{var a=c.getSelectionCells(),e=c.view.getState(a[0]),
-d=null!=e?e.style:c.getCellStyle(a[0]),h="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,h);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[h,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,
+d=null!=e?e.style:c.getCellStyle(a[0]),g="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,g);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,
"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=c.view.getState(c.getSelectionCell()),e="1";null!=a&&null!=c.getFoldingImage(a)&&(e="0");c.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",c.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var a=c.getSelectionCells();if(null!=a&&0<a.length){var b=c.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(d){null!=d&&c.setCellStyle(mxUtils.trim(d),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){c.isEnabled()&&!c.isSelectionEmpty()&&b.setDefaultStyle(c.getSelectionCell())},null,null,Editor.ctrlKey+
-"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var d=c.view.translate,h=c.view.scale,f=d.x,d=d.y,a=c.getModel().getParent(a),p=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=p;)f+=p.x,d+=p.y,a=c.getModel().getParent(a),p=
-c.getCellGeometry(a);f=Math.round(c.snap(c.popupMenuHandler.triggerX/h-f));h=Math.round(c.snap(c.popupMenuHandler.triggerY/h-d));b.addPointAt(b.state,f,h)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var e=
-c.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,c.getModel().setGeometry(d,e))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
-function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var h=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(h),c.insertImage(a,d,b);else{var f=c.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var e=null;c.getModel().beginUpdate();
-try{if(0==f.length){var m=c.getFreeInsertPoint(),e=f=[c.insertVertex(c.getDefaultParent(),null,"",m.x,m.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",e))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var p=c.view.getState(f[0]),r=null!=p?p.style:c.getCellStyle(f[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=d&&null!=b){var k=f[0],l=c.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=d,l.height=b,c.getModel().setGeometry(k,l))}}finally{c.getModel().endUpdate()}null!=e&&(c.setSelectionCells(e),c.scrollCellToVisible(e[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
-(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
-this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
+"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var d=c.view.translate,g=c.view.scale,f=d.x,d=d.y,a=c.getModel().getParent(a),t=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=t;)f+=t.x,d+=t.y,a=c.getModel().getParent(a),t=
+c.getCellGeometry(a);f=Math.round(c.snap(c.popupMenuHandler.triggerX/g-f));g=Math.round(c.snap(c.popupMenuHandler.triggerY/g-d));b.addPointAt(b.state,f,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var e=
+c.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,c.getModel().setGeometry(d,e))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
+function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var g=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(g),c.insertImage(a,d,b);else{var f=c.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var e=null;c.getModel().beginUpdate();
+try{if(0==f.length){var k=c.getFreeInsertPoint(),e=f=[c.insertVertex(c.getDefaultParent(),null,"",k.x,k.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",e))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var n=c.view.getState(f[0]),r=null!=n?n.style:c.getCellStyle(f[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=d&&null!=b){var t=f[0],h=c.getModel().getGeometry(t);null!=h&&(h=h.clone(),h.width=d,h.height=b,c.getModel().setGeometry(t,h))}}finally{c.getModel().endUpdate()}null!=e&&(c.setSelectionCells(e),c.scrollCellToVisible(e[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=h;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
+(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=h;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
+this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",
mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
-null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,c,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,c,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,e,c,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=c;this.shortcut=k;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,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,c,h){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,e,c,h))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,c,h){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=c;this.shortcut=h;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.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||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};
+DrawioFile.prototype.move=function(a,b,e){};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};
DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
@@ -2624,8 +2626,8 @@ DrawioFile.prototype.autosave=function(a,b,e,c){null==this.lastAutosave&&(this.l
mxUtils.bind(this,function(a){null!=c&&c(a)}))}else null!=e&&e(null)}),a)};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.close=function(a){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 e=a.lastIndexOf("."),c=0<e?a.substring(e):"",e=b.lastIndexOf(".");return c===(0<e?b.substring(e):"")}return a==b};
DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,b,e,c){DrawioFile.call(this,a,b);this.title=e;this.mode=c?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};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,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
-LocalFile.prototype.saveFile=function(a,b,e,c){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
+LocalFile.prototype.saveFile=function(a,b,e,c){this.title=a;this.updateFileData();b=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -2641,34 +2643,34 @@ null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.len
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 f=new mxCodec(c.ownerDocument);f.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");b=d.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);
mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1)}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 d=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&d.setAttribute("style",this.graph.currentStyle);
null!=this.graph.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));d.setAttribute("math",this.graph.mathEnabled?"1":"0");d.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return d};Editor.prototype.isDataSvg=function(a){try{var d=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),
-null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(z){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
+null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(E){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
a=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0]),b=this.graph.decompress(b),0<b.length&&(c=mxUtils.parseXml(b),a=c.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),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)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
null==a||d||(c=null,"diagram"==a.nodeName?c=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(c=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=c&&(b=this.graph.decompress(mxUtils.getTextContent(c)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,d){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
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 b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
d){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;c[0].parentNode.appendChild(f)}};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 d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,f){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==f&&d.push(f);return""});/,\s*$/.test(a)&&d.push("");return d};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=t.apply(this,arguments);if(mxClient.IS_SVG){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",
-this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),
-function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},
-{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var h=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=
-mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+
-" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),h=0;h<e.length;h++)f=mxUtils.removeStylename(f,e[h]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,
-a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";null!=a?(null!=
-a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":d.style.backgroundColor=a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");f.appendChild(d)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,
-4)&&mxUtils.br(f),d(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="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(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));var g=document.createElement("div");g.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(h),a.appendChild(g));mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(g);d(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+var d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,f){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==f&&d.push(f);return""});/,\s*$/.test(a)&&d.push("");return d};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+q.apply(this,arguments):this.clear()};var u=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=u.apply(this,arguments);var d=this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&("1"==urlParams.embed||null!=d&&d.isEditable())){var b=this.editorUi,c=b.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var d=new ChangePageSetup(b);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;c.model.execute(d)},{install:function(a){this.listener=
+function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&
+(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
+stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
+{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"}]];var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments)};var f=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
+d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return f.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
+e[g]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height=
+"30px";d.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":d.style.backgroundColor=a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");f.appendChild(d)}f.innerHTML=
+"";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),d(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="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(" ");
+null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(g),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(k);d(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(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 c=this.editorUi.editor.graph,f=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d)):d.image&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==b?d.style.width="202px":
(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}p.apply(this,arguments);var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var t=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}t.apply(this,arguments);var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;
this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,d){d.height=Math.max(d.height,20);if(1<d.height/20){var b=d.height%20;d.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
-d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var m=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){m.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
+d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var n=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){n.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
d,b){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,c,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1;
var c=a.ownerDocument,f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");
e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"):
@@ -2681,317 +2683,317 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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 d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var g=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,h,m,p,k){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);
-null!=u&&mxStencilRegistry.getStencil(u)}return g.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){w.value=Math.max(1,Math.min(g,Math.max(parseInt(w.value),parseInt(l.value))));l.value=Math.max(1,Math.min(g,Math.min(parseInt(w.value),parseInt(l.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),h=0,g=0,m=aa.get(),p=1/d.pageScale,k=t.checked;if(k)var p=parseInt(N.value),r=parseInt(Z.value),p=Math.min(m.height*r/(e.height/d.view.scale),m.width*p/(e.width/
-d.view.scale));else p=parseInt(q.value)/(100*d.pageScale),isNaN(p)&&(c=1/d.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*c);m.height=Math.ceil(m.height*c);p*=c;!k&&d.pageVisible?(e=d.getPageLayout(),h-=e.x*m.width,g-=e.y*m.height):k=!0;if(null==b){b=PrintDialog.createPrintPreview(d,p,m,0,h,g,k);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var u=b.writeHead;b.writeHead=function(d){u.apply(this,arguments);null!=a.editor.fontCss&&
-(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var l=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var h=l.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=k;b.appendGraph(d,p,h,g,f,!0)}return b}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value=
-"100 %");var c=.75*c,e=l.value,h=w.value,g=!k.checked,p=null;g&&(g=e==m&&h==m);if(!g&&null!=a.pages&&a.pages.length){var r=0,g=a.pages.length-1;k.checked||(r=parseInt(e)-1,g=parseInt(h)-1);for(var u=r;u<=g;u++){var v=a.pages[u],e=v==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),h=!0,r=!1,n=null,C=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(h=v.viewState.pageVisible,r=v.viewState.mathEnabled,n=v.viewState.background,
-C=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(r="0"!=v.mapping.diagramMap.get("mathEnabled"),n=v.mapping.diagramMap.get("background"),C=v.mapping.diagramMap.get("backgroundImage"),C=null!=C&&0<C.length?JSON.parse(C):null);e.background=n;e.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;e.pageVisible=h;e.mathEnabled=r;var z=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?u+1:z.apply(this,arguments)};document.body.appendChild(e.container);
-a.updatePageRoot(v);e.model.setRoot(v.root)}p=b(e,p,u!=g);e!=f&&e.container.parentNode.removeChild(e.container)}}else p=b(f);p.mathEnabled&&(g=p.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),d&&(g.writeln("MathJax.Hub.Queue(function () {"),g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));p.closeDocument();!p.mathEnabled&&d&&PrintDialog.printPreview(p)}
-var f=a.editor.graph,e=document.createElement("div"),h=document.createElement("h3");h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,d||mxResources.get("print"));e.appendChild(h);var g=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");
-k.setAttribute("name","pages-printdialog");p.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("printAllPages"));p.appendChild(h);mxUtils.br(p);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");p.appendChild(u);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+":");p.appendChild(h);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type",
-"number");l.setAttribute("min","1");l.style.width="50px";p.appendChild(l);h=document.createElement("span");mxUtils.write(h,mxResources.get("to"));p.appendChild(h);var w=l.cloneNode(!0);p.appendChild(w);mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+
-1;l.value=m;w.value=m;break}l.setAttribute("max",g);w.setAttribute("max",g);1<g&&e.appendChild(p);var v=document.createElement("div");v.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");v.appendChild(n);h=document.createElement("span");mxUtils.write(h,mxResources.get("adjustTo"));v.appendChild(h);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";
-q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});e.appendChild(v);var p=p.cloneNode(!1),t=n.cloneNode(!0);t.setAttribute("value","fit");n.setAttribute("checked","checked");h=document.createElement("div");h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";h.appendChild(t);p.appendChild(h);v=document.createElement("table");v.style.display="inline-block";var O=document.createElement("tbody"),
-M=document.createElement("tr"),H=M.cloneNode(!0),R=document.createElement("td"),K=R.cloneNode(!0),P=R.cloneNode(!0),X=R.cloneNode(!0),B=R.cloneNode(!0),V=R.cloneNode(!0);R.style.textAlign="right";X.style.textAlign="right";mxUtils.write(R,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";K.appendChild(N);h=document.createElement("span");mxUtils.write(h,
-mxResources.get("fitToSheetsAcross"));P.appendChild(h);mxUtils.write(X,mxResources.get("fitToBy"));var Z=N.cloneNode(!0);B.appendChild(Z);mxEvent.addListener(N,"focus",function(){t.checked=!0});mxEvent.addListener(Z,"focus",function(){t.checked=!0});h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsDown"));V.appendChild(h);M.appendChild(R);M.appendChild(K);M.appendChild(P);H.appendChild(X);H.appendChild(B);H.appendChild(V);O.appendChild(M);O.appendChild(H);v.appendChild(O);
-p.appendChild(v);e.appendChild(p);p=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom="12px";mxUtils.write(h,mxResources.get("paperSize"));p.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var aa=PageSetupDialog.addPageFormatPanel(h,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));p.appendChild(h);
-var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";p.appendChild(S);e.appendChild(p);h=document.createElement("div");h.style.cssText="text-align:right;margin:62px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&h.appendChild(p);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-v.className="geBtn",h.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),v.className="geBtn",h.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});v.className="geBtn gePrimaryBtn";h.appendChild(v);a.editor.cancelFirst||h.appendChild(p);e.appendChild(h);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+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 d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var l=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,n,t,h){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);
+null!=k&&mxStencilRegistry.getStencil(k)}return l.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){m.value=Math.max(1,Math.min(n,Math.max(parseInt(m.value),parseInt(w.value))));w.value=Math.max(1,Math.min(n,Math.min(parseInt(m.value),parseInt(w.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,n=0,k=aa.get(),l=1/d.pageScale,t=u.checked;if(t)var l=parseInt(N.value),r=parseInt(Z.value),l=Math.min(k.height*r/(e.height/d.view.scale),k.width*l/(e.width/
+d.view.scale));else l=parseInt(q.value)/(100*d.pageScale),isNaN(l)&&(c=1/d.pageScale,q.value="100 %");k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*c);k.height=Math.ceil(k.height*c);l*=c;!t&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*k.width,n-=e.y*k.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(d,l,k,0,g,n,t);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var h=b.writeHead;b.writeHead=function(d){h.apply(this,arguments);null!=a.editor.fontCss&&
+(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var g=w.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{k=d.background;if(null==k||""==k||k==mxConstants.NONE)k="#ffffff";b.backgroundColor=k;b.autoOrigin=t;b.appendGraph(d,l,g,n,f,!0)}return b}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value=
+"100 %");var c=.75*c,e=w.value,g=m.value,n=!t.checked,l=null;n&&(n=e==k&&g==k);if(!n&&null!=a.pages&&a.pages.length){var r=0,n=a.pages.length-1;t.checked||(r=parseInt(e)-1,n=parseInt(g)-1);for(var h=r;h<=n;h++){var v=a.pages[h],e=v==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,r=!1,p=null,z=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(g=v.viewState.pageVisible,r=v.viewState.mathEnabled,p=v.viewState.background,
+z=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(r="0"!=v.mapping.diagramMap.get("mathEnabled"),p=v.mapping.diagramMap.get("background"),z=v.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);e.background=p;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;e.pageVisible=g;e.mathEnabled=r;var D=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?h+1:D.apply(this,arguments)};document.body.appendChild(e.container);
+a.updatePageRoot(v);e.model.setRoot(v.root)}l=b(e,l,h!=n);e!=f&&e.container.parentNode.removeChild(e.container)}}else l=b(f);l.mathEnabled&&(n=l.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),d&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));l.closeDocument();!l.mathEnabled&&d&&PrintDialog.printPreview(l)}
+var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var n=1,k=1,l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");
+t.setAttribute("name","pages-printdialog");l.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));l.appendChild(g);mxUtils.br(l);var h=t.cloneNode(!0);t.setAttribute("checked","checked");h.setAttribute("value","range");l.appendChild(h);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");l.appendChild(g);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type",
+"number");w.setAttribute("min","1");w.style.width="50px";l.appendChild(w);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));l.appendChild(g);var m=w.cloneNode(!0);l.appendChild(m);mxEvent.addListener(w,"focus",function(){h.checked=!0});mxEvent.addListener(m,"focus",function(){h.checked=!0});mxEvent.addListener(w,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){k=g+
+1;w.value=k;m.value=k;break}w.setAttribute("max",n);m.setAttribute("max",n);1<n&&e.appendChild(l);var v=document.createElement("div");v.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");v.appendChild(p);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));v.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";
+q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){p.checked=!0});e.appendChild(v);var l=l.cloneNode(!1),u=p.cloneNode(!0);u.setAttribute("value","fit");p.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(u);l.appendChild(g);v=document.createElement("table");v.style.display="inline-block";var Q=document.createElement("tbody"),
+M=document.createElement("tr"),J=M.cloneNode(!0),R=document.createElement("td"),L=R.cloneNode(!0),O=R.cloneNode(!0),X=R.cloneNode(!0),A=R.cloneNode(!0),V=R.cloneNode(!0);R.style.textAlign="right";X.style.textAlign="right";mxUtils.write(R,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";L.appendChild(N);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));O.appendChild(g);mxUtils.write(X,mxResources.get("fitToBy"));var Z=N.cloneNode(!0);A.appendChild(Z);mxEvent.addListener(N,"focus",function(){u.checked=!0});mxEvent.addListener(Z,"focus",function(){u.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));V.appendChild(g);M.appendChild(R);M.appendChild(L);M.appendChild(O);J.appendChild(X);J.appendChild(A);J.appendChild(V);Q.appendChild(M);Q.appendChild(J);v.appendChild(Q);
+l.appendChild(v);e.appendChild(l);l=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));l.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var aa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);l.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));l.appendChild(g);
+var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";l.appendChild(S);e.appendChild(l);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&g.appendChild(l);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+v.className="geBtn",g.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),v.className="geBtn",g.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});v.className="geBtn gePrimaryBtn";g.appendChild(v);a.editor.cancelFirst||g.appendChild(l);e.appendChild(g);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(w.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))}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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.sidebarFooterHeight=36;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.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"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
-!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&
-6<a.length}catch(g){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();
-EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,
-length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,e){var h=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color="white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",h.style.paddingLeft="10px",h.style.paddingRight=
-"10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),h.innerHTML=e+"...",c.appendChild(h),d.status=h,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/2))+"px",h.style.top=Math.round(Math.max(0,
-b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),h=!0);return h};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b,e)}function f(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var h=d(a,4);if(null!=b&&b(e-8,h,c))break;value=d(a,c);d(a,4);if("IEND"==h)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};
-var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(d),g=this.editor.extractGraphModel(m.documentElement,null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(w){}return b};EditorUi.prototype.validateFileData=
-function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");
-if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(c[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,g,0==e?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])),d.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(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,m,g,k,u,l,r){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;l=null!=l?l:!0;var d,f=null;null==c||
-c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":f=d=e;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(p);if(b.decompress(h)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,h);h=a.ownerDocument.createElement("mxfile");h.appendChild(p)}r?(h=h.cloneNode(!0),h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.setAttribute("userAgent",
-navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!g&&!m&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=c?c.getTitle():null,d,f);else if(g||!m&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,l,f);return a};EditorUi.prototype.getXmlFileData=
-function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var h=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=h&&h.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(h.graphModel),
-h.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[e].node,c),h.needsUpdate=!1);d.appendChild(this.pages[e].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,m,g,k,u,l){m=null!=m?m:!0;k=null!=k?k:this.getXmlFileData(m,null!=g?g:!1);l=null!=l?l:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());
-var d=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(k,g,l,window.location.href,a,b,c,e,m,u);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,m,g){g=null!=g?g:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=g?b.getGraphBounds():
-b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;g=Math.floor(d.x/h-b.view.translate.x);h=Math.floor(d.y/h-b.view.translate.y);d=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",h)}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!=e&&a.setAttribute("edit",e));null!=
-m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?
-'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,m){null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\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==m?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-m+'" target="_blank"><img border="0" src="https://www.draw.io/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;var d=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=
-d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,m,g){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();
-var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,m));this.saveData(f,a,h,"text/xml")}else if("html"==a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,
-function(d,b){try{var c=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var f=this.createDownloadRequest(d,a,e,b);this.editor.graph.pageVisible=c;return f}catch(L){this.handleError(L)}}));else{var p=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var l=this.editor.graph.background;
-l==mxConstants.NONE&&(l=null);var n=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?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 f=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(F){this.handleError(F)}};
-EditorUi.prototype.createDownloadRequest=function(a,b,c,e){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var h=0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){f="&from="+h;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+
-d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();
-this.editor.graph.model.clear();this.editor.undoManager.clear();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.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
-this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
-this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(m){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(m){}}catch(m){null!=
-window.console&&console.log("error in fileLoaded:",a,m);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=m&&null!=m.message?":err:"+encodeURIComponent(m.message):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}catch(g){}this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+
-(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(f){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,m,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".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 d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};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 d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=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:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=
-function(a){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&
-(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=
-0;c<d.length;c++){var e=d[c],h=e.data;if(null!=h){var h=this.convertDataUri(h),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+h,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(h=this.stringToCells(this.editor.graph.decompress(e.xml)),0<h.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(h,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
-b)for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));
-return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var l=k.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var r=document.createElement("div");r.style.position="absolute";r.style.right="0px";r.style.top=
-"5px";mxClient.IS_QUIRKS||8==document.documentMode||(r.style.backgroundColor="inherit");l.style.position="relative";var n=document.createElement("img");n.setAttribute("src",Dialog.prototype.closeImage);n.setAttribute("title",mxResources.get("close"));n.setAttribute("align","top");n.setAttribute("border","0");n.className="geButton";n.style.marginRight="1px";n.style.marginTop="-1px";r.appendChild(n);var q=null;mxEvent.addListener(n,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var x=this.editor.graph,t=null,y=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=n.cloneNode(!1),
-t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",r.insertBefore(t,r.firstChild),l.style.paddingRight=18*r.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),l.style.paddingRight=18*r.childNodes.length+"px")})):null==q&&(q=n.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",
-mxResources.get("save")),r.insertBefore(q,r.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*r.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(d)})),l.style.paddingRight=18*r.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,d,c,e){a=x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var h=
-0;h<a.length;h++){var g=x.getCellGeometry(a[h]);null!=g&&g.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);D(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),L=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),
-x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=x.getSelectionCells(),b=x.view.getBounds(d),c=x.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=x.view.translate.x;b.y-=x.view.translate.y;G(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility=
-"hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),
-k.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,L(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility=
-"visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";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.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,h,g,m,p,r,l,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,m,p),d)],d[0].vertex=!0,G(d,new mxRectangle(0,0,m,p),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&
-0<b.length&&(f.parentNode.removeChild(f),f=null);else{var n=!1,w=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var h=mxUtils.parseXml(d);if("mxlibrary"==h.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(h.documentElement));e(g,k);b=b.concat(g);D(a);this.spinner.stop();n=!0}catch(S){}else if("mxfile"==h.documentElement.nodeName)try{for(var m=h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var g=mxUtils.getTextContent(m[h]),p=this.stringToCells(this.editor.graph.decompress(g)),
-r=this.editor.graph.getBoundingBoxFromGeometry(p);G(p,new mxRectangle(0,0,r.width,r.height),a)}n=!0}catch(S){null!=window.console&&console.log("error in drop handler:",S)}}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r)||/(\.vsd)($|\?)/i.test(r))?this.importVisio(u,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border=
-"3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));n=n.cloneNode(!1);n.setAttribute("src",IMAGE_PATH+"/edit.gif");n.setAttribute("title",mxResources.get("edit"));r.insertBefore(n,r.firstChild);mxEvent.addListener(n,"click",y);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&y(a)});c=n.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));r.insertBefore(c,r.firstChild);mxEvent.addListener(c,"click",
-L);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),r.insertBefore(c,r.firstChild))}l.appendChild(r);l.style.paddingRight=18*r.childNodes.length+"px"}};"1"==urlParams.offline||
-EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));
-a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",
-Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor=
-"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!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(n){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=
+b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};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.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
+function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(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%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=
+Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
+d){var b=e;e+=d;return a.substring(b,e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,
+!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(t){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(d),l=this.editor.extractGraphModel(n.documentElement,
+null!=this.pages),b=null!=l?mxUtils.getXml(l):""}catch(w){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;
+d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(c[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,l,0==e?l: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])),d.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(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(a,b,c,e,n,l,h,k,m,r){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;m=null!=m?m:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var t=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(t);if(b.decompress(g)!=t)return t;t=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(t,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(t)}r?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!l&&!n&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(l||!n&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,m,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var g=
+this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=g&&g.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(g.graphModel),g.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[e].node,c),g.needsUpdate=!1);d.appendChild(this.pages[e].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,n,l,h,k,m){n=null!=n?n:!0;h=null!=h?h:this.getXmlFileData(n,null!=l?l:!1);m=null!=m?m:this.getCurrentFile();
+l=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){l=this.createTemporaryGraph(l.getStylesheet());var d=l.getGlobalVariable,f=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(f.root)}a=this.createFileData(h,l,m,window.location.href,a,b,c,e,n,k);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);
+return a};EditorUi.prototype.getHtml=function(a,b,c,e,n,l){l=null!=l?l:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",l);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!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==n?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,n){null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\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==n?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/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;var d=null!=a&&0<a.length?
+mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
+0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,n,l){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,n));this.saveData(f,a,g,"text/xml")}else if("html"==
+a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var f=this.createDownloadRequest(d,a,e,b);this.editor.graph.pageVisible=c;return f}catch(I){this.handleError(I)}}));else{var t=null,h=
+mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);var p=this.editor.graph.getSvg(m,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();h('<?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 f=d+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();h(a)}),e)}}catch(C){this.handleError(C)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=
+0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);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.updateUi();this.showSplash()});
+if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(n){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(n){}}catch(n){null!=window.console&&console.log("error in fileLoaded:",a,n);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=n&&null!=n.message?":err:"+encodeURIComponent(n.message):
+"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}catch(l){}this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var d=
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(f){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,n,l,h){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?
+this.getLocalData(".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 d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};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 d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=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:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
+function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign=
+"center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g=this.convertDataUri(g),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),
+0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",
+a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var h=k.parentNode.previousSibling;c=h.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=
+a.title&&h.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var r=document.createElement("div");r.style.position="absolute";r.style.right="0px";r.style.top="0px";r.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(r.style.backgroundColor="inherit");h.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.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)r.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var q=this.editor.graph,u=null,x=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),
+k,b,a,a.getMode());mxEvent.consume(d)}),y=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=m.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",r.insertBefore(u,r.firstChild),h.style.paddingRight=18*r.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=u&&null!=
+u.parentNode&&(u.parentNode.removeChild(u),h.style.paddingRight=18*r.childNodes.length+"px")})):null==p&&(p=m.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),r.insertBefore(p,r.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(h.style.paddingRight=18*r.childNodes.length+"px",p.parentNode.removeChild(p),
+p=null)});mxEvent.consume(d)})),h.style.paddingRight=18*r.childNodes.length+"px")}),B=mxUtils.bind(this,function(a,d,c,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var n=q.getCellGeometry(a[g]);null!=n&&n.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);
+y(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=q.getSelectionCells(),b=q.view.getBounds(d),c=q.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=q.view.translate.x;b.y-=q.view.translate.y;B(d,b)}mxEvent.consume(a)});
+k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility=
+"visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";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.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,n,l,t,r,h,m){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),
+d=[new mxCell("",new mxGeometry(0,0,l,t),d)],d[0].vertex=!0,B(d,new mxRectangle(0,0,l,t),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var w=!1,p=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(g.documentElement));e(n,k);b=b.concat(n);y(a);this.spinner.stop();
+w=!0}catch(S){}else if("mxfile"==g.documentElement.nodeName)try{for(var l=g.documentElement.getElementsByTagName("diagram"),g=0;g<l.length;g++){var n=mxUtils.getTextContent(l[g]),t=this.stringToCells(this.editor.graph.decompress(n)),r=this.editor.graph.getBoundingBoxFromGeometry(t);B(t,new mxRectangle(0,0,r.width,r.height),a)}w=!0}catch(S){null!=window.console&&console.log("error in drop handler:",S)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&
+null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=m&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r)||/(\.vsd)($|\?)/i.test(r))?this.importVisio(m,function(a){p(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?p(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):p(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));r.insertBefore(m,r.firstChild);mxEvent.addListener(m,
+"click",x);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&x(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));r.insertBefore(c,r.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,
+"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),r.insertBefore(c,r.firstChild))}h.appendChild(r);h.style.paddingRight=18*r.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=
+function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
+EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"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,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
+Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
+"0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,m){a=new ImageDialog(this,a,b,c,e,m);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){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=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,m){a=new LibraryDialog(this,a,b,c,e,m);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,n){a=new ImageDialog(this,a,b,c,e,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){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=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,n){a=new LibraryDialog(this,a,b,c,e,n);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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){var d=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),h=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
+this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=
-mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,h)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,m,g,k,l,n,r,q){a=new ErrorDialog(this,a,b,c,e,m,g,k,null,l,n);this.showDialog(a.container,r||340,q||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
-b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,m){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,m)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,n,l,h,k,m,r,p){a=new ErrorDialog(this,a,b,c,e,n,l,h,null,k,m);this.showDialog(a.container,r||340,p||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
+b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,n)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
-EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,m){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?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)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
-"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var h=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(h?parseInt(h[2],10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},
-0),d.click(),d.parentNode.removeChild(d)}catch(v){}}else this.createEchoRequest(a,b,c,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,m,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=m?"&format="+m:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),h=Array(e),
-k=0;k<e;++k){for(var l=1024*k,n=Math.min(l+1024,c),r=Array(n-l),q=0;l<n;++q,++l)r[q]=d[l].charCodeAt(0);h[k]=new Uint8Array(r)}return new Blob(h,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,m,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
-null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(A){this.handleError(A)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<m,4<m?3:4,a,c,e);this.showDialog(b.container,
-420,m==(mxClient.IS_IOS?0:1)?160:4<m?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:
+EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?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)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
+"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},
+0),d.click(),d.parentNode.removeChild(d)}catch(v){}}else this.createEchoRequest(a,b,c,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),g=Array(e),
+h=0;h<e;++h){for(var k=1024*h,m=Math.min(k+1024,c),r=Array(m-k),p=0;k<m;++p,++k)r[p]=d[k].charCodeAt(0);g[h]=new Uint8Array(r)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,n,l,h){l=null!=l?l:!1;h=null!=h?h:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
+null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(G){this.handleError(G)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,h,null,1<n,4<n?3:4,a,c,e);this.showDialog(b.container,
+420,n==(mxClient.IS_IOS?0:1)?160:4<n?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:
";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var d=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=d.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 f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();
+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 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.exportToCanvas(mxUtils.bind(this,function(a){e.stop();
this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",d);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(d.substring(d.indexOf(",")+
-1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));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,e,m){this.isLocalFileSave()?this.saveLocalFile(c,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
-d){return this.createEchoRequest(c,a,e,m,b,d)}),c,m,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,m,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,
-function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,d,c)}catch(x){this.handleError(x)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,d,c)}catch(x){this.handleError(x)}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,k,null,1<d,4<d?3:4,e,g,m);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,m,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,m,g,k,l,n){if(this.spinner.spin(document.body,
-mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,k,l,null,c);e&&this.editor.graph.addSvgShadow(f);var h=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?
-d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!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(h,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):p(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,m,g){g=null!=g?g:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled",
-"disabled");g&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),m||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(a))})));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&
-(e=window.location.href);var h=document.createElement("select");h.style.width="120px";h.style.marginLeft="8px";h.style.marginRight="10px";h.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));h.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");h.appendChild(c);a.appendChild(h);mxEvent.addListener(h,"change",mxUtils.bind(this,function(){if("custom"==
-h.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:h.value="blank"},mxResources.get("url"),null,null,null,null,function(){h.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===h.value?"_blank":e:null},getEditInput:function(){return d},
-getEditSelect:function(){return h}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=h&&h!=mxConstants.NONE?"border:1px solid black;background-color:"+h:"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=
+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));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,e,n){this.isLocalFileSave()?this.saveLocalFile(c,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
+d){return this.createEchoRequest(c,a,e,n,b,d)}),c,n,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,n,l,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,
+function(c){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,l,!0,d,c)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,l,!0,d,c)}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,h,null,1<d,4<d?3:4,e,l,n);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,n,l){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,n,l,h,k,m){if(this.spinner.spin(document.body,
+mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,h,k,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?
+d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!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(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,t,this.thumbImageCache)):t(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,n,l){l=null!=l?l:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled",
+"disabled");l&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),n||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(a))})));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&
+(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));g.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");g.appendChild(c);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==
+g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return d},
+getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(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 e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value",
-"frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var h="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(h||"none",function(a){h=a;d()});mxEvent.consume(a)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||
-mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return h},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,m,g,k,l){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),g&&
-f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(d=this.getCurrentFile(),l||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));
-a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,m,g,k,l,n,r,q){this.getBasenames();var d={};""!=m&&m!=mxConstants.NONE&&(d.highlight=m);"auto"!==e&&(d.target=e);n||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;
-c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];k&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),d.toolbar=c.join(" "));null!=r&&0<r.length&&(d.edit=r);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
-"copy");h.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(p);mxUtils.br(h);h.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));h.appendChild(p);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),
-h.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(h);var n=this.addLinkSection(d),q=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
-"12px";t.value="100%";d.appendChild(t);var F=this.addCheckbox(d,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(d,mxResources.get("allPages"),h,!h),D=this.addCheckbox(d,mxResources.get("layers"),!0),G=this.addCheckbox(d,mxResources.get("lightbox"),!0),L=this.addEditButton(d,G),C=L.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&G.checked?
-L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,q.checked,t.value,n.getTarget(),n.getColor(),F.checked,y.checked,D.checked,G.checked,L.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,m,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var h=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));k.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));p.style.marginTop="12px";p.className="geBtn";k.appendChild(p);d.appendChild(k);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check"));
-k.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(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 l=null,n=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),
-l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=e+"px",d.appendChild(n),mxUtils.br(d);var q=this.addLinkSection(d,g);c=null!=this.pages&&1<this.pages.length;var t=null;
-if(null==h||h.constructor!=window.DriveFile||b)t=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,D),L=G.getEditInput(),C=this.addCheckbox(d,mxResources.get("layers"),!0);C.style.marginLeft=L.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(C.removeAttribute("disabled"),L.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),L.setAttribute("disabled",
-"disabled"));L.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){m(q.getTarget(),q.getColor(),null==t?!0:t.checked,D.checked,G.getLink(),C.checked,null!=l?l.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
-document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(f);var h=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!h.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,m,g,k,l){k=null!=k?k:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,h="jpeg"==l?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-d.appendChild(p);mxUtils.write(d,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%";d.appendChild(n);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
-"0";d.appendChild(u);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=l),w=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");g&&(d.appendChild(t),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),
-h+=26,mxEvent.addListener(w,"change",function(){w.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked","checked"),t.defaultChecked=!0);var L=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(d.appendChild(C),mxUtils.write(d,
-mxResources.get("embedImages")),mxUtils.br(d),h+=26);var I=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),E=null!=this.pages&&1<this.pages.length,J=this.addCheckbox(d,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=l);J.style.marginLeft="24px";J.style.marginBottom="16px";E||(J.style.visibility="hidden");mxEvent.addListener(I,"change",function(){I.checked&&E?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});k&&E||J.setAttribute("disabled",
-"disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;m(n.value,q.checked,!w.checked,L.checked,I.checked,C.checked,u.value,t.checked,!J.checked)}),null,c,e);this.showDialog(a.container,340,h,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,m){var d=document.createElement("div");
-d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(h)}var k=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(d,c),n=this.addCheckbox(d,mxResources.get("lightbox"),!0),q=this.addEditButton(d,n),t=q.getEditInput(),y=1<f.model.getChildCount(f.model.getRoot()),
-D=this.addCheckbox(d,mxResources.get("layers"),y,!y);D.style.marginLeft=t.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(y&&D.removeAttribute("disabled"),t.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,
-function(){a(k.checked,p.checked,l.checked,n.checked,q.getLink(),D.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,m,g,k,l){function d(d){var b=" ",h="";e&&(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('https://www.draw.io/?client=1&lightbox=1"+
-(m?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+d+'"'+p+(""!=h?' style="'+h+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
-null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";c&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,e,m,g,k){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var p=f[h].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var l=" ",n="";e&&(l="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(m?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+l+"/>")}))}else n="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(m?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=n&&d.setAttribute("style",n),k(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+
+"frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;d()});mxEvent.consume(a)}));d();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||
+mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,n,l,h,k){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),l&&
+f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=h?c="#U"+encodeURIComponent(h):(d=this.getCurrentFile(),k||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));
+a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,n,l,h,k,m,r,p){this.getBasenames();var d={};""!=n&&n!=mxConstants.NONE&&(d.highlight=n);"auto"!==e&&(d.target=e);m||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;
+c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];h&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);k&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),d.toolbar=c.join(" "));null!=r&&0<r.length&&(d.edit=r);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!h);b='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";p(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var 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");f=k.cloneNode(!0);f.setAttribute("value",
+"copy");g.appendChild(f);var h=document.createElement("span");mxUtils.write(h,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(h);mxUtils.br(g);g.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("publicDiagramUrl"));g.appendChild(h);var r=this.getCurrentFile();null==c&&null!=r&&r.constructor==window.DriveFile&&(h=document.createElement("a"),h.style.paddingLeft="12px",h.style.color="gray",h.setAttribute("href","javascript:void(0);"),mxUtils.write(h,mxResources.get("share")),
+g.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(r.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(g);var t=this.addLinkSection(d),m=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");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="100%";d.appendChild(p);var q=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(d,mxResources.get("allPages"),g,!g),y=this.addCheckbox(d,mxResources.get("layers"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),I=this.addEditButton(d,B),z=I.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&B.checked?
+I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,m.checked,p.value,t.getTarget(),t.getColor(),q.checked,u.checked,y.checked,B.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,n,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var t=document.createElement("div");t.style.whiteSpace="normal";mxUtils.write(t,mxResources.get("linkAccountRequired"));h.appendChild(t);t=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));t.style.marginTop="12px";t.className="geBtn";h.appendChild(t);d.appendChild(h);t=document.createElement("a");t.style.paddingLeft="12px";t.style.color="gray";t.style.fontSize="11px";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("check"));
+h.appendChild(t);mxEvent.addListener(t,"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 m=null,p=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),m=document.createElement("input"),
+m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,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=e+"px",d.appendChild(p),mxUtils.br(d);var q=this.addLinkSection(d,l);c=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var y=this.addCheckbox(d,mxResources.get("lightbox"),!0),B=this.addEditButton(d,y),I=B.getEditInput(),z=this.addCheckbox(d,mxResources.get("layers"),!0);z.style.marginLeft=I.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(z.removeAttribute("disabled"),I.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),I.setAttribute("disabled",
+"disabled"));I.checked&&y.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){n(q.getTarget(),q.getColor(),null==u?!0:u.checked,y.checked,B.getLink(),z.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
+document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,n,l,h,k){h=null!=h?h:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==k?196:300,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+d.appendChild(t);mxUtils.write(d,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||
+"0";d.appendChild(p);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=k),w=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled","disabled");u.setAttribute("type","checkbox");l&&(d.appendChild(u),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),
+g+=26,mxEvent.addListener(w,"change",function(){w.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(d.appendChild(z),mxUtils.write(d,
+mxResources.get("embedImages")),mxUtils.br(d),g+=26);var F=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=k),D=null!=this.pages&&1<this.pages.length,K=this.addCheckbox(d,D?mxResources.get("allPages"):"",D,!D,null,"jpeg"!=k);K.style.marginLeft="24px";K.style.marginBottom="16px";D||(K.style.visibility="hidden");mxEvent.addListener(F,"change",function(){F.checked&&D?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});h&&D||K.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=m.value;n(m.value,q.checked,!w.checked,I.checked,F.checked,z.checked,p.value,u.checked,!K.checked)}),null,c,e);this.showDialog(a.container,340,g,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,n){var d=document.createElement("div");
+d.style.whiteSpace="nowrap";var f=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";d.appendChild(g)}var h=this.addCheckbox(d,mxResources.get("fit"),!0),r=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),t=this.addCheckbox(d,c),m=this.addCheckbox(d,mxResources.get("lightbox"),!0),p=this.addEditButton(d,m),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),
+y=this.addCheckbox(d,mxResources.get("layers"),u,!u);y.style.marginLeft=q.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(u&&y.removeAttribute("disabled"),q.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&m.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,
+function(){a(h.checked,r.checked,t.checked,m.checked,p.getLink(),y.checked)}),null,mxResources.get("embed"),n);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,n,l,h,k){function d(d){var b=" ",g="";e&&(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('https://www.draw.io/?client=1&lightbox=1"+
+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var k="";c&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');h('<img src="'+d+'"'+k+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){k({message:mxResources.get("unknownError")})}),
+null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?d("data:image/png;base64,"+m.getText()):k({message:mxResources.get("unknownError")})}))}else k({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,e,n,l,h){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var m=f[g].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var t=" ",p="";e&&(t="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('https://www.draw.io/?client=1&lightbox=1"+
+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+t+"/>")}))}else p="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),h(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+
" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==a.nodeName){var c=a.getElementsByTagName("diagram");if(0<
-c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
-e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(r){null!=b&&b(r)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,c,e,k,g,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?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(e?"":'<?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(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,g,l,n,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,c,n):null,q)}catch(A){"Invalid image"==A.message?this.downloadFile(q):this.handleError(A)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,g,l)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},g=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],h=1;h<b.length;h++){var g=
-b[h].indexOf(")");f.push('url("');f.push(e[d(b[h].substring(0,g))]);f.push('"'+b[h].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),n=null,r=b[k].indexOf("format(",l);0<r&&(n=d(b[k].substring(r+7,b[k].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))d=
-"application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))d="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(d){e[a]=d;c--;g()}),mxUtils.bind(this,
-function(a){c--;g()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[k].substring(0,l)),n)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,g,l,n,q,r,t,A,x,F){g=null!=g?g:!0;A=null!=A?A:this.editor.graph;x=null!=x?x:0;var d=q?null:A.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==q&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(A.getSvg(d,null,null,F,null,null!=l?l:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
-function(){try{var f=document.createElement("canvas"),h=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=g?Math.min(1,Math.min(3*b/(4*m),b/h)):b/h);h=Math.ceil(n*h)+2*x;m=Math.ceil(n*m)+2*x;f.setAttribute("width",h);f.setAttribute("height",m);var p=f.getContext("2d");null!=d&&(p.beginPath(),p.rect(0,0,h,m),p.fillStyle=d,p.fill());p.scale(n,n);p.drawImage(e,x/n,x/n);a(f)}catch(W){null!=k&&k(W)}});e.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(c);
-var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(A,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(C){null!=k&&k(C)}}),c,t)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
+c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
+e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(r){null!=b&&b(r)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,c,e,n,l,h){h=b.background;h==mxConstants.NONE&&(h=null);b=b.getSvg(h,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=n)this.convertImages(b,mxUtils.bind(this,function(a){n((e?"":'<?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(e?"":'<?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(b)};EditorUi.prototype.exportImage=function(a,b,c,e,n,l,h,k,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,c,k):null,m)}catch(G){"Invalid image"==G.message?this.downloadFile(m):this.handleError(G)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,l,h)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},l=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var k=
+b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,k))]);f.push('"'+b[g].substring(k))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var h=1;h<b.length;h++){var k=b[h].indexOf(")"),m=null,r=b[h].indexOf("format(",k);0<r&&(m=d(b[h].substring(r+7,b[h].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))d=
+"application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))d="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(d){e[a]=d;c--;l()}),mxUtils.bind(this,
+function(a){c--;l()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[h].substring(0,k)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,n,l,h,k,m,r,p,q,u,C){l=null!=l?l:!0;q=null!=q?q:this.editor.graph;u=null!=u?u:0;var d=m?null:q.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==m&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(q.getSvg(d,null,null,C,null,null!=h?h:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
+function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),h=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=l?Math.min(1,Math.min(3*b/(4*h),b/g)):b/g);g=Math.ceil(k*g)+2*u;h=Math.ceil(k*h)+2*u;f.setAttribute("width",g);f.setAttribute("height",h);var m=f.getContext("2d");null!=d&&(m.beginPath(),m.rect(0,0,g,h),m.fillStyle=d,m.fill());m.scale(k,k);m.drawImage(e,u/k,u/k);a(f)}catch(W){null!=n&&n(W)}});e.onerror=function(a){null!=n&&n(a)};try{r&&this.editor.graph.addSvgShadow(c);
+var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(q,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(z){null!=n&&n(z)}}),c,p)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,
-function(c,h){for(var g=a.getElementsByTagName(c),k=0;k<g.length;k++)mxUtils.bind(this,function(c){var g=e.convert(c.getAttribute(h));if(null!=g&&"data:"!=g.substring(0,5)){var k=f[g];null==k?(d++,this.convertImageToDataUri(g,function(e){null!=e&&(f[g]=e,c.setAttribute(h,e));d--;0==d&&b(a)})):c.setAttribute(h,k)}else null!=g&&c.setAttribute(h,g)})(g[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,k,g){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
-/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+this.base64Encode(e)}b(e)}}else null!=
-c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
+function(c,g){for(var k=a.getElementsByTagName(c),n=0;n<k.length;n++)mxUtils.bind(this,function(c){var k=e.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var n=f[k];null==n?(d++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,n)}else null!=k&&c.setAttribute(g,k)})(k[n])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,n,l){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
+/(\.gif)($|\?)/i.test(a);n=null!=n?n:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}l=null!=l?l:"data:image/png;base64,";e=l+this.base64Encode(e)}b(e)}}else null!=
+c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){n&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){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)||"https://cdn.rawgit.com/"===a.substring(0,
23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),
-e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),m=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");
-if(1==p.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){f.model.beginUpdate();try{for(a=0;a<p.length;a++){var l=this.updatePageRoot(new DiagramPage(p[a])),n=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[n+1]));f.model.execute(new ChangePage(this,l,l,n))}}finally{f.model.endUpdate()}}}null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,b,c,e))}}catch(x){throw k||this.handleError(x,mxResources.get("invalidOrMissingFile")),
-x;}return d};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,
-b,c)}catch(u){c(u)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(u){c(u)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
-this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(w){this.handleError(w)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",
-d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var d in k.Pages)a.push(k.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
-EditorUi.prototype.insertTextAt=function(a,b,c,e,k,g,l){g=null!=g?g:!0;l=null!=l?l:!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()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,c,g,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(f,b,c,g,!0),0<h.length)return h}catch(z){}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){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),h=Math.round(e.width*f);e=Math.round(e.height*f);d.setSelectionCell(d.insertVertex(null,
-null,"",d.snap(b),d.snap(c),h,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,g);else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value=a,d.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(k.value)&&
-d.setLinkForCell(k,k.value),k.geometry.width+=d.gridSize,k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,e,k,g,l,n,q,r,t){r=null!=r?r:!0;var d=!1,f=null,h=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):d=this.importXml(a,c,e,r);null!=n&&n(d)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,r),q=
-!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,r);null!=n&&n(a)})):null!=
-q&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l)||/(\.vsd)($|\?)/i.test(l))?(d=!0,this.importVisio(q,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=n&&n(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,r));d||null==n||n(f);
-return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,g,k;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}k=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return d};
-EditorUi.prototype.importFiles=function(a,b,c,e,k,g,l,n,q,r,t,A){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=t||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>m){h=!0;break}var u=mxUtils.bind(this,function(){var h=this.editor.graph,m=h.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,h,g,k,m){return null!=a&&"<mxlibrary"==a.substring(0,
-10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,e,f,h,g,k,m,d,A)});g=null!=g?g:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=n)n(u);else{var d=[];h.getModel().beginUpdate();try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{h.getModel().endUpdate()}}g(d)}}),
-v=0;v<p;v++)mxUtils.bind(this,function(d){var g=a[d],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var p=a.target.result,n=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(n+1)))),C=mxUtils.parseXml(q),q=C.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=A?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));
-null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(p.substring(0,n+1),null!=C){var a=C.getElementsByTagName("svg");if(0<a.length){var l=a[0],r=parseFloat(l.getAttribute("width")),q=parseFloat(l.getAttribute("height")),u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+r+" "+q);else if(isNaN(r)||isNaN(q)){var t=u.split(" ");3<t.length&&(r=parseFloat(t[2]),
-q=parseFloat(t[3]))}p=this.createSvgDataUri(mxUtils.getXml(l));var E=Math.min(1,Math.min(e/Math.max(1,r)),e/Math.max(1,q)),w=k(p,g.type,b+d*m,c+d*m,Math.max(1,Math.round(r*E)),Math.max(1,Math.round(q*E)),g.name,f);if(isNaN(r)||isNaN(q)){var v=new Image;v.onload=mxUtils.bind(this,function(){r=Math.max(1,v.width);q=Math.max(1,v.height);w[0].geometry.width=r;w[0].geometry.height=q;l.setAttribute("viewBox","0 0 "+r+" "+q);p=this.createSvgDataUri(mxUtils.getXml(l));var a=p.indexOf(";");0<a&&(p=p.substring(0,
-a)+p.substring(p.indexOf(",",a+1)));h.setCellStyles("image",p,[w[0]])});v.src=this.createSvgDataUri(mxUtils.getXml(l))}return w}}}catch(ra){}return null})):w(d,mxUtils.bind(this,function(){return k(u,"text/xml",b+d*m,c+d*m,0,0,g.name)}))}}else{q=!1;if("image/png"==g.type){var E=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var v=new Image;v.src=a.target.result;w(d,mxUtils.bind(this,function(){return k(E,"text/xml",b+d*m,c+d*m,v.width,v.height,g.name)}));q=!0}}q||(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(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,p,l){w(d,mxUtils.bind(this,function(){if(null!=h&&h.length<r){var n=f&&this.isResampleImage(a.target.result,t)?Math.min(1,
-Math.min(e/p,e/l)):1;return k(h,g.type,b+d*m,c+d*m,Math.round(p*n),Math.round(l*n),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,g.type,b+d*m,c+d*m,240,160,g.name,function(a){w(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)||/(\.vsd)($|\?)/i.test(g.name)?k(null,g.type,b+d*m,c+d*m,240,160,
-g.name,function(a){w(d,function(){return a})},g):"image"==g.type.substring(0,5)?p.readAsDataURL(g):p.readAsText(g)})(v)});h?this.confirmImageResize(function(a){f=a;u()},q):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||
+e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,n){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),h=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var m=h.getElementsByTagName("diagram");
+if(1==m.length)h=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(a=0;a<m.length;a++){var t=this.updatePageRoot(new DiagramPage(m[a])),p=this.pages.length;null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,t,t,p))}}finally{f.model.endUpdate()}}}null!=h&&"mxGraphModel"===h.nodeName&&(d=f.importGraphModel(h,b,c,e))}}catch(H){throw n||this.handleError(H,mxResources.get("invalidOrMissingFile")),
+H;}return d};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,
+b,c)}catch(k){c(k)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(k){c(k)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
+this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,n){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,n)}catch(w){this.handleError(w)}finally{null!=n&&n()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,n){n=JSON.parse(a);a=[];if(null!=n.state){n=JSON.parse(n.state);for(var d in n.Pages)a.push(n.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(n);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
+EditorUi.prototype.insertTextAt=function(a,b,c,e,n,l,h){l=null!=l?l:!0;h=null!=h?h:!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()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=
+this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,c,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,c,l,!0),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){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),h,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);d.setSelectionCell(d.insertVertex(null,
+null,"",d.snap(b),d.snap(c),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
+if(this.isCompatibleString(a))return this.importXml(a,b,c,l);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,l);else{d=this.editor.graph;n=null;d.getModel().beginUpdate();try{n=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[n])),n.value=a,d.updateCellSize(n),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(n.value)&&
+d.setLinkForCell(n,n.value),n.geometry.width+=d.gridSize,n.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,e,n,l,h,k,m,r,p){r=null!=r?r:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,h)):d=this.importXml(a,c,e,r);null!=k&&k(d)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=p?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,r),m=
+!0)),m||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,r);null!=k&&k(a)})):null!=
+m&&null!=h&&(/(\.vsdx)($|\?)/i.test(h)||/(\.vssx)($|\?)/i.test(h)||/(\.vsd)($|\?)/i.test(h))?(d=!0,this.importVisio(m,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(d=!0,this.parseFile(null!=m?m: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!=k&&k(null))}),h)):/(\.vsd)($|\?)/i.test(h)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,r));d||null==k||k(f);
+return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,l,h;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}l=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(l&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);d+="=";break}h=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(h&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return d};
+EditorUi.prototype.importFiles=function(a,b,c,e,n,l,h,k,m,r,p,q){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var t=p||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>t){g=!0;break}var w=mxUtils.bind(this,function(){var g=this.editor.graph,m=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,b,c,e,f,g,k,n,l){return null!=a&&"<mxlibrary"==a.substring(0,
+10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,f,g,k,n,l,d,q)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,u=t,w=[],v=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--u){this.spinner.stop();if(null!=k)k(w);else{var d=[];g.getModel().beginUpdate();try{for(var c=0;c<w.length;c++){var e=w[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}l(d)}}),
+E=0;E<t;E++)mxUtils.bind(this,function(d){var k=a[d],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,t=l.indexOf(","),z=decodeURIComponent(escape(atob(l.substring(t+1)))),D=mxUtils.parseXml(z),z=D.getElementsByTagName("svg");if(0<z.length){var z=z[0],u=q?null:z.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));
+null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(l.substring(0,t+1),null!=D){var a=D.getElementsByTagName("svg");if(0<a.length){var h=a[0],r=parseFloat(h.getAttribute("width")),p=parseFloat(h.getAttribute("height")),q=h.getAttribute("viewBox");if(null==q||0==q.length)h.setAttribute("viewBox","0 0 "+r+" "+p);else if(isNaN(r)||isNaN(p)){var z=q.split(" ");3<z.length&&(r=parseFloat(z[2]),
+p=parseFloat(z[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var u=Math.min(1,Math.min(e/Math.max(1,r)),e/Math.max(1,p)),F=n(l,k.type,b+d*m,c+d*m,Math.max(1,Math.round(r*u)),Math.max(1,Math.round(p*u)),k.name,f);if(isNaN(r)||isNaN(p)){var w=new Image;w.onload=mxUtils.bind(this,function(){r=Math.max(1,w.width);p=Math.max(1,w.height);F[0].geometry.width=r;F[0].geometry.height=p;h.setAttribute("viewBox","0 0 "+r+" "+p);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,
+a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[F[0]])});w.src=this.createSvgDataUri(mxUtils.getXml(h))}return F}}}catch(ra){}return null})):v(d,mxUtils.bind(this,function(){return n(u,"text/xml",b+d*m,c+d*m,0,0,k.name)}))}}else{z=!1;if("image/png"==k.type){var F=q?null:this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var w=new Image;w.src=a.target.result;v(d,mxUtils.bind(this,function(){return n(F,"text/xml",b+d*m,c+d*m,w.width,w.height,k.name)}));z=!0}}z||(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(g,l,h){v(d,mxUtils.bind(this,function(){if(null!=g&&g.length<r){var t=f&&this.isResampleImage(a.target.result,p)?Math.min(1,
+Math.min(e/l,e/h)):1;return n(g,k.type,b+d*m,c+d*m,Math.round(l*t),Math.round(h*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,p)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n(a.target.result,k.type,b+d*m,c+d*m,240,160,k.name,function(a){v(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)||/(\.vsd)($|\?)/i.test(k.name)?n(null,k.type,b+d*m,c+d*m,240,160,
+k.name,function(a){v(d,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(E)});g?this.confirmImageResize(function(a){f=a;w()},m):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||
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,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format",
-"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,g){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,g))try{var h=Math.max(d/k,f/k);if(1<h){var p=Math.round(d/h),m=Math.round(f/h),l=document.createElement("canvas");
-l.width=p;l.height=m;l.getContext("2d").drawImage(a,0,0,p,m);var n=l.toDataURL();if(n.length<b.length){var q=document.createElement("canvas");q.width=p;q.height=m;var t=q.toDataURL();n!==t&&(b=n,d=p,f=m)}}}catch(D){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
-function(a,b,c,e,k){function d(a,b){var d=p;p+=b;return a.substring(d,p)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(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 p=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,
-p);do{var l=f(a);if("IDAT"==d(a,4)){k=a.substring(0,p-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);k+=h(c.length)+b+c+h(e^4294967295);k+=a.substring(p-8,a.length);break}k+=a.substring(p-8,p-4+l);d(a,l);d(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&
-!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(m){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
-null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,
+"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,n,l){n=null!=n?n:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(d/n,f/n);if(1<g){var h=Math.round(d/g),m=Math.round(f/g),p=document.createElement("canvas");
+p.width=h;p.height=m;p.getContext("2d").drawImage(a,0,0,h,m);var t=p.toDataURL();if(t.length<b.length){var q=document.createElement("canvas");q.width=h;q.height=m;var u=q.toDataURL();t!==u&&(b=t,d=h,f=m)}}}catch(y){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,h=0;8>h;h++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
+function(a,b,c,e,n){function d(a,b){var d=h;h+=b;return a.substring(d,h)}function f(a){a=d(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 h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=n&&n();else if(d(a,4),"IHDR"!=d(a,4))null!=n&&n();else{d(a,17);n=a.substring(0,
+h);do{var m=f(a);if("IDAT"==d(a,4)){n=a.substring(0,h-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);n+=g(c.length)+b+c+g(e^4294967295);n+=a.substring(h-8,a.length);break}n+=a.substring(h-8,h-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(n):Base64.encode(n,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&
+!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(n){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
+null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var m=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,
d){a(d.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,
-arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
-360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:g.apply(this,arguments)};var n=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var h=d.indexOf(",");0<h&&(h=b.getPageById(d.substring(h+1)),e=null!=
-h?h.getName():mxResources.get("pageNotFound"))}h=n.call(this,d,e);f&&mxEvent.addListener(h,"click",function(b){a(d);mxEvent.consume(b)});return h};var q=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
-d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){z.innerHTML="&nbsp;";z.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);
+arguments)};var n=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};n.call(this,b,d,e)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
+360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:l.apply(this,arguments)};var h=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=
+g?g.getName():mxResources.get("pageNotFound"))}g=h.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var k=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))k.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
+d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){q.innerHTML="&nbsp;";q.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");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);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=a.clipboardData||a.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;
-for(index in f){var h=f[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,d,c,e,f,h){b.insertImage(a,f,h)},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([h.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(O){}}),!1);var z=document.createElement("div");z.style.position="absolute";z.style.whiteSpace=
-"nowrap";z.style.overflow="hidden";z.style.display="block";z.contentEditable=!0;mxUtils.setOpacity(z,0);z.style.width="1px";z.style.height="1px";z.innerHTML="&nbsp;";var A=!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 b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
-b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||A||(z.style.left=c.container.scrollLeft+10+"px",z.style.top=c.container.scrollTop+10+"px",c.container.appendChild(z),A=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){z.focus();document.execCommand("selectAll",!1,null)},0):(z.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!A||
-224!=b&&17!=b&&91!=b||(A=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),z.parentNode.removeChild(z))}),0)}));mxEvent.addListener(z,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(z),r())}));mxEvent.addListener(z,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(z,!0),r())}));mxEvent.addListener(z,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(z.innerHTML="&nbsp;",z.focus(),
-window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,z);z.innerHTML="&nbsp;"}),0))}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==z?!0:x.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
+for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,d,c,e,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]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(Q){}}),!1);var q=document.createElement("div");q.style.position="absolute";q.style.whiteSpace=
+"nowrap";q.style.overflow="hidden";q.style.display="block";q.contentEditable=!0;mxUtils.setOpacity(q,0);q.style.width="1px";q.style.height="1px";q.innerHTML="&nbsp;";var u=!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 b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
+b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||u||(q.style.left=c.container.scrollLeft+10+"px",q.style.top=c.container.scrollTop+10+"px",c.container.appendChild(q),u=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){q.focus();document.execCommand("selectAll",!1,null)},0):(q.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!u||
+224!=b&&17!=b&&91!=b||(u=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),q.parentNode.removeChild(q))}),0)}));mxEvent.addListener(q,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(q),r())}));mxEvent.addListener(q,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(q,!0),r())}));mxEvent.addListener(q,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(q.innerHTML="&nbsp;",q.focus(),
+window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,q);q.innerHTML="&nbsp;"}),0))}),!0);var H=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==q?!0:H.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,
d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,function(a,d,c,e,f,h){b.insertImage(a,f,h)},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 d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),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,
+0,0,this.maxImageSize,function(a,d,c,e,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]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),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.insertImage(decodeURIComponent(d),c*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()})))}));if("1"==urlParams.ruler&&"undefined"!==
-typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px";F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var y=document.createElement("div");y.style.position="absolute";y.style.top=
-"95px";y.style.left="220px";y.style.width="30px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);this.vRuler=new mxRuler(this.editor.graph,F,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.test){t=document.getElementById("geFooter");null!=t&&(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)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);
-this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),
-G=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=G&&(G.parentNode.removeChild(G),G=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,h=b.y/e-d.y;mxEvent.isAltDown(a)&&(h=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var l=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(k=b[0].getAttribute("href")));var p=!0,m=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,h,!0,l,null,p))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){p=
-a;m()},mxEvent.isControlDown(a)):m()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,h,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(g,
-f,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background="whiteSmoke";document.body.appendChild(p);var C=document.createElement("div");C.style.position="absolute";C.style.top="125px";C.style.left="220px";C.style.width="30px";C.style.height="1000px";C.style.background="whiteSmoke";document.body.appendChild(C);var x=document.createElement("div");x.style.position="absolute";x.style.top=
+"95px";x.style.left="220px";x.style.width="30px";x.style.height="30px";x.style.background="whiteSmoke";document.body.appendChild(x);this.vRuler=new mxRuler(this.editor.graph,C,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.test){p=document.getElementById("geFooter");null!=p&&(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)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);
+this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),
+B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var l=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=l;var n=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(l=b[0].getAttribute("href")));var h=!0,m=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(l,f,g,!0,n,null,h))});n&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){h=
+a;m()},mxEvent.isControlDown(a)):m()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,
+f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,
!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"===d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||
-8==document.documentMode?mxUtils.getTextContent(b):b.textContent),h=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var d=b.getElementsByTagName("span"),l=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(h=!0,e=l)}catch(v){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(h||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,
-d,d)):(h=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,h.x+d,h.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var h=e.lastIndexOf("%3E");0<=h&&h<e.length-3&&(e=e.substring(0,h+3))}catch(v){}try{var d=b.getElementsByTagName("span"),k=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(g=!0,e=k)}catch(v){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,
+d,d)):(g=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,g.x+d,g.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",
function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=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 d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,
"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?
(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var g=document.documentElement;c=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=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=b+"px";g.style.left=d+"px";g.style.width=
-Math.max(0,c-3)+"px";g.style.height=Math.max(0,e-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 b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=
+EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var l=document.documentElement;c=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=d+"px";l.style.width=
+Math.max(0,c-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=
function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){var c=d.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,
mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
this.spinner.stop()}));else if("<mxlibrary"==d.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(r){this.handleError(r,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,
function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.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(){this.confirm(mxResources.get("allChangesLost"),
null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};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=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,
-a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),h=0;h<e;h++)this.addBasenamesForCell(c.model.getChildAt(a,h),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=
+a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),g=0;g<e;g++)this.addBasenamesForCell(c.model.getChildAt(a,g),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.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};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,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,
-page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,g=mxUtils.bind(this,function(a,b){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(f){function h(a){if(null!=
-a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(J){}return a}if(f.source==(window.opener||window.parent)){var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(E){g=null}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("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);
-this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){l=null;l="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.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();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:g}),"*")}return}if("template"==
-g.action){this.spinner.stop();var l=1==g.enableRecent,n=1==g.enableSearch,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,
-g.errorMsg);else{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 p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):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 m=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(m);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(m))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,C=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);
-q.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(m)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
-g.xml&&0<g.xml.length&&this.setFileData(g.xml);p=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),p.xml=mxUtils.getXml(l),p.data=this.getFileData(null,null,!0,null,null,null,l),p.format=g.format;else if("html"==g.format)m=this.editor.getGraphXml(),p.data=this.getHtml(m,this.editor.graph),p.xml=mxUtils.getXml(m),p.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
-l==mxConstants.NONE&&(l=null);p.xml=this.getFileData(!0);p.format="svg";if(g.embedImages||null==g.embedImages){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),"xmlsvg"==g.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(l),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}l="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));p.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==g.action)c=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.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}g=h(g);d=!0;try{a(g,f)}catch(E){this.handleError(E)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var I=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=I();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=I();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
-b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";k.postMessage(g,"*")};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":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
+function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!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 b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,
+scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,l=mxUtils.bind(this,function(a,b){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,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=
+a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"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=this.editor.graph.decompress(a)))}catch(K){}return a}if(f.source==(window.opener||window.parent)){var k=f.data;if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(D){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=
+k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&h.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);
+this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==k.action){l=null;l="data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):g(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(D){h.postMessage(JSON.stringify({event:"draft",error:D.toString(),message:k}),"*")}return}if("template"==
+k.action){this.spinner.stop();var l=1==k.enableRecent,n=1==k.enableSearch,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=k.callback?h.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;h.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;h.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){h.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,
+k.errorMsg);else{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 p=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=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=encodeURIComponent(p);h.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,z=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);
+q.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
+k.xml&&0<k.xml.length&&this.setFileData(k.xml);m=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=this.getFileData(null,null,!0,null,null,null,l),m.format=k.format;else if("html"==k.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
+l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(k.embedImages||null==k.embedImages){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),"xmlsvg"==k.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);h.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));h.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}h.postMessage(JSON.stringify(m),"*")}return}if("load"==k.action)c=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.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.xml&&"data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):k.xml;else{h.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}}k=g(k);d=!0;try{a(k,f)}catch(D){this.handleError(D)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
+1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=F();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=F();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
+b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||h.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var h=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):
+urlParams.ready||"ready";h.postMessage(l,"*")};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":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";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.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,g=null,k="",l="auto",n="auto",q=null,t=null,A=40,x=40,F=0,y=this.editor.graph;
-y.getGraphBounds();for(var D=function(){y.setSelectionCells(S);y.scrollCellToVisible(y.getSelectionCell())},G=y.getFreeInsertPoint(),L=G.x,C=G.y,G=C,I=null,E="auto",J=[],W=null,Y=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var O=a.indexOf(":");if(0<O){var M=mxUtils.trim(a.substring(1,O)),H=mxUtils.trim(a.substring(O+1));"label"==M?I=y.sanitizeHtml(H):
-"style"==M?e=H:"identity"==M&&0<H.length&&"-"!=H?g=H:"namespace"==M&&0<H.length&&"-"!=H?k=H:"width"==M?l=H:"height"==M?n=H:"left"==M&&0<H.length?q=H:"top"==M&&0<H.length?t=H:"ignore"==M?Y=H.split(","):"connect"==M?J.push(JSON.parse(H)):"link"==M?W=H:"padding"==M?F=parseFloat(H):"edgespacing"==M?A=parseFloat(H):"nodespacing"==M?x=parseFloat(H):"layout"==M&&(E=H)}}}var R=this.editor.csvToArray(b[U]);a=null;if(null!=g)for(var K=0;K<R.length;K++)if(g==R[K]){a=K;break}null==I&&(I="%"+R[0]+"%");if(null!=
-J)for(var P=0;P<J.length;P++)null==c[J[P].to]&&(c[J[P].to]={});y.model.beginUpdate();try{for(K=U+1;K<b.length;K++){var X=this.editor.csvToArray(b[K]);if(X.length==R.length){var B=null,V=null!=a?k+X[a]:null;null!=V&&(B=y.model.getCell(V));null==B&&(B=new mxCell(I,new mxGeometry(L,G,0,0),e||"whiteSpace=wrap;html=1;"),B.vertex=!0,B.id=V);for(var N=0;N<X.length;N++)y.setAttributeForCell(B,R[N],X[N]);y.setAttributeForCell(B,"placeholders","1");B.style=y.replacePlaceholders(B,B.style);for(P=0;P<J.length;P++)c[J[P].to][B.getAttribute(J[P].to)]=
-B;null!=W&&"link"!=W&&(y.setLinkForCell(B,B.getAttribute(W)),y.setAttributeForCell(B,W,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[B]));var Z=this.editor.graph.getPreferredSizeForCell(B);B.vertex&&(null!=q&&null!=B.getAttribute(q)&&(B.geometry.x=L+parseFloat(B.getAttribute(q))),null!=t&&null!=B.getAttribute(t)&&(B.geometry.y=C+parseFloat(B.getAttribute(t))),"@"==l.charAt(0)&&null!=B.getAttribute(l.substring(1))?B.geometry.width=parseFloat(B.getAttribute(l.substring(1))):B.geometry.width=
-"auto"==l?Z.width+F:parseFloat(l),"@"==n.charAt(0)&&null!=B.getAttribute(n.substring(1))?B.geometry.height=parseFloat(B.getAttribute(n.substring(1))):B.geometry.height="auto"==n?Z.height+F:parseFloat(n),G+=B.geometry.height+x);d.push(y.addCell(B))}}for(var aa=d.slice(),S=d.slice(),P=0;P<J.length;P++)for(var T=J[P],K=0;K<d.length;K++){var B=d[K],da=B.getAttribute(T.from);if(null!=da){y.setAttributeForCell(B,T.from,null);for(var na=da.split(","),N=0;N<na.length;N++){var ba=c[T.to][na[N]];null!=ba&&
-(I=T.label,null!=T.fromlabel&&(I=(B.getAttribute(T.fromlabel)||"")+(I||"")),null!=T.tolabel&&(I=(I||"")+(ba.getAttribute(T.tolabel)||"")),S.push(y.insertEdge(null,null,I||"",T.invert?ba:B,T.invert?B:ba,T.style||y.createCurrentEdgeStyle())),mxUtils.remove(T.invert?B:ba,aa))}}}if(null!=Y)for(K=0;K<d.length;K++)for(B=d[K],N=0;N<Y.length;N++)y.setAttributeForCell(B,mxUtils.trim(Y[N]),null);var ea=new mxParallelEdgeLayout(y);ea.spacing=A;var qa=function(){ea.execute(y.getDefaultParent());for(var a=0;a<
-d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==l&&(b.width=Math.round(y.snap(b.width)));"auto"==n&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==E){var ga=new mxCircleLayout(y);ga.resetEdges=!1;var ra=ga.isVertexIgnored;ga.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ga.execute(y.getDefaultParent());qa()},!0,D);D=null}else if("horizontaltree"==E||"verticaltree"==
-E||"auto"==E&&S.length==2*d.length-1&&1==aa.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==E);ha.levelDistance=x;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<aa.length?aa[0]:null)},!0,D);D=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==aa.length){y.view.validate();var ia=new mxHierarchicalLayout(y,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=x;
-ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(y.getDefaultParent(),S);y.moveCells(S,L,C)},!0,D);D=null}else if("organic"==E||"auto"==E&&S.length>d.length){y.view.validate();var ca=new mxFastOrganicLayout(y);ca.forceConstant=3*x;ca.resetEdges=!1;var ja=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ea=new mxParallelEdgeLayout(y);ea.spacing=A;this.executeLayout(function(){ca.execute(y.getDefaultParent());qa()},!0,D);D=null}this.hideDialog()}finally{y.model.endUpdate()}null!=
-D&&D()}}catch(ka){this.handleError(ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}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 d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&
+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.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,l=null,h="",k="auto",m="auto",p=null,q=null,u=40,H=40,C=0,x=this.editor.graph;
+x.getGraphBounds();for(var y=function(){x.setSelectionCells(S);x.scrollCellToVisible(x.getSelectionCell())},B=x.getFreeInsertPoint(),I=B.x,z=B.y,B=z,F=null,D="auto",K=[],W=null,Y=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var Q=a.indexOf(":");if(0<Q){var M=mxUtils.trim(a.substring(1,Q)),J=mxUtils.trim(a.substring(Q+1));"label"==M?F=x.sanitizeHtml(J):
+"style"==M?e=J:"identity"==M&&0<J.length&&"-"!=J?l=J:"namespace"==M&&0<J.length&&"-"!=J?h=J:"width"==M?k=J:"height"==M?m=J:"left"==M&&0<J.length?p=J:"top"==M&&0<J.length?q=J:"ignore"==M?Y=J.split(","):"connect"==M?K.push(JSON.parse(J)):"link"==M?W=J:"padding"==M?C=parseFloat(J):"edgespacing"==M?u=parseFloat(J):"nodespacing"==M?H=parseFloat(J):"layout"==M&&(D=J)}}}var R=this.editor.csvToArray(b[U]);a=null;if(null!=l)for(var L=0;L<R.length;L++)if(l==R[L]){a=L;break}null==F&&(F="%"+R[0]+"%");if(null!=
+K)for(var O=0;O<K.length;O++)null==c[K[O].to]&&(c[K[O].to]={});x.model.beginUpdate();try{for(L=U+1;L<b.length;L++){var X=this.editor.csvToArray(b[L]);if(X.length==R.length){var A=null,V=null!=a?h+X[a]:null;null!=V&&(A=x.model.getCell(V));null==A&&(A=new mxCell(F,new mxGeometry(I,B,0,0),e||"whiteSpace=wrap;html=1;"),A.vertex=!0,A.id=V);for(var N=0;N<X.length;N++)x.setAttributeForCell(A,R[N],X[N]);x.setAttributeForCell(A,"placeholders","1");A.style=x.replacePlaceholders(A,A.style);for(O=0;O<K.length;O++)c[K[O].to][A.getAttribute(K[O].to)]=
+A;null!=W&&"link"!=W&&(x.setLinkForCell(A,A.getAttribute(W)),x.setAttributeForCell(A,W,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[A]));var Z=this.editor.graph.getPreferredSizeForCell(A);A.vertex&&(null!=p&&null!=A.getAttribute(p)&&(A.geometry.x=I+parseFloat(A.getAttribute(p))),null!=q&&null!=A.getAttribute(q)&&(A.geometry.y=z+parseFloat(A.getAttribute(q))),"@"==k.charAt(0)&&null!=A.getAttribute(k.substring(1))?A.geometry.width=parseFloat(A.getAttribute(k.substring(1))):A.geometry.width=
+"auto"==k?Z.width+C:parseFloat(k),"@"==m.charAt(0)&&null!=A.getAttribute(m.substring(1))?A.geometry.height=parseFloat(A.getAttribute(m.substring(1))):A.geometry.height="auto"==m?Z.height+C:parseFloat(m),B+=A.geometry.height+H);d.push(x.addCell(A))}}for(var aa=d.slice(),S=d.slice(),O=0;O<K.length;O++)for(var T=K[O],L=0;L<d.length;L++){var A=d[L],da=A.getAttribute(T.from);if(null!=da){x.setAttributeForCell(A,T.from,null);for(var na=da.split(","),N=0;N<na.length;N++){var ba=c[T.to][na[N]];null!=ba&&
+(F=T.label,null!=T.fromlabel&&(F=(A.getAttribute(T.fromlabel)||"")+(F||"")),null!=T.tolabel&&(F=(F||"")+(ba.getAttribute(T.tolabel)||"")),S.push(x.insertEdge(null,null,F||"",T.invert?ba:A,T.invert?A:ba,T.style||x.createCurrentEdgeStyle())),mxUtils.remove(T.invert?A:ba,aa))}}}if(null!=Y)for(L=0;L<d.length;L++)for(A=d[L],N=0;N<Y.length;N++)x.setAttributeForCell(A,mxUtils.trim(Y[N]),null);var ea=new mxParallelEdgeLayout(x);ea.spacing=u;var qa=function(){ea.execute(x.getDefaultParent());for(var a=0;a<
+d.length;a++){var b=x.getCellGeometry(d[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==k&&(b.width=Math.round(x.snap(b.width)));"auto"==m&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==D){var ga=new mxCircleLayout(x);ga.resetEdges=!1;var ra=ga.isVertexIgnored;ga.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ga.execute(x.getDefaultParent());qa()},!0,y);y=null}else if("horizontaltree"==D||"verticaltree"==
+D||"auto"==D&&S.length==2*d.length-1&&1==aa.length){x.view.validate();var ha=new mxCompactTreeLayout(x,"horizontaltree"==D);ha.levelDistance=H;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(x.getDefaultParent(),0<aa.length?aa[0]:null)},!0,y);y=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==aa.length){x.view.validate();var ia=new mxHierarchicalLayout(x,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=H;
+ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(x.getDefaultParent(),S);x.moveCells(S,I,z)},!0,y);y=null}else if("organic"==D||"auto"==D&&S.length>d.length){x.view.validate();var ca=new mxFastOrganicLayout(x);ca.forceConstant=3*H;ca.resetEdges=!1;var ja=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ea=new mxParallelEdgeLayout(x);ea.spacing=u;this.executeLayout(function(){ca.execute(x.getDefaultParent());qa()},!0,y);y=null}this.hideDialog()}finally{x.model.endUpdate()}null!=
+y&&y()}}catch(ka){this.handleError(ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}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 d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&
null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/
-a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
+a,8/a)};var l=b.init;b.init=function(){l.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=0;null==this.drive&&"function"!==typeof window.DriveClient||
d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.trello&&"function"!==typeof window.TrelloClient||d++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&d++;mxClient.IS_IOS||d++;return d};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("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").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.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));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding=
-"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
+"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
-IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());
-a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,g){var d=a.editor.graph;if("xml"==
-c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,g)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=d.getGraphBounds(),l=Math.floor(h.width*k/d.view.scale),n=Math.floor(h.height*k/d.view.scale);f.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,h,l){var d=a.editor.graph;if("xml"==
+c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,h,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),n=Math.floor(g.width*h/d.view.scale),m=Math.floor(g.height*h/d.view.scale);f.length<=MAX_REQUEST_SIZE&&n*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+m+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}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){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
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,e=b.graph,c=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,c);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState);
-b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,c){SelectPage.call(this,a,e);this.relatedPage=b;this.index=c;this.previousIndex=null}
+b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,c){SelectPage.call(this,a,e);this.relatedPage=b;this.index=c;this.previousIndex=null}
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;SelectPage.prototype.execute.apply(this,arguments)};
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.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));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 c=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&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),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===
-typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;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.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
-selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,h=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(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),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=
+!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){h();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),h=a.getAttribute("pageHeight"),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;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:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=h?new mxRectangle(0,0,parseFloat(c),parseFloat(h)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
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}};
Graph.prototype.setViewState=function(a){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=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
@@ -3005,125 +3007,184 @@ EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled
EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,c=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),c=a.node.cloneNode(!1),c.removeAttribute("id"),c=new DiagramPage(c),c.root=e.cloneCells([e.model.root])[0],c.viewState=e.getViewState(),c.viewState.scale=1,c.viewState.scrollLeft=null,c.viewState.scrollRight=null,c.setName(b),c=this.insertPage(c,mxUtils.indexOf(this.pages,a)+1));return c};
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.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c,
-"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,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.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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+e)/this.pages.length)+1),h=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),h=d):mxEvent.consume(b)}));mxEvent.addListener(c,
+"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=h&&d!=h&&this.movePage(h,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
+c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.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 q=this.createControlTab(4,
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,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=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";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);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 e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.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 c=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b);
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.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 c=mxEvent.getClientX(a),h=mxEvent.getClientY(a);b.popup(c,h,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,e){e=this.createTab(e);var c=a.getName();e.setAttribute("title",c);mxUtils.write(e,c);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!c){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);n.popup(q,t,null,l);this.setCurrentMenu(n,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,h=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;h=a==this.currentPage;e.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&h||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){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 q=mxEvent.getClientX(m),u=mxEvent.getClientY(m);p.popup(q,u,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,c){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,c){c.setAttribute("page",e.page.getId());return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.page=a.ui.getPageById(e.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,c));return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage"));
-b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,c,e,q,t){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),h=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),l=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&h.push(b);a!=e[f]&&h.push(a);return a==e[f]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[f],
-a))}for(f=0;f<h.length;f++)this.model.setVisible(h[f],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=g.view.getState(a),g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function q(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.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 t(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=q(a),h=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);g.view.currentRoot!=c&&(e[1].geometry.x-=h.x,e[1].geometry.y-=h.y);var k=g.view.getState(a),l=g.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var m=g.getOutgoingEdges(g.model.getTerminal(d[0],
-!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=h=d=0;t<m.length;t++){var r=g.model.getTerminal(m[t],!1);if(f==q(r)){var u=g.view.getState(r);r!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}p?h=0:d=0;for(t=0;t<m.length;t++)if(r=g.model.getTerminal(m[t],
-!1),f==q(r)&&(u=g.view.getState(r),r!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var C=[];g.traverse(u.cell,!0,function(a,b){null!=b&&C.push(b);C.push(a);return!0});g.moveCells(C,(b?1:-1)*d,(b?1:-1)*h)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function d(a){g.model.beginUpdate();try{var b=q(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1);
-var e=g.model.getParent(a),f=e.geometry,h=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);g.moveCells(h,k,l);return g.addCells(d,e)}finally{g.model.endUpdate()}}function h(a){g.model.beginUpdate();try{var b=
-g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var h=0;h<c.length;h++){var k=g.model.getTerminal(c[h],!1);null!=k&&f.push(k)}var l=g.view.getBounds(f),n=q(a),m=g.view.translate,p=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/p-m.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function f(a,
-b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.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 p(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?m.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=f(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var m=this,g=m.editor.graph,w=g.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=m.menus.createPopupMenu;m.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&
-(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};m.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");m.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),
-a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");m.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");m.actions.addAction("selectDescendants",
-function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=g.removeCells;g.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var h=a[f];w.isEdge(h)&&c(h)&&(e.push(h),h=w.getTerminal(h,!1));b(h)?(g.traverse(h,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),h=g.getIncomingEdges(a[f]),a=a.concat(h)):e.push(a[f])}a=e;return v.apply(this,arguments)};m.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var r=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var h=g.getIncomingEdges(f.cell),f=0;f<h.length;f++)mxUtils.remove(h[f],
-a)}this.model.beginUpdate();try{var k=r.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=g.getIncomingEdges(k[e]),h=g.getIncomingEdges(a[e]);if(0==l.length&&0<h.length){var n=this.cloneCells([h[0]])[0];this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(h[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=g.moveCells;g.moveCells=function(a,c,d,e,f,h,k){var l=null;this.model.beginUpdate();try{var n=f,m=this.view.getState(f),p=null!=m?m.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||g.model.isEdge(a[q])&&null==g.model.getTerminal(a[q],!0)){f=g.model.getParent(a[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var t=g.getIncomingEdges(a[0]);if(0<t.length){var r=g.view.getState(g.model.getTerminal(t[0],!0));if(null!=r){var u=g.view.getState(n);null!=u&&(c=(u.getCenterX()-r.getCenterX())/g.view.scale,d=(u.getCenterY()-r.getCenterY())/g.view.scale)}}}}l=z.apply(this,arguments);
-if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(n)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],n,!0);else if(b(a[q])&&(t=g.getIncomingEdges(a[q]),0<t.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==g.getIncomingEdges(l[q]).length){m=n;if(null==m||m==g.model.getParent(a[q]))m=g.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,
-g.getDefaultParent(),m,l[q])}}finally{this.model.endUpdate()}return l};if(null!=m.sidebar){var A=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,h=null;f.beginUpdate();try{if(h=A.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(f.isEdge(h[k])&&null==f.getTerminal(h[k],!0)){f.setTerminal(h[k],a,!0);var l=g.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return h}}var x={88:m.actions.get("selectChildren"),
-84:m.actions.get("selectSubtree"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},F=m.onKeyDown;m.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&b(g.getSelectionCell())&&1==g.getSelectionCount()){var c=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(g.getSelectionCell()):h(g.getSelectionCell()):13==a.which&&(c=t(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(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]),null!=m.hoverIcons&&m.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=x[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(g.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var y=g.connectVertex;g.connectVertex=function(a,c,e,f,k,l){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=q(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?h(a):f==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&&
-c!=mxConstants.DIRECTION_WEST)):y.call(this,a,c,e,f,k,l)};g.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&g.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var m=b.getAttribute("id");null==a.lookup(m)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
+Graph.prototype.foldCells=function(a,c,e,q,u){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),g=[],f=0;f<e.length;f++){var h=this.view.getState(e[f]),n=null!=h?h.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[f]&&g.push(a);return a==e[f]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[f],
+a))}for(f=0;f<g.length;f++)this.model.setVisible(g[f],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=l.view.getState(a),l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function q(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.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 u(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var c=l.model.getParent(a),d=l.getIncomingEdges(a),e=l.cloneCells([d[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);l.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),h=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*h:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*h;var m=l.getOutgoingEdges(l.model.getTerminal(d[0],
+!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<m.length;r++){var t=l.model.getTerminal(m[r],!1);if(f==q(t)){var u=l.view.getState(t);t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/h),g=10+Math.max(g,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/h))}}p?g=0:d=0;for(r=0;r<m.length;r++)if(t=l.model.getTerminal(m[r],
+!1),f==q(t)&&(u=l.view.getState(t),t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var z=[];l.traverse(u.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});l.moveCells(z,(b?1:-1)*d,(b?1:-1)*g)}}}return l.addCells(e,c)}finally{l.model.endUpdate()}}function d(a){l.model.beginUpdate();try{var b=q(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);
+var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,h=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,h=-40):b==mxConstants.DIRECTION_WEST?(k=-40,h=0):b==mxConstants.DIRECTION_EAST&&(h=0);l.moveCells(g,k,h);return l.addCells(d,e)}finally{l.model.endUpdate()}}function g(a){l.model.beginUpdate();try{var b=
+l.model.getParent(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(d[0],a,!0);var c=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=l.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var h=l.view.getBounds(f),n=q(a),m=l.view.translate,p=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/p-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/p-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==h?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(h.y+h.height)/p-m.y+-e.y+10);return l.addCells(d,b)}finally{l.model.endUpdate()}}function f(a,
+b,d){a=l.getOutgoingEdges(a);d=l.view.getState(d);var c=[];if(null!=d&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,d.x+d.width)>=Math.max(f.x,d.x)||b&&Math.min(f.y+f.height,d.y+d.height)>=Math.max(f.y,d.y))&&c.push(f)}c.sort(function(a,d){return b?a.x+a.width-d.x-d.width:a.y+a.height-d.y-d.height})}return c}function t(a,b){var d=q(a),c=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||
+d==mxConstants.DIRECTION_WEST)==c&&d!=b?n.actions.get("selectParent").funct():d==b?(c=l.getOutgoingEdges(a),null!=c&&0<c.length&&l.setSelectionCell(l.model.getTerminal(c[0],!1))):(d=l.getIncomingEdges(a),null!=d&&0<d.length&&(c=f(l.model.getTerminal(d[0],!0),c,a),d=l.view.getState(a),null!=d&&(d=mxUtils.indexOf(c,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=c.length-1&&l.setSelectionCell(c[d].cell)))))}var n=this,l=n.editor.graph,w=l.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var k=n.menus.createPopupMenu;n.menus.createPopupMenu=function(a,d,c){k.apply(this,arguments);if(1==l.getSelectionCount()){d=l.getSelectionCell();var e=l.getOutgoingEdges(d);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,c),this.addMenuItems(a,["selectDescendants"],null,c));b(l.getSelectionCell())&&
+(a.addSeparator(),0<l.getIncomingEdges(d).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,c))}};n.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),
+a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",
+function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,d){null!=d&&b.push(d);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=l.removeCells;l.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(l.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=l.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,d,c){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,c))};var r=l.duplicateCells;l.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();for(var c=a.slice(0),e=0;e<c.length;e++){var f=l.view.getState(c[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var k=r.call(this,a,d);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var h=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(a[e]);if(0==h.length&&0<g.length){var n=this.cloneCells([g[0]])[0];this.addEdge(n,l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var E=l.moveCells;l.moveCells=function(a,d,c,e,f,g,k){var h=null;this.model.beginUpdate();try{var n=f,m=this.view.getState(f),p=null!=m?m.style:this.getCellStyle(f);
+if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||l.model.isEdge(a[q])&&null==l.model.getTerminal(a[q],!0)){f=l.model.getParent(a[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var r=l.getIncomingEdges(a[0]);if(0<r.length){var u=l.view.getState(l.model.getTerminal(r[0],!0));if(null!=u){var t=l.view.getState(n);null!=t&&(d=(t.getCenterX()-u.getCenterX())/l.view.scale,c=(t.getCenterY()-u.getCenterY())/l.view.scale)}}}}h=E.apply(this,arguments);
+if(null!=h&&null!=a&&h.length==a.length)for(q=0;q<h.length;q++)if(this.model.isEdge(h[q]))b(n)&&0>mxUtils.indexOf(h,this.model.getTerminal(h[q],!0))&&this.model.setTerminal(h[q],n,!0);else if(b(a[q])&&(r=l.getIncomingEdges(a[q]),0<r.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],n,!0);else if(0==l.getIncomingEdges(h[q]).length){m=n;if(null==m||m==l.model.getParent(a[q]))m=l.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,
+l.getDefaultParent(),m,h[q])}}finally{this.model.endUpdate()}return h};if(null!=n.sidebar){var G=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,d,c,e){var f=l.model,g=null;f.beginUpdate();try{if(g=G.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var h=l.getCellGeometry(g[k]);h.points=null;null!=h.getTerminalPoint(!0)&&h.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var H={88:n.actions.get("selectChildren"),
+84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},C=n.onKeyDown;n.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&&b(l.getSelectionCell())&&1==l.getSelectionCount()){var c=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(l.getSelectionCell()):g(l.getSelectionCell()):13==a.which&&(c=u(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&l.model.isEdge(c[0])?l.setSelectionCell(l.model.getTerminal(c[0],
+!1)):l.setSelectionCell(c[c.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=H[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(t(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(t(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(t(l.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(t(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(K){console.log("error",K)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var x=l.connectVertex;l.connectVertex=function(a,c,e,f,k,h){var n=l.getIncomingEdges(a);return b(a)&&0<n.length?(e=q(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?g(a):f==k?d(a):u(a,c!=mxConstants.DIRECTION_NORTH&&
+c!=mxConstants.DIRECTION_WEST)):x.call(this,a,c,e,f,k,h)};l.getSubtree=function(a){var d=[a];b(a)&&!e(a)&&l.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){y.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",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.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var L=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){L.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),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
+this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){I.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),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;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;container=1;recursiveResize=0;treeFolding=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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=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 e=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");g.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);g.insertEdge(w,!1);a.insert(d);a.insert(f);a.insert(l);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(g);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var h=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");h.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);h.insertEdge(n,!1);var l=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");l.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);l.insertEdge(m,!1);a.insert(d);a.insert(f);a.insert(n);a.insert(m);a.insert(b);a.insert(c);a.insert(e);a.insert(h);a.insert(l);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap 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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=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 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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=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;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.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;
-c.insertEdge(d,!0);e.insertEdge(d,!1);var h=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");h.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;c.insertEdge(f,!0);h.insertEdge(f,!1);a.insert(d);a.insert(f);a.insert(c);a.insert(e);a.insert(h);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(d,!0);e.insertEdge(d,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;c.insertEdge(f,!0);g.insertEdge(f,!1);a.insert(d);a.insert(f);a.insert(c);a.insert(e);a.insert(g);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;container=1;recursiveResize=0;");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;container=1;recursiveResize=0;treeFolding=1;");
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;container=1;recursiveResize=0;treeFolding=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;container=1;recursiveResize=0;treeFolding=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")})])}}})();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\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\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\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\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\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\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\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\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\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\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\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\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.\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.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\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 read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\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\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\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\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\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>.\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.\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 page refresh.\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\nmiddle=Middle\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\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\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\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\npaste=Paste\npasteHere=Paste here\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\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\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 by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\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\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\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\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\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 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\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\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\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\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=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="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><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="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></mxStylesheet>').documentElement;
+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){a.editor.graph.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new h(a,mxResources.get("format"),Math.max(0,a.diagramContainer.clientWidth-a.formatWidth-12),56,a.formatWidth,546,function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.minimumSize=
+new mxRectangle(0,0,a.formatWidth,80),a.formatWindow.window.setVisible(!0),a.formatWindow.window.fit(),a.fireEvent(new mxEventObject("sidebar"))):(a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible()),a.formatWindow.window.isVisible()&&a.formatWindow.window.fit());var b=mxUtils.getOffset(a.container);a.formatWindow.window.div.style.top=Math.max(parseInt(a.formatWindow.window.div.style.top),b.y)+"px"}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==
+a.sidebarWindow){var d=Math.min(b.container.clientWidth-10,300);a.sidebarWindow=new h(a,mxResources.get("shapes"),10,56,d-6,Math.min(600,b.container.clientHeight-30),function(b){function d(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;";g.className="geTitle";b.appendChild(g);return g}var c=document.createElement("div");
+c.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";c.className="geTitle";mxUtils.write(c,mxResources.get("moreShapes"));b.appendChild(c);mxEvent.addListener(c,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){c=document.createElement("div");c.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";
+c.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("newLibrary").funct);c=document.createElement("div");c.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";c.className="geTitle";f=document.createElement("span");
+f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("openLibrary").funct)}else c=d("newLibrary",mxResources.get("newLibrary")),c.style.left="0",c=d("openLibraryFrom",mxResources.get("openLibraryFrom")),c.style.borderLeft="1px solid lightgray",c.style.left="50%";else c.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",
+function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.sidebarWindow.window.fit();a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible()),a.sidebarWindow.window.isVisible()&&
+a.sidebarWindow.window.fit();b=mxUtils.getOffset(a.container);a.sidebarWindow.window.div.style.top=Math.max(parseInt(a.sidebarWindow.window.div.style.top),b.y)+"px"}var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: normal; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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:2px; 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 0 2px 0; 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); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}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:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { 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: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !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: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !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; }";
+document.getElementsByTagName("head")[0].appendChild(c)}catch(n){}var h=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,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-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};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="#ffffff"/>').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="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
+mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
+Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,36,'<path d="m 6 36 L 12 36 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleRight=Graph.createSvgImage(36,18,'<path d="m 1 6 L 24 6 L 24 1 L 36 9 L 24 18 L 24 12 L 1 12 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.triangleDown=Graph.createSvgImage(18,36,'<path d="m 6 1 L 6 24 L 1 24 L 9 36 L 18 24 L 12 24 L 12 1 z" stroke="#fff" fill="#29b6f2"/>');
+HoverIcons.prototype.triangleLeft=Graph.createSvgImage(36,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
+Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);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.HIGHLIGHT_SIZE=5;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.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
+25;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var m=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){m.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):p.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var u=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){u.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="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};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="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
+b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";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="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var e=this.editorUi.editor.graph;a.smartSeparators=!0;d.apply(this,arguments);
+mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==e.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(a,e.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
+a)):e.isSelectionEmpty()&&e.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};var g=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
+function(a){a=g.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="0px";a.appendChild(d);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
+e.style.position="relative";e.style.top="4px";d.appendChild(e)}return a};var f=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);
+null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.actions.tagsWindow&&(this.actions.tagsWindow.window.setVisible(!1),this.actions.tagsWindow.window.destroy(),this.actions.tagsWindow=null);null!=this.actions.findWindow&&(this.actions.findWindow.window.setVisible(!1),this.actions.findWindow.window.destroy(),this.actions.findWindow=null);f.apply(this,arguments)};EditorUi.prototype.chromelessWindowResize=function(){};var t=EditorUi.prototype.init;
+EditorUi.prototype.init=function(){function c(a,b,c,d){var e=g.menus.get(a),f=x.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML="",mxUtils.setOpacity(f,d||40)):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function d(a,b,c,d,e,f){var g=document.createElement("a");g.setAttribute("href","javascript:void(0)");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";C.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,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b();mxEvent.consume(a)});
+null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.setOpacity(g,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),mxUtils.setOpacity(g,null!=f?40:100),g.style.cursor=""):(g.setAttribute("disabled","disabled"),mxUtils.setOpacity(g,null!=f?10:50),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign=
+"top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));C.appendChild(b);return b}t.apply(this,arguments);var g=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";m.style.bottom=
+"1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(m);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=
+mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
+g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){a(g)}));var p=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
+g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b,mxResources.get("open")),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,
+["-","close"])})));if(isLocalStorage){var m=g.menus.get("openFrom"),q=m.funct;m.funct=function(a,b){q.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,
+["-","revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"exportPng exportJpg exportSvg - exportPdf exportVsdx - exportHtml exportXml exportUrl -".split(" "),b);g.menus.addSubmenu("embed",a,b);g.menus.addSubmenu("publish",a,b)})));g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&
+g.menus.addSubmenu("theme",a,b);g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),
+b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var u="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
+g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<u.length;c++)"-"==u[c]?a.addSeparator(b):p(a,b,mxResources.get(u[c])+"...",u[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
+"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var x=new Menubar(g,C);(m=900>e)||c("diagram");f([m?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
+null,mxResources.get("shapes"),g.actions.get("image"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var y=c("insert",!0,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([y,d(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=e){var B=g.actions.get("undo"),m=g.actions.get("redo"),B=d("",B.funct,null,mxResources.get("undo")+" ("+B.shortcut+")",B,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),m=d("",m.funct,
+null,mxResources.get("redo")+" ("+m.shortcut+")",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([B,m]);560<=e&&f([d("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
+c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=e?d("",g.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=e?d("",g.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));g.setStatusText(g.editor.getStatus());C.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText=
+"position:absolute;right:40px;top:12px;white-space:nowrap;";C.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;480<=e&&(m=g.menus.get("language"),null!=m&&(y=x.addMenu("",m.funct),y.setAttribute("title",mxResources.get("language")),y.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundSize="24px 24px",y.style.position="absolute",y.style.height="24px",y.style.width="24px",y.style.zIndex="1",y.style.top="11px",y.style.right="14px",mxUtils.setOpacity(y,30),C.appendChild(y)));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+m=g.diagramContainer.parentNode;B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";var I=g.menus.get("viewZoom");if(null!=I){this.tabContainer.style.right="70px";y=x.addMenu("100%",I.funct);y.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");y.style.whiteSpace="nowrap";y.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+y.style.backgroundPosition="right 6px center";y.style.backgroundRepeat="no-repeat";y.style.paddingRight="10px";y.style.display="block";y.style.position="absolute";y.style.textDecoration="none";y.style.textDecoration="none";y.style.right="0px";y.style.bottom="0px";y.style.overflow="hidden";y.style.textAlign="center";y.style.color="#000";y.style.fontSize="12px";y.style.color="#707070";y.style.width="59px";y.style.borderTop="1px solid lightgray";y.style.borderLeft="1px solid lightgray";y.style.height=
+parseInt(g.tabContainer.style.height)-1+"px";y.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";B.appendChild(y);I=mxUtils.bind(this,function(){y.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,I);g.editor.addListener("resetGraphView",I);g.editor.addListener("pageSelected",I);var z=g.setGraphEnabled;g.setGraphEnabled=function(){z.apply(this,arguments);null!=this.tabContainer&&(y.style.visibility=this.tabContainer.style.visibility)}}B.appendChild(g.tabContainer);
+B.appendChild(C);B.appendChild(g.diagramContainer);m.appendChild(B);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.outlineWindow.fit();null!=g.actions.layersWindow&&g.outlineWindow.fit();null!=g.actions.tagsWindow&&g.tagsWindow.window.fit();null!=g.actions.findWindow&&g.findWindow.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)}})();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\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\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\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\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\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\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\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\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\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\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\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\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.\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.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\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 read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\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\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\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\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\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>.\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.\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 page refresh.\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\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\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\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\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\npaste=Paste\npasteHere=Paste here\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\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\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 by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\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\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\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\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\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 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\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\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\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\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=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="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><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="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></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="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,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;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.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;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);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};
-mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){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:k.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
-this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var h=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged",
-h);h();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
+mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var h=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:h.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
+this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged",
+g);g();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);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!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",
-this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),c())}));l.observe(k,{attributes:!0})}else c()}};
+this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var h=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),c())}));m.observe(h,{attributes:!0})}else c()}};
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){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.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),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})};
GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var c=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,
-top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.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"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!0,this.graph.maxFitScale=
-null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",c),this.graph.addListener("size",
-c)):new ResizeSensor(this.graph.container,c));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var n=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(n);l||(n=window.setTimeout(mxUtils.bind(this,
+top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.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"}e=!1}}),h=null,m=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==h||m||(m=!0,this.graph.maxFitScale=
+null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},h=c,window.setTimeout(function(){m=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",c),this.graph.addListener("size",
+c)):new ResizeSensor(this.graph.container,c));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=h=null,c=mxUtils.bind(this,function(){window.clearTimeout(p);m||(p=window.setTimeout(mxUtils.bind(this,
this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",c):new ResizeSensor(this.graph.container,c))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",c);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
-null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};
+null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),h=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();h=null;q()}};
GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),n=0;n<l;n++)k.setVisible(k.getChildAt(k.root,n),null!=b?c.isVisible(c.getChildAt(c.root,n)):!1);if(null==c)for(n=0;n<e.length;n++)k.setVisible(k.getChildAt(k.root,parseInt(e[n])),!0)}finally{k.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,h=a.getModel();h.beginUpdate();try{for(var m=h.getChildCount(h.root),p=0;p<m;p++)h.setVisible(h.getChildAt(h.root,p),null!=b?c.isVisible(c.getChildAt(c.root,p)):!1);if(null==c)for(p=0;p<e.length;p++)h.setVisible(h.getChildAt(h.root,parseInt(e[p])),!0)}finally{h.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){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=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(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);e.appendChild(f);h++;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 e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,l=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
-0);c=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),n=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(n(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){n(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){n(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||n(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():n(30))}})}for(var d=this.toolbarItems,h=0,f=null,p=null,m=0;m<d.length;m++){var g=d[m];if("pages"==g){p=b.ownerDocument.createElement("div");
-p.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(p,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(p);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";g=mxUtils.bind(this,function(){p.innerHTML="";mxUtils.write(p,this.currentPage+1+" / "+this.diagrams.length);p.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=p.style.display;u.style.display=p.style.display});this.addListener("graphChanged",g);g()}else if("zoom"==g)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"==g){if(this.layersEnabled){var v=this.graph.getModel(),r=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;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 e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,h=null,m=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
+0);c=null;h=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";h=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,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(e,mxClient.IS_POINTER?"pointermove":
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,u=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var d=this.toolbarItems,g=0,f=null,t=null,n=0;n<d.length;n++){var l=d[n];if("pages"==l){t=b.ownerDocument.createElement("div");
+t.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(t,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(t);var k=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");k.style.paddingLeft="0px";k.style.paddingRight="0px";l=mxUtils.bind(this,function(){t.innerHTML="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=t.style.display;k.style.display=t.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)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"==l){if(this.layersEnabled){var v=this.graph.getModel(),r=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=r.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
-"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==g?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(g=this.graphConfig["toolbar-buttons"][g],
-null!=g&&a(null==g.enabled||g.enabled?g.handler:function(){},g.image,g.title,g.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*h);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
-70),e.appendChild(d));this.minToolbarWidth=34*h;var z=b.style.border,d=mxUtils.bind(this,function(){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};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==z&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=f&&(f.parentNode.removeChild(f),
-f=null),b.style.border=z)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(c=k.getAttribute("href"))}null!=b?null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=c.indexOf(","),0<k&&(k=c.substring(k+
-1),this.selectPageById(k),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l],
+null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
+70),e.appendChild(d));this.minToolbarWidth=34*g;var E=b.style.border,d=mxUtils.bind(this,function(){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};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=f&&(f.parentNode.removeChild(f),
+f=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var h=mxEvent.getSource(e);"a"==h.nodeName.toLowerCase()&&(c=h.getAttribute("href"))}null!=b?null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(h=c.indexOf(","),0<h&&(h=c.substring(h+
+1),this.selectPageById(h),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,e){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;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.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,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev=
"1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){c.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;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;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&
-c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var n=c.editor.graph,q=n.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",k)):(b.style.display="none",e.style.display="none");
-var t=this;n.getImageFromBundles=function(a){return t.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(n.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
-(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(n,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
+10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};var h=mxUtils.bind(this,function(a){27==a.keyCode&&
+c.destroy()}),m=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",h);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=c.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",h)):(b.style.display="none",e.style.display="none");
+var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
+(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute",c.chromelessToolbar.style.bottom="",
-c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(n,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var k=c[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(c[e]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){k(a)}):k(c.xml)}};
+c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var h=c[e].className;null!=h&&0<h.length&&(h=h.split(" "),0<=mxUtils.indexOf(h,a)&&b.push(c[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),h=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){h(a)}):h(c.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,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.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(e,c){function k(){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 l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function n(b,c){if(!b.resizedAttached)b.resizedAttached=
-new k,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"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],h=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};h();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,x,F,y=function(){if((x=b.offsetWidth)!=q||(F=b.offsetHeight)!=t)n=!0,q=x,t=F;h()},D=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",y);D(f,"scroll",y)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},t=Object.prototype.toString.call(e),d="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var t=0,h=e.length;t<h;t++)n(e[t],q);else n(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function h(){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 h,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],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var p=!1,q=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(q))};a(q);var t,u,H,C,x=function(){if((H=b.offsetWidth)!=t||(C=b.offsetHeight)!=u)p=!0,t=H,u=C;g()},y=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};y(d,"scroll",x);y(f,"scroll",x)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},u=Object.prototype.toString.call(e),d="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var u=0,g=e.length;u<g;u++)p(e[u],q);else p(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
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/resources/dia.txt b/src/main/webapp/resources/dia.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia.txt
+++ b/src/main/webapp/resources/dia.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_am.txt
+++ b/src/main/webapp/resources/dia_am.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txt
index 24cec8e6..766960f4 100644
--- a/src/main/webapp/resources/dia_ar.txt
+++ b/src/main/webapp/resources/dia_ar.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=‫خيارات الإدخال الرياضي‬
makeCopy=‫إنشاء نسخة‬
manual=‫يدوي‬
middle=‫وسط‬
+minimal=Minimal
misc=‫متفرقات‬
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txt
index 634c53e2..1723b993 100644
--- a/src/main/webapp/resources/dia_bg.txt
+++ b/src/main/webapp/resources/dia_bg.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Математическа текстообработк
makeCopy=Направи копие
manual=Ръководство
middle=Среден
+minimal=Minimal
misc=Разни
mockups=Макети
modificationDate=Дата на модификация
diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_bn.txt
+++ b/src/main/webapp/resources/dia_bn.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txt
index aa561fd0..9741a2f9 100644
--- a/src/main/webapp/resources/dia_bs.txt
+++ b/src/main/webapp/resources/dia_bs.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematičke postavke pisanja
makeCopy=Napravi kopiju
manual=Ručno
middle=Sredina
+minimal=Minimal
misc=Mješavina
mockups=Model
modificationDate=Datim uređivanja
diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt
index e0471311..8b07f4c1 100644
--- a/src/main/webapp/resources/dia_ca.txt
+++ b/src/main/webapp/resources/dia_ca.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Composició tipogràfica matemàtica
makeCopy=Fes una còpia
manual=Manual
middle=Mig
+minimal=Minimal
misc=Diversos
mockups=Esbossos
modificationDate=Data de modificació
diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txt
index f85904bd..3fa5a4d0 100644
--- a/src/main/webapp/resources/dia_cs.txt
+++ b/src/main/webapp/resources/dia_cs.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematické nastavení písma
makeCopy=Udělat kopii
manual=Manuál
middle=Střed
+minimal=Minimal
misc=Různé
mockups=Mockup prototypy
modificationDate=Datum změny
diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txt
index 430c2ee3..74bc37ea 100644
--- a/src/main/webapp/resources/dia_da.txt
+++ b/src/main/webapp/resources/dia_da.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematisk tegnsætning
makeCopy=Opret en kopi
manual=Manual
middle=Midte
+minimal=Minimal
misc=Div.
mockups=Mockups
modificationDate=Ændringsdato
diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt
index 133f6762..9b225d25 100644
--- a/src/main/webapp/resources/dia_de.txt
+++ b/src/main/webapp/resources/dia_de.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematischer Formelsatz
makeCopy=Kopie erstellen
manual=Manuell
middle=Mitte
+minimal=Minimal
misc=Verschiedenes
mockups=Mockups
modificationDate=Änderungsdatum
@@ -477,7 +478,7 @@ openLink=Verknüpfung öffnen
openInNewWindow=In neuem Fenster öffnen
openInThisWindow=In diesem Fenster öffnen
openIt={1} öffnen
-openRecent=Zuletzt geöffnet
+openRecent=Kürzlich geöffnet
openSupported=Unterstützte Formate sind mit dieser Anwendung erstellte Dateien (.xml), .vsdx und .gliffy
options=Optionen
organic=Organisch
diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txt
index 800e810e..a707b728 100644
--- a/src/main/webapp/resources/dia_el.txt
+++ b/src/main/webapp/resources/dia_el.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Μαθηματική ρύθμιση κειμένου π
makeCopy=Δημιουργία αντιγράφου
manual=Χειροκίνητα
middle=Μέσο
+minimal=Minimal
misc=Misc
mockups=Προσχέδια
modificationDate=Ημερομηνία τροποποίησης
diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt
index a38d1a94..29dafd79 100644
--- a/src/main/webapp/resources/dia_eo.txt
+++ b/src/main/webapp/resources/dia_eo.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txt
index fea65128..9be8b1e5 100644
--- a/src/main/webapp/resources/dia_es.txt
+++ b/src/main/webapp/resources/dia_es.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Composición tipográfica matemática
makeCopy=Hacer una copia
manual=Manual
middle=Medio
+minimal=Minimal
misc=Miscelánea
mockups=Bosquejos
modificationDate=Fecha de modificación
diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txt
index 4a1ecf35..754fcd45 100644
--- a/src/main/webapp/resources/dia_et.txt
+++ b/src/main/webapp/resources/dia_et.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matemaatiline vormistus
makeCopy=Tee koopia
manual=Manuaalne
middle=Keskel
+minimal=Minimal
misc=Erinevad
mockups=Mallid
modificationDate=Muutmise kuupäev
diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txt
index 60768288..aac51ea0 100644
--- a/src/main/webapp/resources/dia_fa.txt
+++ b/src/main/webapp/resources/dia_fa.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=‫حروف چینی ریاضی‬
makeCopy=‫ایجاد یک کپی‬
manual=‫دَستی‬
middle=‫وسط‬
+minimal=Minimal
misc=‫متفرقه‬
mockups=‫ماکت ها‬
modificationDate=‫تاریخ اصلاح‬
diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txt
index ef0e1f05..40ceab5f 100644
--- a/src/main/webapp/resources/dia_fi.txt
+++ b/src/main/webapp/resources/dia_fi.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matemaattiset näppäilyasetukset
makeCopy=Luo kopio
manual=Manuaalinen
middle=Keskellä
+minimal=Minimal
misc=Sekalaiset
mockups=Mallit
modificationDate=Muokkauspäivämäärä
diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txt
index a3def3fb..eda06ec4 100644
--- a/src/main/webapp/resources/dia_fil.txt
+++ b/src/main/webapp/resources/dia_fil.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematikong Typesetting
makeCopy=Gumawa ng kopya
manual=De-Mano
middle=Gitna
+minimal=Minimal
misc=Sari-sari
mockups=Mga Mockup
modificationDate=Petsa ng pagbago
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index de2bec27..685e3b13 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Paramètres d'entrée mathématique
makeCopy=Faire une copie
manual=Manuel
middle=Au milieu
+minimal=Minimal
misc=Divers
mockups=Maquettes
modificationDate=Date de modification
diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_gu.txt
+++ b/src/main/webapp/resources/dia_gu.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txt
index b0178917..43ab0fbf 100644
--- a/src/main/webapp/resources/dia_he.txt
+++ b/src/main/webapp/resources/dia_he.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=‫סידור דפוס מתמטי‬
makeCopy=‫צור עותק‬
manual=‫ידני‬
middle=‫אמצע‬
+minimal=Minimal
misc=‫שונות‬
mockups=‫סקיצות‬
modificationDate=‫השתנה בתאריך‬
diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_hi.txt
+++ b/src/main/webapp/resources/dia_hi.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_hr.txt
+++ b/src/main/webapp/resources/dia_hr.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txt
index e5faaa63..8b32dbf2 100644
--- a/src/main/webapp/resources/dia_hu.txt
+++ b/src/main/webapp/resources/dia_hu.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematikai betűszedés
makeCopy=Másolatot készít
manual=Kézi
middle=Közép
+minimal=Minimal
misc=Vegyes
mockups=Makett
modificationDate=Módosítási dátum
diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txt
index 7cf1f86d..52f7de84 100644
--- a/src/main/webapp/resources/dia_i18n.txt
+++ b/src/main/webapp/resources/dia_i18n.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=mathematicalTypesetting
makeCopy=makeCopy
manual=manual
middle=middle
+minimal=minimal
misc=misc
mockups=mockups
modificationDate=modificationDate
diff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txt
index dd2c22dc..fe9548d8 100644
--- a/src/main/webapp/resources/dia_id.txt
+++ b/src/main/webapp/resources/dia_id.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Tata Cetak Matematis
makeCopy=Buat Salinan
manual=Manual
middle=Tengah
+minimal=Minimal
misc=Lain-lain
mockups=Maket
modificationDate=Tanggal ubah
diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txt
index 77100f23..b82ccfdd 100644
--- a/src/main/webapp/resources/dia_it.txt
+++ b/src/main/webapp/resources/dia_it.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Parametri di scrittura matematica
makeCopy=Fai una copia
manual=Manuale
middle=Al centro
+minimal=Minimal
misc=Miscellanea
mockups=Modello
modificationDate=Data di modifica
diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txt
index 08cc4976..02744d51 100644
--- a/src/main/webapp/resources/dia_ja.txt
+++ b/src/main/webapp/resources/dia_ja.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=数式組版
makeCopy=複製する
manual=マニュアル
middle=中央揃え
+minimal=Minimal
misc=その他
mockups=実物大
modificationDate=変更日
diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_kn.txt
+++ b/src/main/webapp/resources/dia_kn.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txt
index d2953ea4..0222b8b2 100644
--- a/src/main/webapp/resources/dia_ko.txt
+++ b/src/main/webapp/resources/dia_ko.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=수학 공식 입력
makeCopy=복사본 만들기
manual=수동
middle=중간
+minimal=Minimal
misc=기타
mockups=모형
modificationDate=변경일
diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_lt.txt
+++ b/src/main/webapp/resources/dia_lt.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_lv.txt
+++ b/src/main/webapp/resources/dia_lv.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_ml.txt
+++ b/src/main/webapp/resources/dia_ml.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_mr.txt
+++ b/src/main/webapp/resources/dia_mr.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txt
index 28da7efd..e25fe426 100644
--- a/src/main/webapp/resources/dia_ms.txt
+++ b/src/main/webapp/resources/dia_ms.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Atur Huruf Matematik
makeCopy=Buat satu Salinan
manual=Manual
middle=Tengah
+minimal=Minimal
misc=Pelbagai
mockups=Latihan
modificationDate=Tarikh diubahsuai
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index e1dd9ca2..0583e1a6 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Wiskundige notatie
makeCopy=Een kopie maken
manual=Handleiding
middle=Midden
+minimal=Minimal
misc=Overige
mockups=Modellen
modificationDate=Aanpassingsdatum
diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txt
index df8a0573..0bd81a4c 100644
--- a/src/main/webapp/resources/dia_no.txt
+++ b/src/main/webapp/resources/dia_no.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematisk tegnsetting
makeCopy=Lag en kopi
manual=Manual
middle=Midten
+minimal=Minimal
misc=Øvrig
mockups=Testmodeller
modificationDate=Endringsdato
diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txt
index e32050a7..ead606b8 100644
--- a/src/main/webapp/resources/dia_pl.txt
+++ b/src/main/webapp/resources/dia_pl.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematyczny zestaw znaków
makeCopy=Zrób kopię
manual=Ręczny
middle=Środek
+minimal=Minimal
misc=Różne
mockups=Modele
modificationDate=Data zmiany
diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txt
index 6f18058c..6ab91462 100644
--- a/src/main/webapp/resources/dia_pt-br.txt
+++ b/src/main/webapp/resources/dia_pt-br.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Sistema tipográfico matemático
makeCopy=Fazer uma cópia
manual=Manual
middle=Meio
+minimal=Minimal
misc=Miscelânea
mockups=Protótipos
modificationDate=Data da alteração
diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txt
index dc6388d4..8b49a4d3 100644
--- a/src/main/webapp/resources/dia_pt.txt
+++ b/src/main/webapp/resources/dia_pt.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Composição tipográfica matemática
makeCopy=Fazer uma cópia
manual=Manual
middle=Meio
+minimal=Minimal
misc=Diversos
mockups=Maquetas
modificationDate=Data de modificação
diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txt
index fadb0c1b..bca8963f 100644
--- a/src/main/webapp/resources/dia_ro.txt
+++ b/src/main/webapp/resources/dia_ro.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Sistem tipografic matematic
makeCopy=Fă o copie
manual=Manual
middle=Mijloc
+minimal=Minimal
misc=Diverse
mockups=Mockups
modificationDate=Data modificării
diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt
index 8b0f860a..280c08ea 100644
--- a/src/main/webapp/resources/dia_ru.txt
+++ b/src/main/webapp/resources/dia_ru.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Математический набор
makeCopy=Создать копию
manual=Вручную
middle=Середина
+minimal=Minimal
misc=Прочее
mockups=Макеты
modificationDate=Дата изменения
diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_sk.txt
+++ b/src/main/webapp/resources/dia_sk.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_sl.txt
+++ b/src/main/webapp/resources/dia_sl.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txt
index d833cf52..cd8d48e5 100644
--- a/src/main/webapp/resources/dia_sr.txt
+++ b/src/main/webapp/resources/dia_sr.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematički slog
makeCopy=Kreiraj kopiju
manual=Ručno
middle=Sredina
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txt
index 237e5b7e..f739db37 100644
--- a/src/main/webapp/resources/dia_sv.txt
+++ b/src/main/webapp/resources/dia_sv.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematisk typsättning
makeCopy=Gör en kopia
manual=Manual
middle=Mitten
+minimal=Minimal
misc=Övrigt
mockups=Prototyper
modificationDate=Ändringsdatum
diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_sw.txt
+++ b/src/main/webapp/resources/dia_sw.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_ta.txt
+++ b/src/main/webapp/resources/dia_ta.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt
index a164040a..87f84a16 100644
--- a/src/main/webapp/resources/dia_te.txt
+++ b/src/main/webapp/resources/dia_te.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Mathematical Typesetting
makeCopy=Make a Copy
manual=Manual
middle=Middle
+minimal=Minimal
misc=Misc
mockups=Mockups
modificationDate=Modification date
diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txt
index 0a1f51e5..e7708a59 100644
--- a/src/main/webapp/resources/dia_th.txt
+++ b/src/main/webapp/resources/dia_th.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=การตั้งค่าการพิมพ์
makeCopy=สร้างฉบับคัดลอก
manual=คู่มือ
middle=กลาง
+minimal=Minimal
misc=เบ็ดเตล็ด
mockups=แบบจำลอง
modificationDate=วันที่แก้ไข
diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txt
index e9d3cb47..a91dcd01 100644
--- a/src/main/webapp/resources/dia_tr.txt
+++ b/src/main/webapp/resources/dia_tr.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Matematiksel dizgi
makeCopy=Kopyasını yap
manual=Elle
middle=Orta
+minimal=Minimal
misc=Çeşitli
mockups=Test modelleri
modificationDate=Modifikasyon tarihi
diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt
index d9efffe0..2f712e4d 100644
--- a/src/main/webapp/resources/dia_uk.txt
+++ b/src/main/webapp/resources/dia_uk.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Математична верстка
makeCopy=Зробити копію
manual=Вручну
middle=Посередині
+minimal=Minimal
misc=Різне
mockups=Макети
modificationDate=Дата зміни
diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txt
index 4a1415a8..7dee68db 100644
--- a/src/main/webapp/resources/dia_vi.txt
+++ b/src/main/webapp/resources/dia_vi.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=Sắp chữ kiểu toán học
makeCopy=Tạo bản sao
manual=Hướng dẫn
middle=Giữa
+minimal=Minimal
misc=Linh tinh
mockups=Bản mẫu
modificationDate=Ngày chỉnh sửa
diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txt
index 27b5465c..ab7ab5bb 100644
--- a/src/main/webapp/resources/dia_zh-tw.txt
+++ b/src/main/webapp/resources/dia_zh-tw.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=數學排版
makeCopy=建立副本
manual=手冊
middle=垂直置中
+minimal=Minimal
misc=其他
mockups=實物模型
modificationDate=修改日期
diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt
index 5983446d..ca0c0d57 100644
--- a/src/main/webapp/resources/dia_zh.txt
+++ b/src/main/webapp/resources/dia_zh.txt
@@ -418,6 +418,7 @@ mathematicalTypesetting=数学排版
makeCopy=创建副本
manual=手册
middle=垂直居中
+minimal=Minimal
misc=杂项
mockups=实体模型
modificationDate=修改日期