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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/js/app.min.js')
-rw-r--r--src/main/webapp/js/app.min.js2738
1 files changed, 1370 insertions, 1368 deletions
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 57881f82..7717dd81 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -468,7 +468,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2421,8 +2421,8 @@ this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPatt
n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var L=e.getCellStyle(I,!1),H=[],S=[],V;for(V in L)H.push(L[V]),S.push(V);e.getModel().isEdge(I)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",S,"values",H,"cells",[I]))}catch(ea){this.handleError(ea)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);
e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var u=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<u.length;c++)0>mxUtils.indexOf(d,u[c])&&d.push(u[c]);var m="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),r=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(c=0;c<r.length;c++)for(f=0;f<r[c].length;f++)d.push(r[c][f]);for(c=0;c<k.length;c++)0>mxUtils.indexOf(d,k[c])&&d.push(k[c]);var x=function(I,L,H,S,V,ea,ka){S=null!=S?S:e.currentVertexStyle;V=null!=V?V:e.currentEdgeStyle;ea=null!=ea?ea:!0;H=null!=H?H:e.getModel();if(ka){ka=[];for(var wa=0;wa<I.length;wa++)ka=ka.concat(H.getDescendants(I[wa]));I=ka}H.beginUpdate();try{for(wa=0;wa<I.length;wa++){var W=I[wa];if(L)var Z=["fontSize",
-"fontFamily","fontColor"];else{var oa=H.getStyle(W),va=null!=oa?oa.split(";"):[];Z=d.slice();for(var Ja=0;Ja<va.length;Ja++){var Fa=va[Ja],sa=Fa.indexOf("=");if(0<=sa){var za=Fa.substring(0,sa),ra=mxUtils.indexOf(Z,za);0<=ra&&Z.splice(ra,1);for(ka=0;ka<r.length;ka++){var Ga=r[ka];if(0<=mxUtils.indexOf(Ga,za))for(var Ta=0;Ta<Ga.length;Ta++){var eb=mxUtils.indexOf(Z,Ga[Ta]);0<=eb&&Z.splice(eb,1)}}}}}var Ua=H.isEdge(W);ka=Ua?V:S;var Xa=H.getStyle(W);for(Ja=0;Ja<Z.length;Ja++){za=Z[Ja];var Ya=ka[za];
-null!=Ya&&"edgeStyle"!=za&&("shape"!=za||Ua)&&(!Ua||ea||0>mxUtils.indexOf(n,za))&&(Xa=mxUtils.setStyle(Xa,za,Ya))}Editor.simpleLabels&&(Xa=mxUtils.setStyle(mxUtils.setStyle(Xa,"html",null),"whiteSpace",null));H.setStyle(W,Xa)}}finally{H.endUpdate()}return I};e.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(I,L){x(L.getProperty("cells"),!0)});this.insertHandler=x;this.createDivs();this.createUi();this.refresh();
+"fontFamily","fontColor"];else{var oa=H.getStyle(W),va=null!=oa?oa.split(";"):[];Z=d.slice();for(var Ja=0;Ja<va.length;Ja++){var Ga=va[Ja],sa=Ga.indexOf("=");if(0<=sa){var za=Ga.substring(0,sa),ra=mxUtils.indexOf(Z,za);0<=ra&&Z.splice(ra,1);for(ka=0;ka<r.length;ka++){var Ha=r[ka];if(0<=mxUtils.indexOf(Ha,za))for(var Ta=0;Ta<Ha.length;Ta++){var db=mxUtils.indexOf(Z,Ha[Ta]);0<=db&&Z.splice(db,1)}}}}}var Ua=H.isEdge(W);ka=Ua?V:S;var Va=H.getStyle(W);for(Ja=0;Ja<Z.length;Ja++){za=Z[Ja];var Ya=ka[za];
+null!=Ya&&"edgeStyle"!=za&&("shape"!=za||Ua)&&(!Ua||ea||0>mxUtils.indexOf(n,za))&&(Va=mxUtils.setStyle(Va,za,Ya))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));H.setStyle(W,Va)}}finally{H.endUpdate()}return I};e.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(I,L){x(L.getProperty("cells"),!0)});this.insertHandler=x;this.createDivs();this.createUi();this.refresh();
var A=mxUtils.bind(this,function(I){null==I&&(I=window.event);return e.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=A,this.menubarContainer.onmousedown=A,this.toolbarContainer.onselectstart=A,this.toolbarContainer.onmousedown=A,this.diagramContainer.onselectstart=A,this.diagramContainer.onmousedown=A,this.sidebarContainer.onselectstart=A,this.sidebarContainer.onmousedown=A,this.formatContainer.onselectstart=A,this.formatContainer.onmousedown=
A,this.footerContainer.onselectstart=A,this.footerContainer.onmousedown=A,null!=this.tabContainer&&(this.tabContainer.onselectstart=A));!this.editor.chromeless||this.editor.editable?(c=function(I){if(null!=I){var L=mxEvent.getSource(I);if("A"==L.nodeName)for(;null!=L;){if("geHint"==L.className)return!0;L=L.parentNode}}return A(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=
c):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(c=e.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var C=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();C.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var L=mxUtils.getOffset(this.diagramContainer);
@@ -2486,8 +2486,8 @@ null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.a
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var H=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+H.x*S.width),this.scale*(this.translate.y+H.y*S.height),this.scale*H.width*S.width,
this.scale*H.height*S.height)};a.getPreferredPageSize=function(H,S,V){H=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,H.width*S.width,H.height*S.height)};var c=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(H,S,V,ea){if(null!=a.container&&!a.isViewer()){V=null!=V?V:0;ea=null!=ea?ea:0;var ka=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),wa=mxUtils.hasScrollbars(a.container),W=a.view.translate,Z=a.view.scale,
-oa=mxRectangle.fromRectangle(ka);oa.x=oa.x/Z-W.x;oa.y=oa.y/Z-W.y;oa.width/=Z;oa.height/=Z;W=a.container.scrollTop;var va=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Fa=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;H=H?Math.max(.3,Math.min(S||1,Fa/oa.width)):Z;S=(Fa-H*oa.width)/2/H;var sa=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),sa=Math.max(sa,0));if(wa||
-ka.width<Fa||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(sa-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=va*H/Z;else if(0!=V||0!=ea)ka=a.view.translate,a.view.setTranslate(Math.floor(ka.x+V/Z),Math.floor(ka.y+ea/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+oa=mxRectangle.fromRectangle(ka);oa.x=oa.x/Z-W.x;oa.y=oa.y/Z-W.y;oa.width/=Z;oa.height/=Z;W=a.container.scrollTop;var va=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Ga=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;H=H?Math.max(.3,Math.min(S||1,Ga/oa.width)):Z;S=(Ga-H*oa.width)/2/H;var sa=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),sa=Math.max(sa,0));if(wa||
+ka.width<Ga||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(sa-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=va*H/Z;else if(0!=V||0!=ea)ka=a.view.translate,a.view.setTranslate(Math.floor(ka.x+V/Z),Math.floor(ka.y+ea/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(H){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(H){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var H=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=H?parseInt(H["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(H,S,V){k++;
@@ -2779,27 +2779,27 @@ e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mx
2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,c){var f=!0;null!=c&&1==a.length&&(a=this.graph.getCellStyle(a[c]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};
Sidebar.prototype.createDragSource=function(a,c,f,e,g){function d(Z,oa){var va=mxUtils.createImage(Z.src);va.style.width=Z.width+"px";va.style.height=Z.height+"px";null!=oa&&va.setAttribute("title",oa);mxUtils.setOpacity(va,Z==this.refreshTarget?30:20);va.style.position="absolute";va.style.cursor="crosshair";return va}function k(Z,oa,va,Ja){null!=Ja.parentNode&&(mxUtils.contains(va,Z,oa)?(mxUtils.setOpacity(Ja,100),L=Ja):mxUtils.setOpacity(Ja,Ja==fa?30:20));return va}for(var n=this.editorUi,u=n.editor.graph,
-m=null,r=null,x=this,A=0;A<e.length&&(null==r&&u.model.isVertex(e[A])?r=A:null==m&&u.model.isEdge(e[A])&&null==u.model.getTerminal(e[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,va,Ja,Fa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&L==fa){var sa=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];sa=this.updateShapes(Z.model.isEdge(R.cell)?e[0]:e[r],sa);Z.setSelectionCells(sa)}else null!=
+m=null,r=null,x=this,A=0;A<e.length&&(null==r&&u.model.isVertex(e[A])?r=A:null==m&&u.model.isEdge(e[A])&&null==u.model.getTerminal(e[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,va,Ja,Ga){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&L==fa){var sa=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];sa=this.updateShapes(Z.model.isEdge(R.cell)?e[0]:e[r],sa);Z.setSelectionCells(sa)}else null!=
e&&null!=L&&null!=E&&L!=fa?(sa=Z.model.isEdge(E.cell)||null==m?r:m,Z.setSelectionCells(this.dropAndConnect(E.cell,e,I,sa,oa))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(Z.view.getState(Z.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(Z,oa){F.isActive()&&F.reset()});var K=F.mouseDown;F.mouseDown=function(Z){mxEvent.isPopupTrigger(Z)||mxEvent.isMultiTouchEvent(Z)||u.isCellLocked(u.getDefaultParent())||(u.stopEditing(),
K.apply(this,arguments))};var E=null,O=null,R=null,Q=!1,P=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),T=d(this.triangleDown,mxResources.get("connect")),U=d(this.triangleLeft,mxResources.get("connect")),fa=d(this.refreshTarget,mxResources.get("replace")),ha=null,ba=d(this.roundDrop),qa=d(this.roundDrop),I=mxConstants.DIRECTION_NORTH,L=null,H=F.createPreviewElement;F.createPreviewElement=function(Z){var oa=H.apply(this,arguments);mxClient.IS_SVG&&
(oa.style.pointerEvents="none");this.previewElementWidth=oa.style.width;this.previewElementHeight=oa.style.height;return oa};var S=F.dragEnter;F.dragEnter=function(Z,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");S.apply(this,arguments)};var V=F.dragExit;F.dragExit=function(Z,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");V.apply(this,arguments)};F.dragOver=function(Z,oa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=L&&this.currentGuide.hide();
-if(null!=this.previewElement){var va=Z.view;if(null!=R&&L==fa)this.previewElement.style.display=Z.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=E&&null!=L){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=Z.model.isEdge(E.cell)||null==m?r:m,Fa=x.getDropAndConnectGeometry(E.cell,e[Ja],I,e),
-sa=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(e[Ja]),ra=Z.model.getParent(E.cell),Ga=va.translate.x*va.scale,Ta=va.translate.y*va.scale;null!=sa&&!sa.relative&&Z.model.isVertex(ra)&&ra!=va.currentRoot&&(Ta=va.getState(ra),Ga=Ta.x,Ta=Ta.y);sa=za.x;za=za.y;Z.model.isEdge(e[Ja])&&(za=sa=0);this.previewElement.style.left=(Fa.x-sa)*va.scale+Ga+"px";this.previewElement.style.top=(Fa.y-za)*va.scale+Ta+"px";1==e.length&&(this.previewElement.style.width=Fa.width*va.scale+"px",
-this.previewElement.style.height=Fa.height*va.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&Z.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*va.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*va.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
-this.previewElement.style.display="")}};var ea=(new Date).getTime(),ka=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,va,Ja){var Fa=mxEvent.isAltDown(Ja)||null==e?null:Z.getCellAt(oa,va,null,null,null,function(Ta,eb,Ua){return Z.isContainer(Ta.cell)});if(null!=Fa&&!this.graph.isCellConnectable(Fa)&&!this.graph.model.isEdge(Fa)){var sa=this.graph.getModel().getParent(Fa);this.graph.getModel().isVertex(sa)&&this.graph.isCellConnectable(sa)&&
-(Fa=sa)}Z.isCellLocked(Fa)&&(Fa=null);var za=Z.view.getState(Fa);sa=L=null;wa!=za?(ea=(new Date).getTime(),ka=0,wa=za,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=za&&(this.updateThread=window.setTimeout(function(){null==L&&(wa=za,F.getDropTarget(Z,oa,va,Ja))},this.dropTargetDelay+10))):ka=(new Date).getTime()-ea;if(C&&2500>ka&&null!=za&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(za.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(za.style,
+if(null!=this.previewElement){var va=Z.view;if(null!=R&&L==fa)this.previewElement.style.display=Z.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=E&&null!=L){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=Z.model.isEdge(E.cell)||null==m?r:m,Ga=x.getDropAndConnectGeometry(E.cell,e[Ja],I,e),
+sa=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(e[Ja]),ra=Z.model.getParent(E.cell),Ha=va.translate.x*va.scale,Ta=va.translate.y*va.scale;null!=sa&&!sa.relative&&Z.model.isVertex(ra)&&ra!=va.currentRoot&&(Ta=va.getState(ra),Ha=Ta.x,Ta=Ta.y);sa=za.x;za=za.y;Z.model.isEdge(e[Ja])&&(za=sa=0);this.previewElement.style.left=(Ga.x-sa)*va.scale+Ha+"px";this.previewElement.style.top=(Ga.y-za)*va.scale+Ta+"px";1==e.length&&(this.previewElement.style.width=Ga.width*va.scale+"px",
+this.previewElement.style.height=Ga.height*va.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&Z.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*va.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*va.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
+this.previewElement.style.display="")}};var ea=(new Date).getTime(),ka=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,va,Ja){var Ga=mxEvent.isAltDown(Ja)||null==e?null:Z.getCellAt(oa,va,null,null,null,function(Ta,db,Ua){return Z.isContainer(Ta.cell)});if(null!=Ga&&!this.graph.isCellConnectable(Ga)&&!this.graph.model.isEdge(Ga)){var sa=this.graph.getModel().getParent(Ga);this.graph.getModel().isVertex(sa)&&this.graph.isCellConnectable(sa)&&
+(Ga=sa)}Z.isCellLocked(Ga)&&(Ga=null);var za=Z.view.getState(Ga);sa=L=null;wa!=za?(ea=(new Date).getTime(),ka=0,wa=za,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=za&&(this.updateThread=window.setTimeout(function(){null==L&&(wa=za,F.getDropTarget(Z,oa,va,Ja))},this.dropTargetDelay+10))):ka=(new Date).getTime()-ea;if(C&&2500>ka&&null!=za&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(za.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(za.style,
mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(za.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(za.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ka||Z.model.isEdge(za.cell))&&ka>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(za)&&(Z.model.isVertex(za.cell)&&null!=r||Z.model.isEdge(za.cell)&&Z.model.isEdge(e[0]))){if(Z.isCellEditable(za.cell)){R=
za;var ra=Z.model.isEdge(za.cell)?Z.view.getPoint(za):new mxPoint(za.getCenterX(),za.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);fa.style.left=Math.floor(ra.x)+"px";fa.style.top=Math.floor(ra.y)+"px";null==ha&&(Z.container.appendChild(fa),ha=fa.parentNode);k(oa,va,ra,fa)}}else null==R||!mxUtils.contains(R,oa,va)||1500<ka&&!mxEvent.isShiftDown(Ja)?(R=null,null!=ha&&(fa.parentNode.removeChild(fa),
-ha=null)):null!=R&&null!=ha&&(ra=Z.model.isEdge(R.cell)?Z.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,va,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){sa=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ga=E.absolutePoints;null!=ba.parentNode&&(ra=Ga[0],sa.add(k(oa,va,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
-2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Ga=Ga[Ga.length-1],sa.add(k(oa,va,new mxRectangle(Ga.x-this.roundDrop.width/2,Ga.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(E),null!=E.shape&&null!=E.shape.boundingBox&&(ra=mxRectangle.fromRectangle(E.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ga=this.graph.selectionCellsHandler.getHandler(E.cell),null!=Ga&&(ra.x-=
-Ga.horizontalOffset/2,ra.y-=Ga.verticalOffset/2,ra.width+=Ga.horizontalOffset,ra.height+=Ga.verticalOffset,null!=Ga.rotationShape&&null!=Ga.rotationShape.node&&"hidden"!=Ga.rotationShape.node.style.visibility&&"none"!=Ga.rotationShape.node.style.display&&null!=Ga.rotationShape.boundingBox&&ra.add(Ga.rotationShape.boundingBox)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),sa.add(k(oa,va,new mxRectangle(ra.x+
+ha=null)):null!=R&&null!=ha&&(ra=Z.model.isEdge(R.cell)?Z.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,va,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){sa=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ha=E.absolutePoints;null!=ba.parentNode&&(ra=Ha[0],sa.add(k(oa,va,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
+2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Ha=Ha[Ha.length-1],sa.add(k(oa,va,new mxRectangle(Ha.x-this.roundDrop.width/2,Ha.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(E),null!=E.shape&&null!=E.shape.boundingBox&&(ra=mxRectangle.fromRectangle(E.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ha=this.graph.selectionCellsHandler.getHandler(E.cell),null!=Ha&&(ra.x-=
+Ha.horizontalOffset/2,ra.y-=Ha.verticalOffset/2,ra.width+=Ha.horizontalOffset,ra.height+=Ha.verticalOffset,null!=Ha.rotationShape&&null!=Ha.rotationShape.node&&"hidden"!=Ha.rotationShape.node.style.visibility&&"none"!=Ha.rotationShape.node.style.display&&null!=Ha.rotationShape.boundingBox&&ra.add(Ha.rotationShape.boundingBox)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),sa.add(k(oa,va,new mxRectangle(ra.x+
ra.width,E.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,this.triangleDown.height),T)),sa.add(k(oa,va,new mxRectangle(ra.x-this.triangleLeft.width,E.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),U));null!=sa&&sa.grow(10)}I=mxConstants.DIRECTION_NORTH;L==aa?I=mxConstants.DIRECTION_EAST:L==T||L==
-qa?I=mxConstants.DIRECTION_SOUTH:L==U&&(I=mxConstants.DIRECTION_WEST);null!=R&&L==fa&&(za=R);ra=(null==r||Z.isCellConnectable(e[r]))&&(Z.model.isEdge(Fa)&&null!=r||Z.model.isVertex(Fa)&&Z.isCellConnectable(Fa));if(null!=E&&5E3<=ka||E!=za&&(null==sa||!mxUtils.contains(sa,oa,va)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Fa)?za:null,null!=E&&ra){sa=[ba,qa,P,aa,T,U];for(ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Z.model.isEdge(Fa)?
-(Ga=za.absolutePoints,null!=Ga&&(ra=Ga[0],Ga=Ga[Ga.length-1],sa=Z.tolerance,new mxRectangle(oa-sa,va-sa,2*sa,2*sa),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Ga.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Ga.y-this.roundDrop.height/2)+"px",null==Z.model.getTerminal(Fa,!0)&&Z.container.appendChild(ba),null==Z.model.getTerminal(Fa,!1)&&Z.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(za),
-null!=za.shape&&null!=za.shape.boundingBox&&(ra=mxRectangle.fromRectangle(za.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ga=this.graph.selectionCellsHandler.getHandler(za.cell),null!=Ga&&(ra.x-=Ga.horizontalOffset/2,ra.y-=Ga.verticalOffset/2,ra.width+=Ga.horizontalOffset,ra.height+=Ga.verticalOffset,null!=Ga.rotationShape&&null!=Ga.rotationShape.node&&"hidden"!=Ga.rotationShape.node.style.visibility&&"none"!=Ga.rotationShape.node.style.display&&null!=
-Ga.rotationShape.boundingBox&&ra.add(Ga.rotationShape.boundingBox)),P.style.left=Math.floor(za.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(ra.x+ra.width)+"px",aa.style.top=Math.floor(za.getCenterY()-this.triangleRight.height/2)+"px",T.style.left=P.style.left,T.style.top=Math.floor(ra.y+ra.height)+"px",U.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",U.style.top=aa.style.top,"eastwest"!=za.style.portConstraint&&
-(Z.container.appendChild(P),Z.container.appendChild(T)),Z.container.appendChild(aa),Z.container.appendChild(U));null!=za&&(O=Z.selectionCellsHandler.getHandler(za.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));Q=!0}else for(sa=[ba,qa,P,aa,T,U],ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Q||null==O||O.setHandlesVisible(!0);Fa=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&L==fa?null:mxDragSource.prototype.getDropTarget.apply(this,
-arguments);sa=Z.getModel();if(null!=Fa&&(null!=L||!Z.isSplitTarget(Fa,e,Ja))){for(;null!=Fa&&!Z.isValidDropTarget(Fa,e,Ja)&&sa.isVertex(sa.getParent(Fa));)Fa=sa.getParent(Fa);null!=Fa&&(Z.view.currentRoot==Fa||!Z.isValidRoot(Fa)&&0==Z.getModel().getChildCount(Fa)||Z.isCellLocked(Fa)||sa.isEdge(Fa)||!Z.isValidDropTarget(Fa,e,Ja))&&(Fa=null)}Z.isCellLocked(Fa)&&(Fa=null);return Fa});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var Z=[ba,qa,fa,P,aa,T,U],oa=0;oa<Z.length;oa++)null!=
+qa?I=mxConstants.DIRECTION_SOUTH:L==U&&(I=mxConstants.DIRECTION_WEST);null!=R&&L==fa&&(za=R);ra=(null==r||Z.isCellConnectable(e[r]))&&(Z.model.isEdge(Ga)&&null!=r||Z.model.isVertex(Ga)&&Z.isCellConnectable(Ga));if(null!=E&&5E3<=ka||E!=za&&(null==sa||!mxUtils.contains(sa,oa,va)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Ga)?za:null,null!=E&&ra){sa=[ba,qa,P,aa,T,U];for(ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Z.model.isEdge(Ga)?
+(Ha=za.absolutePoints,null!=Ha&&(ra=Ha[0],Ha=Ha[Ha.length-1],sa=Z.tolerance,new mxRectangle(oa-sa,va-sa,2*sa,2*sa),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Ha.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Ha.y-this.roundDrop.height/2)+"px",null==Z.model.getTerminal(Ga,!0)&&Z.container.appendChild(ba),null==Z.model.getTerminal(Ga,!1)&&Z.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(za),
+null!=za.shape&&null!=za.shape.boundingBox&&(ra=mxRectangle.fromRectangle(za.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ha=this.graph.selectionCellsHandler.getHandler(za.cell),null!=Ha&&(ra.x-=Ha.horizontalOffset/2,ra.y-=Ha.verticalOffset/2,ra.width+=Ha.horizontalOffset,ra.height+=Ha.verticalOffset,null!=Ha.rotationShape&&null!=Ha.rotationShape.node&&"hidden"!=Ha.rotationShape.node.style.visibility&&"none"!=Ha.rotationShape.node.style.display&&null!=
+Ha.rotationShape.boundingBox&&ra.add(Ha.rotationShape.boundingBox)),P.style.left=Math.floor(za.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(ra.x+ra.width)+"px",aa.style.top=Math.floor(za.getCenterY()-this.triangleRight.height/2)+"px",T.style.left=P.style.left,T.style.top=Math.floor(ra.y+ra.height)+"px",U.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",U.style.top=aa.style.top,"eastwest"!=za.style.portConstraint&&
+(Z.container.appendChild(P),Z.container.appendChild(T)),Z.container.appendChild(aa),Z.container.appendChild(U));null!=za&&(O=Z.selectionCellsHandler.getHandler(za.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));Q=!0}else for(sa=[ba,qa,P,aa,T,U],ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Q||null==O||O.setHandlesVisible(!0);Ga=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&L==fa?null:mxDragSource.prototype.getDropTarget.apply(this,
+arguments);sa=Z.getModel();if(null!=Ga&&(null!=L||!Z.isSplitTarget(Ga,e,Ja))){for(;null!=Ga&&!Z.isValidDropTarget(Ga,e,Ja)&&sa.isVertex(sa.getParent(Ga));)Ga=sa.getParent(Ga);null!=Ga&&(Z.view.currentRoot==Ga||!Z.isValidRoot(Ga)&&0==Z.getModel().getChildCount(Ga)||Z.isCellLocked(Ga)||sa.isEdge(Ga)||!Z.isValidDropTarget(Ga,e,Ja))&&(Ga=null)}Z.isCellLocked(Ga)&&(Ga=null);return Ga});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var Z=[ba,qa,fa,P,aa,T,U],oa=0;oa<Z.length;oa++)null!=
Z[oa].parentNode&&Z[oa].parentNode.removeChild(Z[oa]);null!=E&&null!=O&&O.reset();L=ha=R=E=O=null};return F};
Sidebar.prototype.itemClicked=function(a,c,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){c=null;for(var g=0;g<a.length&&null==c;g++)e.model.isVertex(a[g])&&(c=g);null!=c&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),c.drop(e,f,null,a.x,a.y,!0))};
@@ -2860,6 +2860,8 @@ Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileL
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createOffscreenGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
Graph.createSvgImage=function(a,c,f,e,g){f=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=e&&null!=g?'viewBox="0 0 '+e+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,c)};
+Graph.createSvgNode=function(a,c,f,e,g){var d=mxUtils.createXmlDocument(),k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"svg"):d.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==d.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
+k.setAttribute("width",f+"px");k.setAttribute("height",e+"px");k.setAttribute("viewBox",a+" "+c+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,c,f,e){var g=document.createElement("canvas");g.width=c;g.height=f;var d=document.createElement("img");d.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(d,0,0);e(g.toDataURL())});d.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
Graph.zapGremlins=function(a){for(var c=0,f=[],e=0;e<a.length;e++){var g=a.charCodeAt(e);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(c,e)),c=e+1)}0<c&&c<a.length&&f.push(a.substring(c));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=a.charCodeAt(f);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=String.fromCharCode(a[f]);return c.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(c,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(c){return"%"+("00"+c.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,c){a=mxUtils.getXml(a);return Graph.compress(c?a:Graph.zapGremlins(a))};
Graph.arrayBufferToString=function(a){var c="";a=new Uint8Array(a);for(var f=a.byteLength,e=0;e<f;e++)c+=String.fromCharCode(a[e]);return c};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(c){return c.charCodeAt(0)})};
@@ -3059,13 +3061,13 @@ B=this.snap(B));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.move
null==D.get(this.model.getParent(t[G]))&&(ja.offset=null,ja.relative=!1,ja.x=da.x/da.view.scale-da.view.translate.x,ja.y=da.y/da.view.scale-da.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),B);return M.encode(X)};Graph.prototype.isSwimlane=function(t,z){var B=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(B=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==
B};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var B=this.getCurrentCellStyle(z);if(null!=B.expand)return"0"!=B.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,B,D,G,M,X,ia){null==ia&&(ia=this.model.getParent(t),this.isTable(ia)||this.isTableRow(ia))&&(ia=this.getCellAt(M,X,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,
[t,z,B,D,G,M,X,ia]);this.model.setValue(B,"");var da=this.getChildCells(B,!0);for(z=0;z<da.length;z++){var ja=this.getCellGeometry(da[z]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(da[z])}var ta=this.getChildCells(t,!0);for(z=0;z<ta.length;z++)ja=this.getCellGeometry(ta[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(ta[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[B]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[B]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(B,!1);if(null!=Ba){var Ha=this.getCurrentCellStyle(Ba);null!=Ha&&"1"==Ha.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
+null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(B,!1);if(null!=Ba){var Da=this.getCurrentCellStyle(Ba);null!=Da&&"1"==Da.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
function(t,z,B){if(z||B)m.apply(this,arguments);else{var D=this.getSelectionCell(),G=null,M=[],X=mxUtils.bind(this,function(ia){if(null!=this.view.getState(ia)&&(this.model.isVertex(ia)||this.model.isEdge(ia)))if(M.push(ia),ia==D)G=M.length-1;else if(t&&null==D&&0<M.length||null!=G&&t&&M.length>G||!t&&0<G)return;for(var da=0;da<this.model.getChildCount(ia);da++)X(this.model.getChildAt(ia,da))});X(this.model.root);0<M.length&&(G=null!=G?mxUtils.mod(G+(t?1:-1),M.length):0,this.setSelectionCell(M[G]))}};
Graph.prototype.swapShapes=function(t,z,B,D,G,M,X){z=!1;if(!D&&null!=G&&1==t.length&&(D=this.view.getState(G),B=this.view.getState(t[0]),null!=D&&null!=B&&(null!=M&&mxEvent.isShiftDown(M)||"umlLifeline"==D.style.shape&&"umlLifeline"==B.style.shape)&&(D=this.getCellGeometry(G),M=this.getCellGeometry(t[0]),null!=D&&null!=M))){z=D.clone();D=M.clone();D.x=z.x;D.y=z.y;z.x=M.x;z.y=M.y;this.model.beginUpdate();try{this.model.setGeometry(G,z),this.model.setGeometry(t[0],D)}finally{this.model.endUpdate()}z=
!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,B,D,G,M,X){if(this.swapShapes(t,z,B,D,G,M,X))return t;X=null!=X?X:{};if(this.isTable(G)){for(var ia=[],da=0;da<t.length;da++)this.isTable(t[da])?ia=ia.concat(this.model.getChildCells(t[da],!0).reverse()):ia.push(t[da]);t=ia}this.model.beginUpdate();try{ia=[];for(da=0;da<t.length;da++)if(null!=G&&this.isTableRow(t[da])){var ja=this.model.getParent(t[da]),ta=this.getCellGeometry(t[da]);this.isTable(ja)&&ia.push(ja);
-if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=ta.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=ta.height,this.model.setGeometry(G,Ba));var Ha=this.model.getChildCells(G,!0);if(0<Ha.length){t[da]=D?this.cloneCell(t[da]):t[da];var Na=this.model.getChildCells(t[da],!0),Ma=this.model.getChildCells(Ha[0],!0),Ia=Ma.length-Na.length;if(0<Ia)for(var Ea=
-0;Ea<Ia;Ea++){var Da=this.cloneCell(Na[Na.length-1]);null!=Da&&(Da.value="",this.model.add(t[da],Da))}else if(0>Ia)for(Ea=0;Ea>Ia;Ea--)this.model.remove(Na[Na.length+Ea-1]);Na=this.model.getChildCells(t[da],!0);for(Ea=0;Ea<Ma.length;Ea++){var La=this.getCellGeometry(Ma[Ea]),Oa=this.getCellGeometry(Na[Ea]);null!=La&&null!=Oa&&(Oa=Oa.clone(),Oa.width=La.width,this.model.setGeometry(Na[Ea],Oa))}}}}var Ra=r.apply(this,arguments);for(da=0;da<ia.length;da++)!D&&this.model.contains(ia[da])&&0==this.model.getChildCount(ia[da])&&
-this.model.remove(ia[da]);D&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Ra)}finally{this.model.endUpdate()}return Ra};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var B=[];this.model.beginUpdate();try{for(var D=0;D<t.length;D++)if(this.isTableCell(t[D])){var G=this.model.getParent(t[D]),M=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(M)?0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M)&&B.push(M):this.labelChanged(t[D],
+if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=ta.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=ta.height,this.model.setGeometry(G,Ba));var Da=this.model.getChildCells(G,!0);if(0<Da.length){t[da]=D?this.cloneCell(t[da]):t[da];var Ma=this.model.getChildCells(t[da],!0),La=this.model.getChildCells(Da[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Ea=
+0;Ea<Ia;Ea++){var Fa=this.cloneCell(Ma[Ma.length-1]);null!=Fa&&(Fa.value="",this.model.add(t[da],Fa))}else if(0>Ia)for(Ea=0;Ea>Ia;Ea--)this.model.remove(Ma[Ma.length+Ea-1]);Ma=this.model.getChildCells(t[da],!0);for(Ea=0;Ea<La.length;Ea++){var Oa=this.getCellGeometry(La[Ea]),Pa=this.getCellGeometry(Ma[Ea]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Ea],Pa))}}}}var Na=r.apply(this,arguments);for(da=0;da<ia.length;da++)!D&&this.model.contains(ia[da])&&0==this.model.getChildCount(ia[da])&&
+this.model.remove(ia[da]);D&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var B=[];this.model.beginUpdate();try{for(var D=0;D<t.length;D++)if(this.isTableCell(t[D])){var G=this.model.getParent(t[D]),M=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(M)?0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M)&&B.push(M):this.labelChanged(t[D],
"")}else{if(this.isTableRow(t[D])&&(M=this.model.getParent(t[D]),0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M))){for(var X=this.model.getChildCells(M,!0),ia=0,da=0;da<X.length;da++)0<=mxUtils.indexOf(t,X[da])&&ia++;ia==X.length&&B.push(M)}B.push(t[D])}B=x.apply(this,[B,z])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(t,z,B){B=null!=B?B:new Graph;for(var D=0;D<z.length;D++)null!=z[D]&&B.updateCustomLinksForCell(t,z[D],B)};Graph.prototype.updateCustomLinksForCell=
function(t,z){this.doUpdateCustomLinksForCell(t,z);for(var B=this.model.getChildCount(z),D=0;D<B;D++)this.updateCustomLinksForCell(t,this.model.getChildAt(z,D))};Graph.prototype.doUpdateCustomLinksForCell=function(t,z){};Graph.prototype.getAllConnectionConstraints=function(t,z){if(null!=t){z=mxUtils.getValue(t.style,"points",null);if(null!=z){t=[];try{var B=JSON.parse(z);for(z=0;z<B.length;z++){var D=B[z];t.push(new mxConnectionConstraint(new mxPoint(D[0],D[1]),2<D.length?"0"!=D[2]:!0,null,3<D.length?
D[3]:0,4<D.length?D[4]:0))}}catch(M){}return t}if(null!=t.shape&&null!=t.shape.bounds){D=t.shape.direction;z=t.shape.bounds;var G=t.shape.scale;B=z.width/G;z=z.height/G;if(D==mxConstants.DIRECTION_NORTH||D==mxConstants.DIRECTION_SOUTH)D=B,B=z,z=D;z=t.shape.getConstraints(t.style,B,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=
@@ -3073,9 +3075,9 @@ t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBO
function(t,z,B){for(var D=this.getCurrentCellStyle(t),G=!0,M=!0,X=0;X<z.length&&M;X++)G=G&&this.isTable(z[X]),M=M&&this.isTableRow(z[X]);return(1==z.length&&null!=B&&mxEvent.isShiftDown(B)&&!mxEvent.isControlDown(B)&&!mxEvent.isAltDown(B)||("1"!=mxUtils.getValue(D,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(D,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||M||G))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell=
function(){var t=mxGraph.prototype.createGroupCell.apply(this,arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(z&&null!=t&&null!=this.layoutManager){var B=this.model.getParent(t);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(z=!1))}return z};Graph.prototype.getPreferredSizeForCell=function(t){var z=mxGraph.prototype.getPreferredSizeForCell.apply(this,
arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var B=this.getModel(),D=[];B.beginUpdate();try{for(var G=0;G<t.length;G++){var M=t[G];if(B.isEdge(M)){var X=B.getTerminal(M,!0),ia=B.getTerminal(M,!1);B.setTerminal(M,ia,!0);B.setTerminal(M,X,!1);var da=B.getGeometry(M);if(null!=da){da=da.clone();null!=da.points&&da.points.reverse();var ja=da.getTerminalPoint(!0),ta=da.getTerminalPoint(!1);
-da.setTerminalPoint(ja,!1);da.setTerminalPoint(ta,!0);B.setGeometry(M,da);var Ba=this.view.getState(M),Ha=this.view.getState(X),Na=this.view.getState(ia);if(null!=Ba){var Ma=null!=Ha?this.getConnectionConstraint(Ba,Ha,!0):null,Ia=null!=Na?this.getConnectionConstraint(Ba,Na,!1):null;this.setConnectionConstraint(M,X,!0,Ia);this.setConnectionConstraint(M,ia,!1,Ma);var Ea=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[M])}D.push(M)}}else if(B.isVertex(M)&&(da=this.getCellGeometry(M),null!=da)){if(!(this.isTable(M)||this.isTableRow(M)||this.isTableCell(M)||this.isSwimlane(M))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Da=da.width;da.width=da.height;da.height=Da;B.setGeometry(M,da)}var La=this.view.getState(M);if(null!=La){var Oa=[mxConstants.DIRECTION_EAST,
-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(La.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Oa[mxUtils.mod(mxUtils.indexOf(Oa,Ra)+(z?-1:1),Oa.length)],[M])}D.push(M)}}}finally{B.endUpdate()}return D};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
+da.setTerminalPoint(ja,!1);da.setTerminalPoint(ta,!0);B.setGeometry(M,da);var Ba=this.view.getState(M),Da=this.view.getState(X),Ma=this.view.getState(ia);if(null!=Ba){var La=null!=Da?this.getConnectionConstraint(Ba,Da,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Ba,Ma,!1):null;this.setConnectionConstraint(M,X,!0,Ia);this.setConnectionConstraint(M,ia,!1,La);var Ea=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[M])}D.push(M)}}else if(B.isVertex(M)&&(da=this.getCellGeometry(M),null!=da)){if(!(this.isTable(M)||this.isTableRow(M)||this.isTableCell(M)||this.isSwimlane(M))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Fa=da.width;da.width=da.height;da.height=Fa;B.setGeometry(M,da)}var Oa=this.view.getState(M);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[M])}D.push(M)}}}finally{B.endUpdate()}return D};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
t=t.nextSibling}return!1};var A=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var z=t.cell;this.isTableCell(z)&&(z=this.model.getParent(z));this.isTableRow(z)&&(z=this.model.getParent(z));var B=this.view.getState(z);null!=B&&null!=B.shape&&(this.view.invalidate(z),B.shape.bounds=null)}A.apply(this,arguments);
t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var z=0;z<t.length;z++){var B=this.view.getState(t[z]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(t[z]):this.isReplacePlaceholders(t[z])&&this.view.invalidate(t[z],!1,!1)}};
Graph.prototype.replaceElement=function(t,z){z=t.ownerDocument.createElement(null!=z?z:"span");for(var B=Array.prototype.slice.call(t.attributes);attr=B.pop();)z.setAttribute(attr.nodeName,attr.nodeValue);z.innerHTML=t.innerHTML;t.parentNode.replaceChild(z,t)};Graph.prototype.processElements=function(t,z){if(null!=t){t=t.getElementsByTagName("*");for(var B=0;B<t.length;B++)z(t[B])}};Graph.prototype.updateLabelElements=function(t,z,B){t=null!=t?t:this.getSelectionCells();for(var D=document.createElement("div"),
@@ -3093,43 +3095,42 @@ z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.rou
D.geometry.relative=!0;D.connectable=!1;var G=this.view.getRelativePoint(B,t,z);D.geometry.x=Math.round(1E4*G.x)/1E4;D.geometry.y=Math.round(G.y);D.geometry.offset=new mxPoint(0,0);G=this.view.getPoint(B,D.geometry);var M=this.view.scale;D.geometry.offset=new mxPoint(Math.round((t-G.x)/M),Math.round((z-G.y)/M))}else G=this.view.translate,D.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",D.geometry.width=40,D.geometry.height=20,D.geometry.x=Math.round(t/this.view.scale)-
G.x-(null!=B?B.origin.x:0),D.geometry.y=Math.round(z/this.view.scale)-G.y-(null!=B?B.origin.y:0),D.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([D],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[D])),this.autoSizeCell(D)}finally{this.getModel().endUpdate()}return D};Graph.prototype.addClickHandler=function(t,z,B){var D=mxUtils.bind(this,function(){var da=this.container.getElementsByTagName("a");if(null!=da)for(var ja=0;ja<da.length;ja++){var ta=
this.getAbsoluteUrl(da[ja].getAttribute("href"));null!=ta&&(da[ja].setAttribute("rel",this.linkRelation),da[ja].setAttribute("href",ta),null!=z&&mxEvent.addGestureListeners(da[ja],null,null,z))}});this.model.addListener(mxEvent.CHANGE,D);D();var G=this.container.style.cursor,M=this.getTolerance(),X=this,ia={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(X,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(da){var ja=
-da.sourceState;if(null==ja||null==X.getLinkForCell(ja.cell))da=X.getCellAt(da.getGraphX(),da.getGraphY(),null,null,null,function(ta,Ba,Ha){return null==X.getLinkForCell(ta.cell)}),ja=null==ja||X.model.isAncestor(da,ja.cell)?X.view.getState(da):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=X.container.scrollLeft;
+da.sourceState;if(null==ja||null==X.getLinkForCell(ja.cell))da=X.getCellAt(da.getGraphX(),da.getGraphY(),null,null,null,function(ta,Ba,Da){return null==X.getLinkForCell(ta.cell)}),ja=null==ja||X.model.isAncestor(da,ja.cell)?X.view.getState(da):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=X.container.scrollLeft;
this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&(X.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(da,ja){if(X.isMouseDown)null!=this.currentLink&&(da=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(da>M||ja>M)&&this.clear());else{for(da=ja.getSource();null!=da&&"a"!=da.nodeName.toLowerCase();)da=da.parentNode;null!=da?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&
X.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=this.currentState&&null!=ja.sourceState||!X.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(da,ja){var ta=ja.getSource();for(da=ja.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-X.container.scrollLeft)<M&&Math.abs(this.scrollTop-X.container.scrollTop)<M&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&&
((mxEvent.isLeftMouseButton(da)||mxEvent.isMiddleMouseButton(da))&&!mxEvent.isPopupTrigger(da)||mxEvent.isTouchEvent(da))&&(null!=this.currentLink?(ta=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==z||z(da,this.currentLink),mxEvent.isConsumed(da)||(da=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(da)?"_blank":ta?X.linkTarget:"_top",X.openLink(this.currentLink,da),ja.consume())):null!=B&&!ja.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)<
M&&Math.abs(this.scrollTop-X.container.scrollTop)<M&&Math.abs(this.startX-ja.getGraphX())<M&&Math.abs(this.startY-ja.getGraphY())<M&&B(ja.getEvent()));this.clear()},activate:function(da){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(da.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(da.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(da))},clear:function(){null!=X.container&&(X.container.style.cursor=G);this.currentLink=this.currentState=
this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(da){};X.addMouseListener(ia);mxEvent.addListener(document,"mouseleave",function(da){ia.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var B=0;B<t.length;B++)this.isTableCell(t[B])&&(t[B]=this.model.getParent(t[B]));t=this.model.getTopmostCells(t);var D=this.getModel(),G=this.gridSize,M=[];D.beginUpdate();
-try{var X={},ia=this.createCellLookup(t),da=this.cloneCells(t,!1,X,!0);for(B=0;B<t.length;B++){var ja=D.getParent(t[B]);if(null!=ja){var ta=this.moveCells([da[B]],G,G,!1)[0];M.push(ta);if(z)D.add(ja,da[B]);else{var Ba=ja.getIndex(t[B]);D.add(ja,da[B],Ba+1)}if(this.isTable(ja)){var Ha=this.getCellGeometry(da[B]),Na=this.getCellGeometry(ja);null!=Ha&&null!=Na&&(Na=Na.clone(),Na.height+=Ha.height,D.setGeometry(ja,Na))}}else M.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,ia),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+try{var X={},ia=this.createCellLookup(t),da=this.cloneCells(t,!1,X,!0);for(B=0;B<t.length;B++){var ja=D.getParent(t[B]);if(null!=ja){var ta=this.moveCells([da[B]],G,G,!1)[0];M.push(ta);if(z)D.add(ja,da[B]);else{var Ba=ja.getIndex(t[B]);D.add(ja,da[B],Ba+1)}if(this.isTable(ja)){var Da=this.getCellGeometry(da[B]),Ma=this.getCellGeometry(ja);null!=Da&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Da.height,D.setGeometry(ja,Ma))}}else M.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,ia),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
"cells",da))}finally{D.endUpdate()}return M};Graph.prototype.insertImage=function(t,z,B){if(null!=t&&null!=this.cellEditor.textarea){for(var D=this.cellEditor.textarea.getElementsByTagName("img"),G=[],M=0;M<D.length;M++)G.push(D[M]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==G.length+1)for(M=t.length-1;0<=M;M--)if(0==M||t[M]!=G[M-1]){t[M].setAttribute("width",z);t[M].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(t){if(null!=
this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var z=this.cellEditor.textarea.getElementsByTagName("a"),B=[],D=0;D<z.length;D++)B.push(z[D]);document.execCommand("createlink",!1,mxUtils.trim(t));z=this.cellEditor.textarea.getElementsByTagName("a");if(z.length==B.length+1)for(D=z.length-1;0<=D;D--)if(z[D]!=B[D-1]){for(z=z[D].getElementsByTagName("a");0<z.length;){for(B=z[0].parentNode;null!=z[0].firstChild;)B.insertBefore(z[0].firstChild,z[0]);
B.removeChild(z[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var z=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(z||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,z){null==z&&(z=this.getSelectionCells());if(null!=z&&1<z.length){for(var B=[],D=null,
-G=null,M=0;M<z.length;M++)if(this.getModel().isVertex(z[M])){var X=this.view.getState(z[M]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();D=null!=D?Math.max(D,ia):ia;G=null!=G?Math.min(G,ia):ia;B.push(X)}}if(2<B.length){B.sort(function(Ba,Ha){return t?Ba.x-Ha.x:Ba.y-Ha.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);D=D/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var da=(D-G)/(B.length-1);D=G;for(M=1;M<B.length-1;M++){var ja=this.view.getState(this.model.getParent(B[M].cell)),
+G=null,M=0;M<z.length;M++)if(this.getModel().isVertex(z[M])){var X=this.view.getState(z[M]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();D=null!=D?Math.max(D,ia):ia;G=null!=G?Math.min(G,ia):ia;B.push(X)}}if(2<B.length){B.sort(function(Ba,Da){return t?Ba.x-Da.x:Ba.y-Da.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);D=D/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var da=(D-G)/(B.length-1);D=G;for(M=1;M<B.length-1;M++){var ja=this.view.getState(this.model.getParent(B[M].cell)),
ta=this.getCellGeometry(B[M].cell);D+=da;null!=ta&&null!=ja&&(ta=ta.clone(),t?ta.x=Math.round(D-ta.width/2)-ja.origin.x:ta.y=Math.round(D-ta.height/2)-ja.origin.y,this.getModel().setGeometry(B[M].cell,ta))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,B){return this.getLinkForCell(z.cell)});
-return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,B,D,G,M,X,ia,da,ja,ta,Ba,Ha,Na){var Ma=null;if(null!=Na)for(Ma=new mxDictionary,ta=0;ta<Na.length;ta++)Ma.put(Na[ta],!0);if(Na=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;B=null!=B?
-B:0;G=null!=G?G:!0;M=null!=M?M:!0;X=null!=X?X:!0;ja=null!=ja?ja:!1;var Ia="page"==Ha?this.view.getBackgroundPageBounds():M&&null==Ma||D||"diagram"==Ha?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==Ha&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));
-if(null==Ia)throw Error(mxResources.get("drawingEmpty"));var Da=mxUtils.createXmlDocument(),La=null!=Da.createElementNS?Da.createElementNS(mxConstants.NS_SVG,"svg"):Da.createElement("svg");null!=t&&(null!=La.style?La.style.backgroundColor=t:La.setAttribute("style","background-color:"+t));null==Da.createElementNS?(La.setAttribute("xmlns",mxConstants.NS_SVG),La.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):La.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);t=z/
-Ea;var Oa=Math.max(1,Math.ceil(Ia.width*t)+2*B)+(ja&&0==B?5:0),Ra=Math.max(1,Math.ceil(Ia.height*t)+2*B)+(ja&&0==B?5:0);La.setAttribute("version","1.1");La.setAttribute("width",Oa+"px");La.setAttribute("height",Ra+"px");La.setAttribute("viewBox",(G?"-0.5 -0.5":"0 0")+" "+Oa+" "+Ra);Da.appendChild(La);var Sa=null!=Da.createElementNS?Da.createElementNS(mxConstants.NS_SVG,"g"):Da.createElement("g");La.appendChild(Sa);var Va=this.createSvgCanvas(Sa);Va.foOffset=G?-.5:0;Va.textOffset=G?-.5:0;Va.imageOffset=
-G?-.5:0;Va.translate(Math.floor(B/z-Ia.x/Ea),Math.floor(B/z-Ia.y/Ea));var kb=document.createElement("div"),sb=Va.getAlternateText;Va.getAlternateText=function($a,lb,ab,fb,hb,Wa,gb,Qa,ob,xb,pb,qb,vb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(kb.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(kb.childNodes));for(var rb=Math.ceil(2*fb/this.state.fontSize),mb=[],b=0,h=0;(0==rb||b<rb)&&h<Wa.length;){var q=Wa.charCodeAt(h);if(10==q||13==q){if(0<b)break}else mb.push(Wa.charAt(h)),
-255>q&&b++;h++}mb.length<Wa.length&&1<Wa.length-mb.length&&(Wa=mxUtils.trim(mb.join(""))+"...");return Wa}catch(l){return sb.apply(this,arguments)}else return sb.apply(this,arguments)};var cb=this.backgroundImage;if(null!=cb){z=Ea/z;var nb=this.view.translate,tb=new mxRectangle((cb.x+nb.x)*z,(cb.y+nb.y)*z,cb.width*z,cb.height*z);mxUtils.intersects(Ia,tb)&&Va.image(cb.x+nb.x,cb.y+nb.y,cb.width,cb.height,cb.src,!0)}Va.scale(t);Va.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var ub=ia.drawCellState,
-jb=ia.getLinkForCellState;ia.getLinkForCellState=function($a,lb){var ab=jb.apply(this,arguments);return null==ab||$a.view.graph.isCustomLink(ab)?null:ab};ia.getLinkTargetForCellState=function($a,lb){return $a.view.graph.getLinkTargetForCell($a.cell)};ia.drawCellState=function($a,lb){for(var ab=$a.view.graph,fb=null!=Ma?Ma.get($a.cell):ab.isCellSelected($a.cell),hb=ab.model.getParent($a.cell);!(M&&null==Ma||fb)&&null!=hb;)fb=null!=Ma?Ma.get(hb):ab.isCellSelected(hb),hb=ab.model.getParent(hb);(M&&null==
-Ma||fb)&&ub.apply(this,arguments)};ia.drawState(this.getView().getState(this.model.root),Va);this.updateSvgLinks(La,da,!0);this.addForeignObjectWarning(Va,La);return La}finally{Na&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var B=t.createElement("switch"),D=t.createElement("g");D.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
-var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x",
-"50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);B.appendChild(D);G.appendChild(t);B.appendChild(G);z.appendChild(B)}};Graph.prototype.updateSvgLinks=function(t,z,B){t=t.getElementsByTagName("a");for(var D=0;D<t.length;D++)if(null==t[D].getAttribute("target")){var G=t[D].getAttribute("href");null==G&&(G=t[D].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[D].setAttribute("target",z):B&&this.isCustomLink(G)&&t[D].setAttribute("href","javascript:void(0);"))}};
-Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=
-t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,B){for(;null!=t&&t.nodeName!=z;){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,B){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==B)return null;
-t=t.parentNode}return t};Graph.prototype.selectNode=function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var B=document.createRange();B.selectNode(t);z.removeAllRanges();z.addRange(B)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),B=z.createRange(),B.setEndPoint("StartToStart",t),B.select())};Graph.prototype.flipEdgePoints=function(t,z,B){var D=this.getCellGeometry(t);if(null!=D){D=D.clone();if(null!=D.points)for(var G=
-0;G<D.points.length;G++)z?D.points[G].x=B+(B-D.points[G].x):D.points[G].y=B+(B-D.points[G].y);G=function(M){null!=M&&(z?M.x=B+(B-M.x):M.y=B+(B-M.y))};G(D.getTerminalPoint(!0));G(D.getTerminalPoint(!1));this.model.setGeometry(t,D)}};Graph.prototype.flipChildren=function(t,z,B){this.model.beginUpdate();try{for(var D=this.model.getChildCount(t),G=0;G<D;G++){var M=this.model.getChildAt(t,G);if(this.model.isEdge(M))this.flipEdgePoints(M,z,B);else{var X=this.getCellGeometry(M);null!=X&&(X=X.clone(),z?X.x=
-B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(M,X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var B=[],D=0;D<t.length;D++)if(this.model.isEdge(t[D])){var G=this.view.getState(t[D]);null!=G&&this.flipEdgePoints(t[D],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var M=this.getCellGeometry(t[D]);null!=
-M&&this.flipChildren(t[D],z,z?M.getCenterX()-M.x:M.getCenterY()-M.y);B.push(t[D])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var B=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<t.length;D++){var G=this.model.getParent(t[D]);if(this.isTable(G)){var M=this.getCellGeometry(t[D]),X=this.getCellGeometry(G);null!=M&&null!=X&&(X=X.clone(),X.height-=M.height,this.model.setGeometry(G,
-X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(B=[],D=0;D<ia.length;D++)this.model.contains(ia[D])&&(this.model.isVertex(ia[D])||this.model.isEdge(ia[D]))&&B.push(ia[D])}return B};Graph.prototype.insertTableColumn=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=0;if(this.isTableCell(t)){var M=B.getParent(t);D=B.getParent(M);G=mxUtils.indexOf(B.getChildCells(M,!0),t)}else this.isTableRow(t)?
-D=B.getParent(t):t=B.getChildCells(D,!0)[0],z||(G=B.getChildCells(t,!0).length-1);var X=B.getChildCells(D,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var da=B.getChildCells(X[t],!0)[G],ja=B.cloneCell(da,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ia=ta.width;var Ba=this.getCellGeometry(X[t]);
-null!=Ba&&(ta.height=Ba.height)}B.add(X[t],ja,G+(z?0:1))}var Ha=this.getCellGeometry(D);null!=Ha&&(Ha=Ha.clone(),Ha.width+=ia,B.setGeometry(D,Ha))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var D=z.getChildCells(B,!0);0==D.length?z.remove(B):(B==t&&(t=D[D.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var B=this.getModel();
-B.beginUpdate();try{var D=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){D=t;var G=B.getChildCells(D,!0);t=G[z?0:G.length-1]}else D=B.getParent(t);var M=D.getIndex(t);t=B.cloneCell(t,!1);t.value=null;B.add(D,t,M+(z?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=t;if(this.isTableCell(t))G=B.getParent(t),D=B.getParent(G);else if(this.isTableRow(t))D=B.getParent(t);else{var M=B.getChildCells(D,!0);G=M[z?
-0:M.length-1]}var X=B.getChildCells(G,!0),ia=D.getIndex(G);G=B.cloneCell(G,!1);G.value=null;var da=this.getCellGeometry(G);if(null!=da){for(M=0;M<X.length;M++){t=B.cloneCell(X[M],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=da.height);G.insert(t)}B.add(D,G,ia+(z?0:1));var ta=
-this.getCellGeometry(D);null!=ta&&(ta=ta.clone(),ta.height+=da.height,B.setGeometry(D,ta))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(D=z.getParent(t));this.isTableRow(D)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(0==G.length)z.remove(B);else{this.isTableRow(D)||(D=G[0]);var M=z.getChildCells(D,!0);if(1>=M.length)z.remove(B);else{var X=M.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(M,
-t));for(D=t=0;D<G.length;D++){var ia=z.getChildCells(G[D],!0)[X];z.remove(ia);var da=this.getCellGeometry(ia);null!=da&&(t=Math.max(t,da.width))}var ja=this.getCellGeometry(B);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(B,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(t=D=z.getParent(t));this.isTableRow(t)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(1>=G.length)z.remove(B);else{this.isTableRow(D)||
-(D=G[G.length-1]);z.remove(D);t=0;var M=this.getCellGeometry(D);null!=M&&(t=M.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(B,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var B=t.tBodies[0],D=B.rows[0].cells,G=t=0;G<D.length;G++){var M=D[G].getAttribute("colspan");t+=null!=M?parseInt(M):1}z=B.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};
-Graph.prototype.insertColumn=function(t,z){var B=t.tHead;if(null!=B)for(var D=0;D<B.rows.length;D++){var G=document.createElement("th");B.rows[D].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(B=0;B<t.rows.length;B++)D=t.rows[B].insertCell(z),mxUtils.br(D);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var B=0;B<t.length;B++)t[B].cells.length>z&&t[B].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
+return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,B,D,G,M,X,ia,da,ja,ta,Ba,Da,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ta=0;ta<Ma.length;ta++)La.put(Ma[ta],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;B=null!=B?
+B:0;G=null!=G?G:!0;M=null!=M?M:!0;X=null!=X?X:!0;ja=null!=ja?ja:!1;var Ia="page"==Da?this.view.getBackgroundPageBounds():M&&null==La||D||"diagram"==Da?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==Da&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));
+if(null==Ia)throw Error(mxResources.get("drawingEmpty"));D=z/Ea;Da=G?-.5:0;var Fa=Graph.createSvgNode(Da,Da,Math.max(1,Math.ceil(Ia.width*D)+2*B)+(ja&&0==B?5:0),Math.max(1,Math.ceil(Ia.height*D)+2*B)+(ja&&0==B?5:0),t),Oa=Fa.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Fa.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=G?-.5:0;Na.textOffset=G?-.5:0;Na.imageOffset=G?-.5:0;Na.translate(Math.floor(B/z-Ia.x/Ea),Math.floor(B/z-Ia.y/
+Ea));var Sa=document.createElement("div"),eb=Na.getAlternateText;Na.getAlternateText=function(ab,mb,Xa,ib,gb,Wa,qb,tb,nb,fb,Ra,rb,xb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(Sa.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(Sa.childNodes));for(var kb=Math.ceil(2*ib/this.state.fontSize),hb=[],ob=0,lb=0;(0==kb||ob<kb)&&lb<Wa.length;){var sb=Wa.charCodeAt(lb);if(10==sb||13==sb){if(0<ob)break}else hb.push(Wa.charAt(lb)),255>sb&&ob++;lb++}hb.length<Wa.length&&1<Wa.length-
+hb.length&&(Wa=mxUtils.trim(hb.join(""))+"...");return Wa}catch(b){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var Za=this.backgroundImage;if(null!=Za){t=Ea/z;var pb=this.view.translate;Da=new mxRectangle((Za.x+pb.x)*t,(Za.y+pb.y)*t,Za.width*t,Za.height*t);mxUtils.intersects(Ia,Da)&&Na.image(Za.x+pb.x,Za.y+pb.y,Za.width,Za.height,Za.src,!0)}Na.scale(D);Na.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var ub=ia.drawCellState,vb=ia.getLinkForCellState;ia.getLinkForCellState=
+function(ab,mb){var Xa=vb.apply(this,arguments);return null==Xa||ab.view.graph.isCustomLink(Xa)?null:Xa};ia.getLinkTargetForCellState=function(ab,mb){return ab.view.graph.getLinkTargetForCell(ab.cell)};ia.drawCellState=function(ab,mb){for(var Xa=ab.view.graph,ib=null!=La?La.get(ab.cell):Xa.isCellSelected(ab.cell),gb=Xa.model.getParent(ab.cell);!(M&&null==La||ib)&&null!=gb;)ib=null!=La?La.get(gb):Xa.isCellSelected(gb),gb=Xa.model.getParent(gb);(M&&null==La||ib)&&ub.apply(this,arguments)};ia.drawState(this.getView().getState(this.model.root),
+Na);this.updateSvgLinks(Fa,da,!0);this.addForeignObjectWarning(Na,Fa);return Fa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var B=t.createElement("switch"),D=t.createElement("g");D.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");
+null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);
+B.appendChild(D);G.appendChild(t);B.appendChild(G);z.appendChild(B)}};Graph.prototype.updateSvgLinks=function(t,z,B){t=t.getElementsByTagName("a");for(var D=0;D<t.length;D++)if(null==t[D].getAttribute("target")){var G=t[D].getAttribute("href");null==G&&(G=t[D].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[D].setAttribute("target",z):B&&this.isCustomLink(G)&&t[D].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);
+t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;
+null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,B){for(;null!=t&&t.nodeName!=z;){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,B){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.selectNode=
+function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var B=document.createRange();B.selectNode(t);z.removeAllRanges();z.addRange(B)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),B=z.createRange(),B.setEndPoint("StartToStart",t),B.select())};Graph.prototype.flipEdgePoints=function(t,z,B){var D=this.getCellGeometry(t);if(null!=D){D=D.clone();if(null!=D.points)for(var G=0;G<D.points.length;G++)z?D.points[G].x=B+(B-D.points[G].x):
+D.points[G].y=B+(B-D.points[G].y);G=function(M){null!=M&&(z?M.x=B+(B-M.x):M.y=B+(B-M.y))};G(D.getTerminalPoint(!0));G(D.getTerminalPoint(!1));this.model.setGeometry(t,D)}};Graph.prototype.flipChildren=function(t,z,B){this.model.beginUpdate();try{for(var D=this.model.getChildCount(t),G=0;G<D;G++){var M=this.model.getChildAt(t,G);if(this.model.isEdge(M))this.flipEdgePoints(M,z,B);else{var X=this.getCellGeometry(M);null!=X&&(X=X.clone(),z?X.x=B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(M,
+X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var B=[],D=0;D<t.length;D++)if(this.model.isEdge(t[D])){var G=this.view.getState(t[D]);null!=G&&this.flipEdgePoints(t[D],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var M=this.getCellGeometry(t[D]);null!=M&&this.flipChildren(t[D],z,z?M.getCenterX()-M.x:M.getCenterY()-M.y);
+B.push(t[D])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var B=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<t.length;D++){var G=this.model.getParent(t[D]);if(this.isTable(G)){var M=this.getCellGeometry(t[D]),X=this.getCellGeometry(G);null!=M&&null!=X&&(X=X.clone(),X.height-=M.height,this.model.setGeometry(G,X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):
+null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(B=[],D=0;D<ia.length;D++)this.model.contains(ia[D])&&(this.model.isVertex(ia[D])||this.model.isEdge(ia[D]))&&B.push(ia[D])}return B};Graph.prototype.insertTableColumn=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=0;if(this.isTableCell(t)){var M=B.getParent(t);D=B.getParent(M);G=mxUtils.indexOf(B.getChildCells(M,!0),t)}else this.isTableRow(t)?D=B.getParent(t):t=B.getChildCells(D,!0)[0],z||(G=B.getChildCells(t,
+!0).length-1);var X=B.getChildCells(D,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var da=B.getChildCells(X[t],!0)[G],ja=B.cloneCell(da,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ia=ta.width;var Ba=this.getCellGeometry(X[t]);null!=Ba&&(ta.height=Ba.height)}B.add(X[t],
+ja,G+(z?0:1))}var Da=this.getCellGeometry(D);null!=Da&&(Da=Da.clone(),Da.width+=ia,B.setGeometry(D,Da))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var D=z.getChildCells(B,!0);0==D.length?z.remove(B):(B==t&&(t=D[D.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=null;
+if("stackLayout"==this.getCurrentCellStyle(t).childLayout){D=t;var G=B.getChildCells(D,!0);t=G[z?0:G.length-1]}else D=B.getParent(t);var M=D.getIndex(t);t=B.cloneCell(t,!1);t.value=null;B.add(D,t,M+(z?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=t;if(this.isTableCell(t))G=B.getParent(t),D=B.getParent(G);else if(this.isTableRow(t))D=B.getParent(t);else{var M=B.getChildCells(D,!0);G=M[z?0:M.length-1]}var X=B.getChildCells(G,
+!0),ia=D.getIndex(G);G=B.cloneCell(G,!1);G.value=null;var da=this.getCellGeometry(G);if(null!=da){for(M=0;M<X.length;M++){t=B.cloneCell(X[M],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=da.height);G.insert(t)}B.add(D,G,ia+(z?0:1));var ta=this.getCellGeometry(D);null!=ta&&(ta=
+ta.clone(),ta.height+=da.height,B.setGeometry(D,ta))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(D=z.getParent(t));this.isTableRow(D)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(0==G.length)z.remove(B);else{this.isTableRow(D)||(D=G[0]);var M=z.getChildCells(D,!0);if(1>=M.length)z.remove(B);else{var X=M.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(M,t));for(D=t=0;D<G.length;D++){var ia=
+z.getChildCells(G[D],!0)[X];z.remove(ia);var da=this.getCellGeometry(ia);null!=da&&(t=Math.max(t,da.width))}var ja=this.getCellGeometry(B);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(B,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(t=D=z.getParent(t));this.isTableRow(t)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(1>=G.length)z.remove(B);else{this.isTableRow(D)||(D=G[G.length-1]);z.remove(D);
+t=0;var M=this.getCellGeometry(D);null!=M&&(t=M.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(B,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var B=t.tBodies[0],D=B.rows[0].cells,G=t=0;G<D.length;G++){var M=D[G].getAttribute("colspan");t+=null!=M?parseInt(M):1}z=B.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=
+function(t,z){var B=t.tHead;if(null!=B)for(var D=0;D<B.rows.length;D++){var G=document.createElement("th");B.rows[D].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(B=0;B<t.rows.length;B++)D=t.rows[B].insertCell(z),mxUtils.br(D);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var B=0;B<t.length;B++)t[B].cells.length>z&&t[B].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var B=document.createElement("div");B.innerHTML=t;t=document.createDocumentFragment();for(var D;D=B.firstChild;)lastNode=t.appendChild(D);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function B(G,M){G.length>M&&(G=G.substring(0,Math.round(M/2))+"..."+G.substring(G.length-Math.round(M/4)));return G}t=null!=t?t:"javascript:void(0);";
if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var D=document.createElement("a");D.setAttribute("rel",this.linkRelation);D.setAttribute("href",this.getAbsoluteUrl(t));D.setAttribute("title",B(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&D.setAttribute("target",this.linkTarget);mxUtils.write(D,B(z,40));this.isCustomLink(t)&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(G){this.customLinkClicked(t);mxEvent.consume(G)}));return D};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(M,X){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(M){M=t.apply(this,arguments);if(mxEvent.isTouchEvent(M.getEvent())&&null==M.getState()){var X=this.getCellAt(M.graphX,M.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,M.graphX,M.graphY)||(M.state=this.view.getState(X),null!=M.state&&
@@ -3166,14 +3167,14 @@ z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationH
function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
this.bounds};var ba=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var L=null,H=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==L&&(L=mxCellRenderer.defaultShapes.tableLine);var t=H.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var z=function(Ma,Ia,Ea){for(var Da=[],La=0;La<Ma.length;La++){var Oa=Ma[La];Da.push(null==Oa?null:new mxPoint((da+Oa.x+Ia)*M,(ja+Oa.y+Ea)*M))}return Da},B=this,D=this.graph,G=D.model,M=D.view.scale,X=this.state,ia=this.selectionBorder,da=this.state.origin.x+D.view.translate.x,ja=this.state.origin.y+D.view.translate.y;null==t&&(t=[]);var ta=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<ta.length){var Ba=G.getChildCells(ta[0].cell,!0),Ha=D.getTableLines(this.state.cell,
-!1,!0),Na=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<ta.length;G++)mxUtils.bind(this,function(Ma){var Ia=ta[Ma],Ea=Ma<ta.length-1?ta[Ma+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea.cell):null;var Da=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Na[Ma]?new L(Na[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Ea);Ia.tableHandle=!0;var La=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,
-Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==La?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Na[Ma],0,La),this.shape.updateBoundsFromLine();else{var Ra=D.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+La*M;this.shape.bounds.x=X.x+(Ma==ta.length-1?0:Ra.x*M);this.shape.bounds.width=X.width-(Ma==ta.length-1?0:Ra.width+Ra.x+M)}this.shape.redraw()}};var Oa=!1;
-Ia.setPosition=function(Ra,Sa,Va){La=Math.max(Graph.minTableRowHeight-Ra.height,Sa.y-Ra.y-Ra.height);Oa=mxEvent.isShiftDown(Va.getEvent());null!=Da&&Oa&&(La=Math.min(La,Da.height-Graph.minTableRowHeight))};Ia.execute=function(Ra){if(0!=La)D.setTableRowHeight(this.state.cell,La,!Oa);else if(!B.blockDelayedSelection){var Sa=D.getCellAt(Ra.getGraphX(),Ra.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Sa,Ra)}La=0};Ia.reset=function(){La=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,
-function(Ma){var Ia=D.view.getState(Ba[Ma]),Ea=D.getCellGeometry(Ba[Ma]),Da=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ia&&(Ia=new mxCellState(D.view,Ba[Ma],D.getCellStyle(Ba[Ma])),Ia.x=X.x+Ea.x*M,Ia.y=X.y+Ea.y*M,Ia.width=Da.width*M,Ia.height=Da.height*M,Ia.updateCachedBounds());Ea=Ma<Ba.length-1?Ba[Ma+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea):null;var La=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Ha[Ma]?new L(Ha[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Ea);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Ha[Ma],Oa,0),this.shape.updateBoundsFromLine();else{var Sa=D.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(Da.width+Oa)*M;this.shape.bounds.y=X.y+(Ma==Ba.length-1?0:Sa.y*M);this.shape.bounds.height=X.height-(Ma==Ba.length-1?0:(Sa.height+Sa.y)*M)}this.shape.redraw()}};var Ra=!1;Ia.setPosition=function(Sa,Va,kb){Oa=Math.max(Graph.minTableColumnWidth-Da.width,Va.x-Sa.x-Da.width);Ra=mxEvent.isShiftDown(kb.getEvent());null==La||Ra||(Oa=Math.min(Oa,La.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Oa)D.setTableColumnWidth(this.state.cell,Oa,Ra);else if(!B.blockDelayedSelection){var Va=
-D.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Va,Sa)}Oa=0};Ia.positionChanged=function(){};Ia.reset=function(){Oa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){S.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
+if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Ea){for(var Fa=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Fa.push(null==Pa?null:new mxPoint((da+Pa.x+Ia)*M,(ja+Pa.y+Ea)*M))}return Fa},B=this,D=this.graph,G=D.model,M=D.view.scale,X=this.state,ia=this.selectionBorder,da=this.state.origin.x+D.view.translate.x,ja=this.state.origin.y+D.view.translate.y;null==t&&(t=[]);var ta=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<ta.length){var Ba=G.getChildCells(ta[0].cell,!0),Da=D.getTableLines(this.state.cell,
+!1,!0),Ma=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<ta.length;G++)mxUtils.bind(this,function(La){var Ia=ta[La],Ea=La<ta.length-1?ta[La+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea.cell):null;var Fa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Ma[La]?new L(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Ea);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,
+Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=D.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Oa*M;this.shape.bounds.x=X.x+(La==ta.length-1?0:Na.x*M);this.shape.bounds.width=X.width-(La==ta.length-1?0:Na.width+Na.x+M)}this.shape.redraw()}};var Pa=!1;
+Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Fa&&Pa&&(Oa=Math.min(Oa,Fa.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)D.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!B.blockDelayedSelection){var Sa=D.getCellAt(Na.getGraphX(),Na.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,
+function(La){var Ia=D.view.getState(Ba[La]),Ea=D.getCellGeometry(Ba[La]),Fa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ia&&(Ia=new mxCellState(D.view,Ba[La],D.getCellStyle(Ba[La])),Ia.x=X.x+Ea.x*M,Ia.y=X.y+Ea.y*M,Ia.width=Fa.width*M,Ia.height=Fa.height*M,Ia.updateCachedBounds());Ea=La<Ba.length-1?Ba[La+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Da[La]?new L(Da[La],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Ea);Ia.tableHandle=!0;var Pa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Da[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=D.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
+this.state.x+(Fa.width+Pa)*M;this.shape.bounds.y=X.y+(La==Ba.length-1?0:Sa.y*M);this.shape.bounds.height=X.height-(La==Ba.length-1?0:(Sa.height+Sa.y)*M)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,Za){Pa=Math.max(Graph.minTableColumnWidth-Fa.width,eb.x-Sa.x-Fa.width);Na=mxEvent.isShiftDown(Za.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)D.setTableColumnWidth(this.state.cell,Pa,Na);else if(!B.blockDelayedSelection){var eb=
+D.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){S.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
t?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.graph.model;if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}this.moveHandles=[];for(z=0;z<t.getChildCount(this.state.cell);z++)mxUtils.bind(this,function(B){if(null!=B&&t.isVertex(B.cell)){var D=mxUtils.createImage(Editor.rowMoveImage);D.style.position="absolute";D.style.cursor="pointer";D.style.width="7px";D.style.height=
"4px";D.style.padding="4px 2px 4px 2px";D.rowState=B;mxEvent.addGestureListeners(D,mxUtils.bind(this,function(G){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(G)&&this.graph.isCellSelected(B.cell)||this.graph.selectCellForEvent(B.cell,G);mxEvent.isPopupTrigger(G)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
mxEvent.isMouseEvent(G),this.graph.isMouseDown=!0);mxEvent.consume(G)}),null,mxUtils.bind(this,function(G){mxEvent.isPopupTrigger(G)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(G),mxEvent.getClientY(G),B.cell,G),mxEvent.consume(G))}));this.moveHandles.push(D);this.graph.container.appendChild(D)}})(this.graph.view.getState(t.getChildAt(this.state.cell,z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();
@@ -3204,28 +3205,28 @@ null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode
(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var W=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);W.apply(this,arguments)};var Z=(new Date).getTime(),oa=0,va=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,B,D){va.apply(this,arguments);B!=this.currentTerminalState?(Z=(new Date).getTime(),
oa=0):oa=(new Date).getTime()-Z;this.currentTerminalState=B};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<oa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(t,z,B){z=null!=t&&0==t;var D=this.state.getVisibleTerminalState(z);t=null!=t&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,D,z):null;B=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(z),t):null)?B?this.endFixedHandleImage:this.fixedHandleImage:null!=t&&null!=D?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage: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 Fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,B){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Fa.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),B=z.getParent(t[0]),D=this.graph.getCellGeometry(t[0]);if(z.isEdge(B)&&null!=D&&D.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
+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 Ga=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,B){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return Ga.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),B=z.getParent(t[0]),D=this.graph.getCellGeometry(t[0]);if(z.isEdge(B)&&null!=D&&D.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
mxGraphHandler.prototype.getGuideStates=function(){for(var t=za.apply(this,arguments),z=[],B=0;B<t.length;B++)"1"!=mxUtils.getValue(t[B].style,"part","0")&&z.push(t[B]);return z};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),B=z.getParent(t.cell),D=this.graph.getCellGeometry(t.cell);return z.isEdge(B)&&null!=D&&D.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox||
-t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Ga=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var B=this.graph.getModel(),D=B.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!B.isEdge(D)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ga.apply(this,arguments)};
+t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Ha=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var B=this.graph.getModel(),D=B.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!B.isEdge(D)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ha.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),z=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&z==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ta=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ta.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var eb=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){eb.apply(this,arguments);null!=this.rotationShape&&null!=
+var Ta=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ta.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var db=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){db.apply(this,arguments);null!=this.rotationShape&&null!=
this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Ua=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Ua.apply(this,arguments);var t=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var z=0;4>z;z++){var B=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);B.dialect=mxConstants.DIALECT_SVG;B.init(this.graph.view.getOverlayPane());this.cornerHandles.push(B)}}var D=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(G,M){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));D()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(G,M){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
z=this.graph.getLinkForCell(this.state.cell);B=this.graph.getLinksForState(this.state);this.updateLinkHint(z,B);if(null!=z||null!=B&&0<B.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var B=document.createElement("img");B.setAttribute("src",Editor.editImage);B.setAttribute("title",
mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(G){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(G)}));this.linkHint.appendChild(Graph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(G){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(G)})))}if(null!=z)for(B=0;B<z.length;B++){var D=document.createElement("div");D.style.marginTop=null!=t||0<B?"6px":"0px";D.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(D)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(G){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Xa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Xa.apply(this,
+null);mxEvent.consume(G)})))}if(null!=z)for(B=0;B<z.length;B++){var D=document.createElement("div");D.style.marginTop=null!=t||0<B?"6px":"0px";D.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(D)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(G){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Va=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Va.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var t=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(D,G){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),B=this.graph.getLinksForState(this.state);if(null!=z||null!=B&&0<B.length)this.updateLinkHint(z,B),this.redrawHandles()};var Ya=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ya.apply(this,arguments);this.constraintHandler.isEnabled=
mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var bb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width-5+"px",this.moveHandles[t].style.top=this.moveHandles[t].rowState.y+this.moveHandles[t].rowState.height/2-6+"px";if(null!=this.cornerHandles){t=this.getSelectionBorderInset();
var z=this.cornerHandles,B=z[0].bounds.height/2;z[0].bounds.x=this.state.x-z[0].bounds.width/2+t;z[0].bounds.y=this.state.y-B+t;z[0].redraw();z[1].bounds.x=z[0].bounds.x+this.state.width-2*t;z[1].bounds.y=z[0].bounds.y;z[1].redraw();z[2].bounds.x=z[0].bounds.x;z[2].bounds.y=this.state.y+this.state.height-2*t;z[2].redraw();z[3].bounds.x=z[1].bounds.x;z[3].bounds.y=z[2].bounds.y;z[3].redraw();for(t=0;t<this.cornerHandles.length;t++)this.cornerHandles[t].node.style.display=1==this.graph.getSelectionCount()?
"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");bb.apply(this);null!=this.state&&null!=this.linkHint&&(t=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),z=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),B=mxUtils.getBoundingBox(z,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",t),t=null!=B?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,z=null!=this.state.text?this.state.text.boundingBox:null,null==B&&(B=this.state),B=B.y+B.height,null!=z&&(B=Math.max(B,z.y+z.height)),this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(B+this.verticalOffset/2+Editor.hintOffset)+"px")};var db=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(){db.apply(this,arguments);if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&null!=this.moveHandles[t].parentNode&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}if(null!=this.cornerHandles){for(t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);
-this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ib=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(ib.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);
+"0",t),t=null!=B?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,z=null!=this.state.text?this.state.text.boundingBox:null,null==B&&(B=this.state),B=B.y+B.height,null!=z&&(B=Math.max(B,z.y+z.height)),this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(B+this.verticalOffset/2+Editor.hintOffset)+"px")};var cb=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(){cb.apply(this,arguments);if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&null!=this.moveHandles[t].parentNode&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}if(null!=this.cornerHandles){for(t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);
+this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var jb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(jb.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px"}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){$a.apply(this,arguments);
null!=this.linkHint&&(this.linkHint.style.visibility="")};var ca=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ca.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.inactiveTabBackgroundColor="#f1f3f4";Format.classicFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 0 L 0 8 L 8 16 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 8 12 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
@@ -3361,10 +3362,10 @@ null!=z.firstChild){ca[B].parentNode.insertBefore(z,ca[B]);for(t=z.firstChild;nu
null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){oa.style.display=ca==mxConstants.NONE?"none":"";va.style.display=oa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor);
n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);e.cellEditor.isContentEditing()||k.appendChild(va);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
"null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&k.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";k.appendChild(n);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="28px";n.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.width="70px";x.style.marginTop="0px";x.style.fontWeight="bold";mxUtils.write(x,mxResources.get("spacing"));
-n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Fa=this.addUnitInput(n,"pt",16,52,function(){Xa.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var sa=this.addUnitInput(n,"pt",158,52,function(){ib.apply(this,arguments)}),za=this.addUnitInput(n,"pt",87,52,function(){db.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){bb.apply(this,
-arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Ga=null,Ta=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ga&&(e.cellEditor.restoreSelection(Ga),Ga=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ga=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var sa=this.addUnitInput(n,"pt",158,52,function(){jb.apply(this,arguments)}),za=this.addUnitInput(n,"pt",87,52,function(){cb.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){bb.apply(this,
+arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Ha=null,Ta=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ha&&(e.cellEditor.restoreSelection(Ha),Ha=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
z.parentNode;null!=z&&z==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),z=e.cellEditor.textarea.firstChild);null!=z&&null!=e.cellEditor.textarea&&z!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);ca.value=t+" %"},function(ca){Ta=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
-(Ga=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ga=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
+(Ha=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ha=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(ca){this.editorUi.menus.addInsertTableItem(ca,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=d.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
function(){try{null!=T&&e.insertColumn(T,null!=U?U.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=T&&e.insertColumn(T,null!=U?U.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=T&&null!=U&&e.deleteColumn(T,U.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}),
n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.insertRow(T,fa.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.insertRow(T,fa.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
@@ -3373,18 +3374,18 @@ function(ca){if(null!=T){var t=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s
""):(B.setAttribute("border","1"),B.style.border="1px solid "+z,B.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ca){if(null!=T){var t=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,B,D,G){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,
function(z){var B=null==U||null!=ca&&mxEvent.isShiftDown(ca)?T:U;e.processElements(B,function(D){D.style.backgroundColor=null});B.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=T){var ca=T.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?T.setAttribute("cellPadding",t):T.removeAttribute("cellPadding")}),mxResources.get("spacing"));
f.showDialog(ca.container,300,80,!0,!0);ca.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d);
-a.appendChild(k);var eb=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);var Ua=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
+a.appendChild(k);var db=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);var Ua=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=V)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),V.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(C,ca==mxConstants.ALIGN_LEFT);c(F,ca==mxConstants.ALIGN_CENTER);c(K,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,
mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(O,ca==mxConstants.ALIGN_TOP);c(R,ca==mxConstants.ALIGN_MIDDLE);c(Q,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ba.value=ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&&
t==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?L.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?
-L.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(L.value="automatic");if(z||document.activeElement!=Fa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Fa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ra)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
-za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=sa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),sa.value=isNaN(ca)?"":ca+" pt"});var Xa=this.installInputHandler(Fa,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var bb=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var db=
-this.installInputHandler(za,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var ib=this.installInputHandler(sa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(V,Ua);this.addKeyHandler(Fa,Ua);this.addKeyHandler(Ja,Ua);this.addKeyHandler(ra,Ua);this.addKeyHandler(za,Ua);this.addKeyHandler(sa,Ua);e.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){e.getModel().removeListener(Ua)}});Ua();if(e.cellEditor.isContentEditing()){var Za=!1;d=function(){Za||
-(Za=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Ha){if(null!=Ba&&null!=Ha){if(Ba==Ha)return!0;if(Ba.length>Ha.length+1)return Ba.substring(Ba.length-Ha.length-1,Ba.length)=="-"+Ha}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Ha=ca;null!=Ha&&1==Ha.childNodes.length;)if(Ha=Ha.childNodes[0],Ha.nodeName==Ba)return!0;return!1},B=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-
-2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},D=function(Ba,Ha,Na){return null!=Na.style&&null!=Ha?(Ha=Ha.lineHeight,null!=Na.style.lineHeight&&"%"==Na.style.lineHeight.substring(Na.style.lineHeight.length-1)?parseInt(Na.style.lineHeight)/100:"px"==Ha.substring(Ha.length-2)?parseFloat(Ha)/Ba:parseInt(Ha)):""},G=mxUtils.getCurrentStyle(ca),M=B(G),X=D(M,G,ca),ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var da=window.getSelection(),ja=
+L.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(L.value="automatic");if(z||document.activeElement!=Ga)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ga.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ra)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
+za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=sa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),sa.value=isNaN(ca)?"":ca+" pt"});var Va=this.installInputHandler(Ga,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var bb=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var cb=
+this.installInputHandler(za,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var jb=this.installInputHandler(sa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(V,Ua);this.addKeyHandler(Ga,Ua);this.addKeyHandler(Ja,Ua);this.addKeyHandler(ra,Ua);this.addKeyHandler(za,Ua);this.addKeyHandler(sa,Ua);e.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){e.getModel().removeListener(Ua)}});Ua();if(e.cellEditor.isContentEditing()){var $a=!1;d=function(){$a||
+($a=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Da){if(null!=Ba&&null!=Da){if(Ba==Da)return!0;if(Ba.length>Da.length+1)return Ba.substring(Ba.length-Da.length-1,Ba.length)=="-"+Da}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Da=ca;null!=Da&&1==Da.childNodes.length;)if(Da=Da.childNodes[0],Da.nodeName==Ba)return!0;return!1},B=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-
+2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},D=function(Ba,Da,Ma){return null!=Ma.style&&null!=Da?(Da=Da.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Da.substring(Da.length-2)?parseFloat(Da)/Ba:parseInt(Da)):""},G=mxUtils.getCurrentStyle(ca),M=B(G),X=D(M,G,ca),ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var da=window.getSelection(),ja=
0;ja<ia.length;ja++)if(da.containsNode(ia[ja],!0)){temp=mxUtils.getCurrentStyle(ia[ja]);M=Math.max(B(temp),M);var ta=D(M,temp,ia[ja]);if(ta!=X||isNaN(ta))X=""}null!=G&&(c(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),c(m[1],"italic"==G.fontStyle||z("I")||z("EM")),c(m[2],z("U")),c(aa,z("SUP")),c(P,z("SUB")),e.cellEditor.isTableSelected()?(c(ha,t(G.textAlign,"justify")),c(C,t(G.textAlign,"left")),c(F,t(G.textAlign,"center")),c(K,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(c(ha,t(G.textAlign,"justify")),c(C,!1),c(F,!1),c(K,!1)):(c(ha,!1),c(C,z==mxConstants.ALIGN_LEFT),c(F,z==mxConstants.ALIGN_CENTER),c(K,z==mxConstants.ALIGN_RIGHT))),T=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),fa=null==T?null:e.getParentByName(ca,"TR",T),U=null==T?null:e.getParentByNames(ca,["TD","TH"],T),eb.style.display=null!=T?"":"none",document.activeElement!=V&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&
-null!=ea?(ca.removeAttribute("size"),ca.style.fontSize=ea+" pt",ea=null):V.value=isNaN(M)?"":M+" pt",ta=parseFloat(X),isNaN(ta)?Ta.value="100 %":Ta.value=Math.round(100*ta)+" %"),null!=W&&(Z="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(Z,!0)),null!=ka&&(wa="rgba(0, 0, 0, 0)"==G.backgroundColor||"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ka(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}Za=
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(c(ha,t(G.textAlign,"justify")),c(C,!1),c(F,!1),c(K,!1)):(c(ha,!1),c(C,z==mxConstants.ALIGN_LEFT),c(F,z==mxConstants.ALIGN_CENTER),c(K,z==mxConstants.ALIGN_RIGHT))),T=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),fa=null==T?null:e.getParentByName(ca,"TR",T),U=null==T?null:e.getParentByNames(ca,["TD","TH"],T),db.style.display=null!=T?"":"none",document.activeElement!=V&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&
+null!=ea?(ca.removeAttribute("size"),ca.style.fontSize=ea+" pt",ea=null):V.value=isNaN(M)?"":M+" pt",ta=parseFloat(X),isNaN(ta)?Ta.value="100 %":Ta.value=Math.round(100*ta)+" %"),null!=W&&(Z="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(Z,!0)),null!=ka&&(wa="rgba(0, 0, 0, 0)"==G.backgroundColor||"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ka(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}$a=
!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea,"keyup",d);this.listeners.push({destroy:function(){}});d()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};
mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.fill&&this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
@@ -3454,7 +3455,7 @@ fa.style.width="23px";fa.style.height="1px";fa.style.borderBottom="1px solid "+t
m.style.padding="5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ha=this.addUnitInput(m,"pt",98,52,function(){ka.apply(this,arguments)}),ba=this.addUnitInput(m,"pt",30,52,function(){ea.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");
R.style.height="8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var qa=this.addUnitInput(m,"pt",98,52,function(){V.apply(this,arguments)}),I=this.addUnitInput(m,"pt",30,52,function(){S.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var L=this.addUnitInput(k,"pt",30,52,function(){wa.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&&
-a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function va(Ja,Fa,sa,za){sa=sa.getElementsByTagName("div")[0];null!=sa&&(sa.className=e.getCssClassForMarker(za,d.style.shape,Ja,Fa),sa.nextSibling.style.marginLeft="1px",sa.nextSibling.style.paddingRight="5px","geSprite geSprite-noarrow"==sa.className?(sa.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),sa.style.backgroundImage="none",sa.style.verticalAlign="top",sa.style.marginTop="4px",sa.style.fontSize="10px",sa.style.filter="none",
+a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function va(Ja,Ga,sa,za){sa=sa.getElementsByTagName("div")[0];null!=sa&&(sa.className=e.getCssClassForMarker(za,d.style.shape,Ja,Ga),sa.nextSibling.style.marginLeft="1px",sa.nextSibling.style.paddingRight="5px","geSprite geSprite-noarrow"==sa.className?(sa.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),sa.style.backgroundImage="none",sa.style.verticalAlign="top",sa.style.marginTop="4px",sa.style.fontSize="10px",sa.style.filter="none",
sa.style.color=this.defaultStrokeColor,sa.nextSibling.style.marginTop="0px"):(sa.nextSibling.style.position="relative",sa.nextSibling.style.top="-2px"));return sa}d=e.getSelectionState();if(oa||document.activeElement!=E)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),E.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=O)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),O.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"==d.style.shape||"filledEdge"==
d.style.shape?"":"hidden";"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(d.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(d.style,mxConstants.STYLE_DASH_PATTERN,null)?U.style.borderBottom="1px dashed "+this.defaultStrokeColor:U.style.borderBottom="1px dotted "+this.defaultStrokeColor:U.style.borderBottom="1px solid "+this.defaultStrokeColor;fa.style.borderBottom=
U.style.borderBottom;W=Q.getElementsByTagName("div")[0];null!=W&&(Z=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(Z=null),"orthogonalEdgeStyle"==Z&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==Z||"none"==Z||null==Z?"geSprite geSprite-straight":"entityRelationEdgeStyle"==Z?"geSprite geSprite-entity":"elbowEdgeStyle"==Z?"geSprite "+("vertical"==mxUtils.getValue(d.style,
@@ -3509,19 +3510,19 @@ DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destro
function A(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function E(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(){mxActor.call(this)}function aa(){mxActor.call(this)}function T(){mxActor.call(this)}function U(b,h){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=h;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,U.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,U.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,U.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,U.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,U.prototype.curveTo);
this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,U.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function ha(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function qa(){mxActor.call(this)}function I(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function S(){mxCylinder.call(this)}function V(){mxShape.call(this)}function ea(){mxShape.call(this)}function ka(){mxEllipse.call(this)}function wa(){mxShape.call(this)}
-function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function va(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Fa(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Ga(){mxRectangleShape.call(this)}function Ta(){mxDoubleEllipse.call(this)}function eb(){mxDoubleEllipse.call(this)}function Ua(){mxArrowConnector.call(this);this.spacing=0}function Xa(){mxArrowConnector.call(this);
-this.spacing=0}function Ya(){mxActor.call(this)}function bb(){mxRectangleShape.call(this)}function db(){mxActor.call(this)}function ib(){mxActor.call(this)}function Za(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
-function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ha(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Ma(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Da(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function La(){mxConnector.call(this)}
-function Oa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b,
+function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function va(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ga(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Ha(){mxRectangleShape.call(this)}function Ta(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ua(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);
+this.spacing=0}function Ya(){mxActor.call(this)}function bb(){mxRectangleShape.call(this)}function cb(){mxActor.call(this)}function jb(){mxActor.call(this)}function $a(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
+function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Fa(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
+function Pa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b,
h,q,l,p){this.paintTableLine(b,this.line,0,0)};a.prototype.paintTableLine=function(b,h,q,l){if(null!=h){var p=null;b.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?b.moveTo(w.x+q,w.y+l):null!=p&&b.lineTo(w.x+q,w.y+l));p=w}b.end();b.stroke()}};a.prototype.intersectsRectangle=function(b){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(b,
-q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(c,mxSwimlane);c.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};c.prototype.paintVertexShape=function(b,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?Ha.prototype.paintVertexShape.apply(this,
+q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(c,mxSwimlane);c.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};c.prototype.paintVertexShape=function(b,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?Da.prototype.paintVertexShape.apply(this,
arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-h,-q));v||this.outline||!(w&&J<p||!w&&J<l)||this.paintForeground(b,h,q,l,p)};c.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var J=v;v=w;w=J}b.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/
s;this.paintTableForeground(b,h,q,l,p)}};c.prototype.paintTableForeground=function(b,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(b,l[p],h,q)};c.prototype.configurePointerEvents=function(b){0==this.getTitleSize()?b.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
c);mxUtils.extend(f,c);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),J=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));b.translate(h,q);b.begin();b.moveTo(0,0);b.lineTo(l-v,0);b.lineTo(l,v);b.lineTo(l,p);b.lineTo(v,p);b.lineTo(0,p-v);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=w&&(b.setFillAlpha(Math.abs(w)),b.setFillColor(0>w?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(l-v,0),b.lineTo(l,v),b.lineTo(v,v),b.close(),b.fill()),0!=J&&(b.setFillAlpha(Math.abs(J)),b.setFillColor(0>J?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(v,
-v),b.lineTo(v,p),b.lineTo(0,p-v),b.close(),b.fill()),b.begin(),b.moveTo(v,p),b.lineTo(v,v),b.lineTo(0,0),b.moveTo(v,v),b.lineTo(l,v),b.end(),b.stroke())};e.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",e);var Ra=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
-mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(b,h,q,l,p){b.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);b.fill();b.setFillColor(mxConstants.NONE);b.rect(h,q,l,p);b.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/Ra);b.translate((l-h)/2,(p-h)/2+h/4);b.moveTo(0,
-.25*h);b.lineTo(.5*h,h*Sa);b.lineTo(h,.25*h);b.lineTo(.5*h,(.5-Sa)*h);b.lineTo(0,.25*h);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(l,p/(.5+Ra));v?(b.moveTo(0,.25*h),b.lineTo(.5*h,(.5-Sa)*h),b.lineTo(h,.25*h),b.moveTo(.5*h,(.5-Sa)*h),b.lineTo(.5*h,(1-Sa)*h)):(b.translate((l-h)/2,(p-h)/2),b.moveTo(0,.25*h),b.lineTo(.5*h,h*Sa),b.lineTo(h,.25*h),b.lineTo(h,.75*h),b.lineTo(.5*
+v),b.lineTo(v,p),b.lineTo(0,p-v),b.close(),b.fill()),b.begin(),b.moveTo(v,p),b.lineTo(v,v),b.lineTo(0,0),b.moveTo(v,v),b.lineTo(l,v),b.end(),b.stroke())};e.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",e);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
+mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(b,h,q,l,p){b.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);b.fill();b.setFillColor(mxConstants.NONE);b.rect(h,q,l,p);b.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/Na);b.translate((l-h)/2,(p-h)/2+h/4);b.moveTo(0,
+.25*h);b.lineTo(.5*h,h*Sa);b.lineTo(h,.25*h);b.lineTo(.5*h,(.5-Sa)*h);b.lineTo(0,.25*h);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(b.moveTo(0,.25*h),b.lineTo(.5*h,(.5-Sa)*h),b.lineTo(h,.25*h),b.moveTo(.5*h,(.5-Sa)*h),b.lineTo(.5*h,(1-Sa)*h)):(b.translate((l-h)/2,(p-h)/2),b.moveTo(0,.25*h),b.lineTo(.5*h,h*Sa),b.lineTo(h,.25*h),b.lineTo(h,.75*h),b.lineTo(.5*
h,(1-Sa)*h),b.lineTo(0,.75*h),b.close());b.end()};mxCellRenderer.registerShape("isoCube",k);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,h/2),b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,h/2),b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,
-h);v||(b.moveTo(0,h),b.curveTo(0,-h/3,l,-h/3,l,h),b.lineTo(l,p-h),b.curveTo(l,p+h/3,0,p+h/3,0,p-h),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(h,q);b.begin();b.moveTo(0,0);b.lineTo(l-v,0);b.lineTo(l,v);b.lineTo(l,p);b.lineTo(0,p);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=w&&(b.setFillAlpha(Math.abs(w)),b.setFillColor(0>w?"#FFFFFF":"#000000"),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v),b.close(),b.fill()),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v),
@@ -3540,7 +3541,7 @@ q&&(b.ellipse(0,.5*p-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*p-5),b.
function(b,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("card",E);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(b,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));b.moveTo(0,h/2);b.quadTo(l/4,1.4*h,l/2,h/2);b.quadTo(3*l/4,h*(1-1.4),l,h/2);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};O.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=b.width,l=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*=
l,new mxRectangle(b.x,b.y+h,q,l-2*h);h*=q;return new mxRectangle(b.x+h,b.y,q-2*h,l)}return b};mxCellRenderer.registerShape("tape",O);mxUtils.extend(R,mxActor);R.prototype.size=.3;R.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};R.prototype.redrawPath=function(b,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,
-0);b.lineTo(l,0);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};mxCellRenderer.registerShape("document",R);var Va=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):Va.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
+0);b.lineTo(l,0);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};mxCellRenderer.registerShape("document",R);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*h),0,0)}return null};A.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};F.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(b.width,b.height));v=Math.min(v,.5*b.width,.5*(b.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(v,0,Math.min(b.width,b.width-q),Math.min(b.height,b.height-h)):new mxRectangle(Math.min(b.width,b.width-q),0,v,Math.min(b.height,b.height-h))}return new mxRectangle(0,Math.min(b.height,h),0,0)}return null};K.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
@@ -3551,9 +3552,9 @@ h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.siz
h=l/5;b.rect(0,0,h,p);b.fillAndStroke();b.rect(2*h,0,h,p);b.fillAndStroke();b.rect(4*h,0,h,p);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",T);U.prototype.moveTo=function(b,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=h;this.firstX=b;this.firstY=h};U.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)};
U.prototype.quadTo=function(b,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};U.prototype.curveTo=function(b,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};U.prototype.arcTo=function(b,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};U.prototype.lineTo=function(b,h){if(null!=this.lastX&&null!=this.lastY){var q=function(N){return"number"===typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},l=Math.abs(b-
this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=h;return}var w=Math.round(v/10),J=this.defaultVariation;5>w&&(w=5,J/=3);var y=q(b-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Y=(Math.random()-.5)*J;this.originalLineTo.call(this.canvas,y*v+this.lastX-Y*p,q*v+this.lastY-Y*l)}this.originalLineTo.call(this.canvas,b,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=
-h};U.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var kb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){kb.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var sb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(b){sb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new U(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var nb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,h,q,l,p){if(null==b.handJiggle||b.handJiggle.constructor!=U)nb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+h};U.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Za=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){Za.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var pb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(b){pb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new U(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,h,q,l,p){if(null==b.handJiggle||b.handJiggle.constructor!=U)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(l/2,Math.min(p/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(l*
v,p*v)),b.moveTo(h+v,q),b.lineTo(h+l-v,q),b.quadTo(h+l,q,h+l,q+v),b.lineTo(h+l,q+p-v),b.quadTo(h+l,q+p,h+l-v,q+p),b.lineTo(h+v,q+p),b.quadTo(h,q+p,h,q+p-v),b.lineTo(h,q+v),b.quadTo(h,q,h+v,q)):(b.moveTo(h,q),b.lineTo(h+l,q),b.lineTo(h+l,q+p),b.lineTo(h,q+p),b.lineTo(h,q)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=.1;fa.prototype.fixedSize=!1;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var h=b.width,q=b.height;b=new mxRectangle(b.x,b.y,h,q);var l=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;l=Math.max(l,Math.min(h*p,q*p))}b.x+=Math.round(l);b.width-=Math.round(2*l);return b}return b};
@@ -3564,10 +3565,10 @@ this.position2)))),J=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.styl
q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("step",
qa);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h,
0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(b,h,q,l,p){var v=Math.min(l/5,p/5)+1;b.begin();b.moveTo(h+l/2,q+v);b.lineTo(h+l/2,q+p-v);b.moveTo(h+v,q+p/2);b.lineTo(h+l-v,q+p/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-L);var tb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};mxRhombus.prototype.paintVertexShape=function(b,h,q,l,p){tb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(b.setShadow(!1),tb.apply(this,[b,h,q,l,p]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};H.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Pa=this.style["symbol"+v+"VSpacing"]||Ca,
-Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Pa+=Ka);Ka=h;var la=q;Ka=J==mxConstants.ALIGN_CENTER?Ka+(l-Y)/2:J==mxConstants.ALIGN_RIGHT?Ka+(l-Y-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-N-Pa):la+Pa;b.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,b,Ka,la,Y,N);b.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+L);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};mxRhombus.prototype.paintVertexShape=function(b,h,q,l,p){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(b.setShadow(!1),ab.apply(this,[b,h,q,l,p]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};H.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca,
+Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=h;var la=q;Ka=J==mxConstants.ALIGN_CENTER?Ka+(l-Y)/2:J==mxConstants.ALIGN_RIGHT?Ka+(l-Y-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-N-Qa):la+Qa;b.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,b,Ka,la,Y,N);b.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(b,h,q,l,p,v){v?(b.moveTo(0,0),b.lineTo(l/2,p/2),b.lineTo(l,0),b.end()):(b.moveTo(0,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(0,p),b.close())};mxCellRenderer.registerShape("message",S);mxUtils.extend(V,mxShape);V.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.ellipse(l/4,0,l/2,p/4);b.fillAndStroke();b.begin();b.moveTo(l/2,p/4);b.lineTo(l/2,2*p/3);b.moveTo(l/2,p/3);b.lineTo(0,p/3);b.moveTo(l/2,p/3);b.lineTo(l,p/3);b.moveTo(l/
2,2*p/3);b.lineTo(0,p);b.moveTo(l/2,2*p/3);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",V);mxUtils.extend(ea,mxShape);ea.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};ea.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,p/4);b.lineTo(0,3*p/4);b.end();b.stroke();b.begin();b.moveTo(0,p/2);b.lineTo(l/6,p/2);b.end();b.stroke();b.ellipse(l/6,0,5*l/6,p);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(h+l/8,q+p);b.lineTo(h+7*l/8,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",ka);mxUtils.extend(wa,mxShape);wa.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(l,0);b.lineTo(0,p);b.moveTo(0,0);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",wa);mxUtils.extend(W,
@@ -3590,20 +3591,20 @@ y,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,b),new mxPoint(w+p,J)]):h==mxConstants
b);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(J,N,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?I.prototype.fixedSize:I.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=b.x,J=b.y,y=b.width,Y=b.height,N=b.getCenterX();b=b.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(N,J),new mxPoint(w+y,J+p),new mxPoint(w+y,J+Y-p),new mxPoint(N,J+Y),new mxPoint(w,J+Y-p),new mxPoint(w,J+p),new mxPoint(N,J)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+p,J),new mxPoint(w+y-p,J),new mxPoint(w+y,b),new mxPoint(w+y-p,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,b),new mxPoint(w+p,J)]);N=new mxPoint(N,
b);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(J,N,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(h,q);b.ellipse((l-v)/2,0,v,v);b.fillAndStroke();b.begin();b.moveTo(l/2,v);b.lineTo(l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ja,
-mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.begin();b.moveTo(l/2,v+w);b.lineTo(l/2,p);b.end();b.stroke();b.begin();b.moveTo((l-v)/2-w,v/2);b.quadTo((l-v)/2-w,v+w,l/2,v+w);b.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Fa,
-mxShape);Fa.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,0,p);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",Fa);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.ellipse(0,v,l-2*v,p-2*v);b.fillAndStroke();b.begin();b.moveTo(l/2,0);b.quadTo(l,0,l,p/2);b.quadTo(l,
+mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.begin();b.moveTo(l/2,v+w);b.lineTo(l/2,p);b.end();b.stroke();b.begin();b.moveTo((l-v)/2-w,v/2);b.quadTo((l-v)/2-w,v+w,l/2,v+w);b.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Ga,
+mxShape);Ga.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,0,p);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.ellipse(0,v,l-2*v,p-2*v);b.fillAndStroke();b.begin();b.moveTo(l/2,0);b.quadTo(l,0,l,p/2);b.quadTo(l,
p,l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=Math.min(h,p-h),y=Math.min(J+2*h,p-h);v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,
y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
-"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=.3*p-h/2,y=.7*p-h/2;v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ga,mxRectangleShape);Ga.prototype.paintForeground=
-function(b,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,J,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ga);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.min(4,
-Math.min(l/5,p/5));0<l&&0<p&&(b.ellipse(h+v,q+v,l-2*v,p-2*v),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(h,q,l,p),b.stroke())};mxCellRenderer.registerShape("endState",Ta);mxUtils.extend(eb,Ta);eb.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",eb);mxUtils.extend(Ua,mxArrowConnector);Ua.prototype.defaultWidth=4;Ua.prototype.isOpenEnded=function(){return!0};Ua.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
-this.strokewidth-1)};Ua.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ua);mxUtils.extend(Xa,mxArrowConnector);Xa.prototype.defaultWidth=10;Xa.prototype.defaultArrowWidth=20;Xa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Xa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Xa.prototype.getEdgeWidth=
-function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Xa);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l,
+"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=.3*p-h/2,y=.7*p-h/2;v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.paintForeground=
+function(b,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,J,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ha);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.min(4,
+Math.min(l/5,p/5));0<l&&0<p&&(b.ellipse(h+v,q+v,l-2*v,p-2*v),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(h,q,l,p),b.stroke())};mxCellRenderer.registerShape("endState",Ta);mxUtils.extend(db,Ta);db.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",db);mxUtils.extend(Ua,mxArrowConnector);Ua.prototype.defaultWidth=4;Ua.prototype.isOpenEnded=function(){return!0};Ua.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
+this.strokewidth-1)};Ua.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ua);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=
+function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l,
0),new mxPoint(l,p)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("manualInput",Ya);mxUtils.extend(bb,mxRectangleShape);bb.prototype.dx=20;bb.prototype.dy=20;bb.prototype.isHtmlAllowed=function(){return!1};bb.prototype.paintForeground=function(b,h,q,l,p){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(l*w,p*w))}w=
-Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(h,q+v);b.lineTo(h+l,q+v);b.end();b.stroke();b.begin();b.moveTo(h+w,q);b.lineTo(h+w,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",bb);mxUtils.extend(db,mxActor);db.prototype.dx=20;db.prototype.dy=20;db.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("corner",db);mxUtils.extend(ib,mxActor);ib.prototype.redrawPath=function(b,h,q,
-l,p){b.moveTo(0,0);b.lineTo(0,p);b.end();b.moveTo(l,0);b.lineTo(l,p);b.end();b.moveTo(0,p/2);b.lineTo(l,p/2);b.end()};mxCellRenderer.registerShape("crossbar",ib);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(b,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(h,q+v);b.lineTo(h+l,q+v);b.end();b.stroke();b.begin();b.moveTo(h+w,q);b.lineTo(h+w,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",bb);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("corner",cb);mxUtils.extend(jb,mxActor);jb.prototype.redrawPath=function(b,h,q,
+l,p){b.moveTo(0,0);b.lineTo(0,p);b.end();b.moveTo(l,0);b.lineTo(l,p);b.end();b.moveTo(0,p/2);b.lineTo(l,p/2);b.end()};mxCellRenderer.registerShape("crossbar",jb);mxUtils.extend($a,mxActor);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("tee",$a);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(b,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(0,v)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(b,
h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h,
v),new mxPoint(h,p)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(h,0);b.lineTo(l,0);b.quadTo(l-2*h,p/2,l,p);b.lineTo(h,p);b.quadTo(h-
@@ -3613,21 +3614,21 @@ G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(b,h
function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(h+l/2,q+p);b.lineTo(h+l,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(h,q+p/2);b.lineTo(h+l,q+p/2);b.end();b.stroke();b.begin();b.moveTo(h+l/2,q);b.lineTo(h+l/2,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",
ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(h+.145*l,q+.145*p);b.lineTo(h+.855*l,q+.855*p);b.end();b.stroke();b.begin();b.moveTo(h+.855*l,q+.145*p);b.lineTo(h+.145*l,q+.855*p);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(b,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
arguments);b.setShadow(!1);b.begin();b.moveTo(h,q+p/2);b.lineTo(h+l,q+p/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(b,h,q,l,p){b.begin();b.moveTo(h,q);b.lineTo(h+l,q);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke();b.begin();b.moveTo(h,q+p);b.lineTo(h+l,q+p);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
-function(b,h,q,l,p){var v=b.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;b.begin();b.moveTo(h,q);b.lineTo(h,q+p);b.moveTo(h+v,J);b.lineTo(h+v+w,J-w/2);b.moveTo(h+v,J);b.lineTo(h+v+w,J+w/2);b.moveTo(h+v,J);b.lineTo(h+l-v,J);b.moveTo(h+l,q);b.lineTo(h+l,q+p);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J-w/2);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J+w/2);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ha,mxEllipse);Ha.prototype.drawHidden=!0;Ha.prototype.paintVertexShape=function(b,h,q,
+function(b,h,q,l,p){var v=b.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;b.begin();b.moveTo(h,q);b.lineTo(h,q+p);b.moveTo(h+v,J);b.lineTo(h+v+w,J-w/2);b.moveTo(h+v,J);b.lineTo(h+v+w,J+w/2);b.moveTo(h+v,J);b.lineTo(h+l-v,J);b.moveTo(h+l,q);b.lineTo(h+l,q+p);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J-w/2);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J+w/2);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(b,h,q,
l,p){this.outline||b.setStrokeColor(null);if(null!=this.style){var v=b.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(b.pointerEvents=!1);var J="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Y="1"==mxUtils.getValue(this.style,"right","1"),N="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||J||Y||N||y?(b.rect(h,q,l,p),b.fill(),b.pointerEvents=
-v,b.setStrokeColor(this.stroke),b.setLineCap("square"),b.begin(),b.moveTo(h,q),this.outline||J?b.lineTo(h+l,q):b.moveTo(h+l,q),this.outline||Y?b.lineTo(h+l,q+p):b.moveTo(h+l,q+p),this.outline||N?b.lineTo(h,q+p):b.moveTo(h,q+p),(this.outline||y)&&b.lineTo(h,q),b.end(),b.stroke(),b.setLineCap("flat")):b.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ha);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(h+l/2,q),b.lineTo(h+l/2,q+p)):(b.moveTo(h,q+p/2),b.lineTo(h+l,q+p/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Ma,mxActor);Ma.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/2);b.moveTo(0,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(0,p);b.close();b.end()};mxCellRenderer.registerShape("delay",Ma);mxUtils.extend(Ia,mxActor);Ia.prototype.size=
+v,b.setStrokeColor(this.stroke),b.setLineCap("square"),b.begin(),b.moveTo(h,q),this.outline||J?b.lineTo(h+l,q):b.moveTo(h+l,q),this.outline||Y?b.lineTo(h+l,q+p):b.moveTo(h+l,q+p),this.outline||N?b.lineTo(h,q+p):b.moveTo(h,q+p),(this.outline||y)&&b.lineTo(h,q),b.end(),b.stroke(),b.setLineCap("flat")):b.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(h+l/2,q),b.lineTo(h+l/2,q+p)):(b.moveTo(h,q+p/2),b.lineTo(h+l,q+p/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(La,mxActor);La.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/2);b.moveTo(0,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(0,p);b.close();b.end()};mxCellRenderer.registerShape("delay",La);mxUtils.extend(Ia,mxActor);Ia.prototype.size=
.2;Ia.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;b.moveTo(0,h);b.lineTo(w,h);b.lineTo(w,0);b.lineTo(v,0);b.lineTo(v,h);b.lineTo(l,h);b.lineTo(l,q);b.lineTo(v,q);b.lineTo(v,p);b.lineTo(w,p);b.lineTo(w,q);b.lineTo(0,q);b.close();b.end()};mxCellRenderer.registerShape("cross",Ia);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,
-h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);b.moveTo(0,p/2);b.lineTo(q,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(q,p);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Da,mxActor);Da.prototype.cst={RECT2:"mxgraph.basic.rect"};Da.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
+h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);b.moveTo(0,p/2);b.lineTo(q,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(q,p);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Fa,mxActor);Fa.prototype.cst={RECT2:"mxgraph.basic.rect"};Fa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",
dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",
type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},
{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",
-enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Da.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);this.strictDrawShape(b,0,0,l,p)};Da.prototype.strictDrawShape=function(b,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
-"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Pa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&&
+enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Fa.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);this.strictDrawShape(b,0,0,l,p)};Fa.prototype.strictDrawShape=function(b,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
+"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&&
v.relIndent?v.relIndent:Math.max(0,Math.min(50,N)),la=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),ua=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle?
v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Aa=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),zb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ab=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),wb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),yb=v&&v.gradientColor2?
-v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Da.prototype;b.setDashed(Ca);Pa&&""!=Pa&&b.setDashPattern(Pa);b.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);J||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));J||(N=Math.min(Ka*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l,
+v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Fa.prototype;b.setDashed(Ca);Qa&&""!=Qa&&b.setDashPattern(Qa);b.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);J||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));J||(N=Math.min(Ka*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l,
p)-y);(la||pa||na||ma)&&"frame"!=Y&&(b.begin(),la?v.moveNW(b,h,q,l,p,w,ua,y,ma):b.moveTo(0,0),la&&v.paintNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),na&&v.paintSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(wb),Ca=J=Cb,"none"==wb&&(J=0),"none"==yb&&(Ca=0),b.setGradient(wb,yb,0,0,l,p,Bb,J,Ca),
b.begin(),la?v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma):b.moveTo(N,0),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma),ma&&na&&v.paintSWInner(b,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na),na&&pa&&v.paintSEInner(b,h,q,l,p,w,ya,y,N),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa),pa&&la&&v.paintNEInner(b,h,q,l,p,w,xa,y,N),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la),la&&ma&&v.paintNWInner(b,h,q,l,p,w,ua,y,N),b.fill(),"none"==zb&&(b.begin(),v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma),b.stroke()));
la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(b,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na)),b.stroke()):(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,
@@ -3652,81 +3653,81 @@ l,p,w,ya,y,na),v.paintSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma)
na,ma),b.close(),b.fillAndStroke())):"frame"!=Y?(b.begin(),v.moveNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(b,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la)),b.stroke()):(b.begin(),v.moveNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),v.lineNEInner(b,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),"double"==
Y&&(v.moveSEInner(b,h,q,l,p,w,ya,y,N,na),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa)),b.stroke()):(b.begin(),v.moveNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),v.lineSEInner(b,h,q,l,p,w,ya,y,N,na),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(b,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na)),b.stroke()):(b.begin(),v.moveSE(b,
h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.lineSWInner(b,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveSW(b,h,q,l,p,w,ua,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma)),b.stroke()):(b.begin(),v.moveSW(b,h,q,l,p,w,ua,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),v.lineNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,
-w,Aa,y,N,na,ma),b.close(),b.fillAndStroke());b.begin();v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);b.stroke()};Da.prototype.moveNW=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,0):b.moveTo(0,J)};Da.prototype.moveNE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,0):b.moveTo(l-J,0)};Da.prototype.moveSE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,p):b.moveTo(l,p-J)};Da.prototype.moveSW=
-function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,p):b.moveTo(J,p)};Da.prototype.paintNW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(J,0);else b.lineTo(0,0)};Da.prototype.paintTop=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==
-w&&"square"==v||!y?b.lineTo(l,0):b.lineTo(l-J,0)};Da.prototype.paintNE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l,J);else b.lineTo(l,0)};Da.prototype.paintRight=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(l,p):b.lineTo(l,p-
-J)};Da.prototype.paintLeft=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,0):b.lineTo(0,J)};Da.prototype.paintSE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-J,p);else b.lineTo(l,p)};Da.prototype.paintBottom=function(b,h,q,
-l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,p):b.lineTo(J,p)};Da.prototype.paintSW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,0,p-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(0,p-J);else b.lineTo(0,p)};Da.prototype.paintNWInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==
-w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+J);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,y+J),b.lineTo(y,y+J)};Da.prototype.paintTopInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(0,y):Y&&!N?b.lineTo(y,0):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
-v?b.lineTo(J+.5*y,y):b.lineTo(J+y,y):b.lineTo(0,y):b.lineTo(0,0)};Da.prototype.paintNEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,J+y),b.lineTo(l-J-y,y)};Da.prototype.paintRightInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&
-N?b.lineTo(l-y,0):Y&&!N?b.lineTo(l,y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):b.lineTo(l-y,J+y):b.lineTo(l-y,0):b.lineTo(l,0)};Da.prototype.paintLeftInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,p):Y&&!N?b.lineTo(0,p-y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*
-y):b.lineTo(y,p-J-y):b.lineTo(y,p):b.lineTo(0,p)};Da.prototype.paintSEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-y,p-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-y,p-J-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-y,p-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,p-J-y),b.lineTo(l-y,p-J-y)};Da.prototype.paintBottomInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(l,
-p-y):Y&&!N?b.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Y?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-J-.5*y,p-y):b.lineTo(l-J-y,p-y):b.lineTo(l,p)};Da.prototype.paintSWInner=function(b,h,q,l,p,v,w,J,y,Y){if(!Y)b.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)b.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+
-y,J+y,0,0,1,J+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(J+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,p-J-y),b.lineTo(y+J,p-y)};Da.prototype.moveSWInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,p-J-y):b.moveTo(0,p-y)};Da.prototype.lineSWInner=
-function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,p-J-y):b.lineTo(0,p-y)};Da.prototype.moveSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-
-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,p-J-y):b.moveTo(l-y,p)};Da.prototype.lineSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,p-J-y):b.lineTo(l-y,p)};Da.prototype.moveNEInner=function(b,h,
-q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,J+y):b.moveTo(l,y)};Da.prototype.lineNEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):
-("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,J+y):b.lineTo(l,y)};Da.prototype.moveNWInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.moveTo(y,0):Y&&!N?b.moveTo(0,y):"square"==w||"default"==w&&"square"==v?b.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,J+y):b.moveTo(0,0)};Da.prototype.lineNWInner=
-function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,0):Y&&!N?b.lineTo(0,y):"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,J+y):b.lineTo(0,0)};Da.prototype.paintFolds=function(b,h,q,l,p,v,w,J,y,Y,N,Ca,Pa,Ka,la){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
-Ca&&la&&(b.moveTo(0,N),b.lineTo(N,N),b.lineTo(N,0)),("fold"==J||"default"==J&&"fold"==v)&&Ca&&Pa&&(b.moveTo(l-N,0),b.lineTo(l-N,N),b.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Pa&&(b.moveTo(l-N,p),b.lineTo(l-N,p-N),b.lineTo(l,p-N)),("fold"==Y||"default"==Y&&"fold"==v)&&Ka&&la&&(b.moveTo(0,p-N),b.lineTo(N,p-N),b.lineTo(N,p))};mxCellRenderer.registerShape(Da.prototype.cst.RECT2,Da);Da.prototype.constraints=null;mxUtils.extend(La,mxConnector);La.prototype.origPaintEdgeShape=La.prototype.paintEdgeShape;
-La.prototype.paintEdgeShape=function(b,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=b.state.dashed;var v=b.state.fixDash;La.prototype.origPaintEdgeShape.apply(this,[b,l,q]);3<=b.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(b.setStrokeColor(l),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(p,v),La.prototype.origPaintEdgeShape.apply(this,[b,h,q])))};mxCellRenderer.registerShape("filledEdge",La);"undefined"!==typeof StyleFormatPanel&&function(){var b=
+w,Aa,y,N,na,ma),b.close(),b.fillAndStroke());b.begin();v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);b.stroke()};Fa.prototype.moveNW=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,0):b.moveTo(0,J)};Fa.prototype.moveNE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,0):b.moveTo(l-J,0)};Fa.prototype.moveSE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,p):b.moveTo(l,p-J)};Fa.prototype.moveSW=
+function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,p):b.moveTo(J,p)};Fa.prototype.paintNW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(J,0);else b.lineTo(0,0)};Fa.prototype.paintTop=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==
+w&&"square"==v||!y?b.lineTo(l,0):b.lineTo(l-J,0)};Fa.prototype.paintNE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l,J);else b.lineTo(l,0)};Fa.prototype.paintRight=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(l,p):b.lineTo(l,p-
+J)};Fa.prototype.paintLeft=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,0):b.lineTo(0,J)};Fa.prototype.paintSE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-J,p);else b.lineTo(l,p)};Fa.prototype.paintBottom=function(b,h,q,
+l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,p):b.lineTo(J,p)};Fa.prototype.paintSW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,0,p-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(0,p-J);else b.lineTo(0,p)};Fa.prototype.paintNWInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==
+w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+J);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,y+J),b.lineTo(y,y+J)};Fa.prototype.paintTopInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(0,y):Y&&!N?b.lineTo(y,0):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
+v?b.lineTo(J+.5*y,y):b.lineTo(J+y,y):b.lineTo(0,y):b.lineTo(0,0)};Fa.prototype.paintNEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,J+y),b.lineTo(l-J-y,y)};Fa.prototype.paintRightInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&
+N?b.lineTo(l-y,0):Y&&!N?b.lineTo(l,y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):b.lineTo(l-y,J+y):b.lineTo(l-y,0):b.lineTo(l,0)};Fa.prototype.paintLeftInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,p):Y&&!N?b.lineTo(0,p-y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*
+y):b.lineTo(y,p-J-y):b.lineTo(y,p):b.lineTo(0,p)};Fa.prototype.paintSEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-y,p-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-y,p-J-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-y,p-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,p-J-y),b.lineTo(l-y,p-J-y)};Fa.prototype.paintBottomInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(l,
+p-y):Y&&!N?b.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Y?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-J-.5*y,p-y):b.lineTo(l-J-y,p-y):b.lineTo(l,p)};Fa.prototype.paintSWInner=function(b,h,q,l,p,v,w,J,y,Y){if(!Y)b.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)b.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+
+y,J+y,0,0,1,J+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(J+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,p-J-y),b.lineTo(y+J,p-y)};Fa.prototype.moveSWInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,p-J-y):b.moveTo(0,p-y)};Fa.prototype.lineSWInner=
+function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,p-J-y):b.lineTo(0,p-y)};Fa.prototype.moveSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-
+y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,p-J-y):b.moveTo(l-y,p)};Fa.prototype.lineSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,p-J-y):b.lineTo(l-y,p)};Fa.prototype.moveNEInner=function(b,h,
+q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,J+y):b.moveTo(l,y)};Fa.prototype.lineNEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):
+("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,J+y):b.lineTo(l,y)};Fa.prototype.moveNWInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.moveTo(y,0):Y&&!N?b.moveTo(0,y):"square"==w||"default"==w&&"square"==v?b.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,J+y):b.moveTo(0,0)};Fa.prototype.lineNWInner=
+function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,0):Y&&!N?b.lineTo(0,y):"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,J+y):b.lineTo(0,0)};Fa.prototype.paintFolds=function(b,h,q,l,p,v,w,J,y,Y,N,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
+Ca&&la&&(b.moveTo(0,N),b.lineTo(N,N),b.lineTo(N,0)),("fold"==J||"default"==J&&"fold"==v)&&Ca&&Qa&&(b.moveTo(l-N,0),b.lineTo(l-N,N),b.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(b.moveTo(l-N,p),b.lineTo(l-N,p-N),b.lineTo(l,p-N)),("fold"==Y||"default"==Y&&"fold"==v)&&Ka&&la&&(b.moveTo(0,p-N),b.lineTo(N,p-N),b.lineTo(N,p))};mxCellRenderer.registerShape(Fa.prototype.cst.RECT2,Fa);Fa.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;
+Oa.prototype.paintEdgeShape=function(b,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=b.state.dashed;var v=b.state.fixDash;Oa.prototype.origPaintEdgeShape.apply(this,[b,l,q]);3<=b.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(b.setStrokeColor(l),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(p,v),Oa.prototype.origPaintEdgeShape.apply(this,[b,h,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var b=
StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=b.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);b.stroke()}});mxMarker.addMarker("box",
-function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Pa=l.x+N/2,Ka=l.y+Ca/2;l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Pa-N/2-Ca/2,Ka-Ca/2+N/2);b.lineTo(Pa-N/2+Ca/2,Ka-Ca/2-N/2);b.lineTo(Pa+Ca/2-3*N/2,Ka-3*Ca/2-N/2);b.lineTo(Pa-Ca/2-3*N/2,Ka-3*Ca/2+N/2);b.close();Y?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);
-b.moveTo(l.x-N/2+Ca/2,l.y-Ca/2-N/2);b.lineTo(l.x-Ca/2-3*N/2,l.y-3*Ca/2+N/2);b.stroke()}});mxMarker.addMarker("circle",Oa);mxMarker.addMarker("circlePlus",function(b,h,q,l,p,v,w,J,y,Y){var N=l.clone(),Ca=Oa.apply(this,arguments),Pa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);b.begin();b.moveTo(N.x-p*y,N.y-v*y);b.lineTo(N.x-2*Pa+p*y,N.y-2*Ka+v*y);b.moveTo(N.x-Pa-Ka+v*y,N.y-Ka+Pa-p*y);b.lineTo(N.x+Ka-Pa-v*y,N.y-Ka-Pa+p*y);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,
-h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Pa=l.clone();l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Pa.x-Ca,Pa.y+N);b.quadTo(l.x-Ca,l.y+N,l.x,l.y);b.quadTo(l.x+Ca,l.y-N,Pa.x+Ca,Pa.y-N);b.stroke()}});mxMarker.addMarker("async",function(b,h,q,l,p,v,w,J,y,Y){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){b.begin();b.moveTo(N.x,N.y);J?b.lineTo(N.x-p-v/2,N.y-v+p/2):b.lineTo(N.x+v/2-p,N.y-v-p/2);b.lineTo(N.x-p,N.y-v);b.close();Y?b.fillAndStroke():
-b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(h,q,l,p,v,w,J,y,Y,N){v*=J+Y;w*=J+Y;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/b,Ca.y-w+v/b):h.lineTo(Ca.x+w/b-v,Ca.y-w-v/b);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ub=function(b,h,q){return jb(b,["width"],h,function(l,p,v,w,J){J=b.shape.getEdgeWidth()*b.view.scale+q;return new mxPoint(w.x+p*l/4+v*J/2,w.y+v*l/4-p*J/2)},function(l,p,v,w,J,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
-w.y,J.x,J.y,y.x,y.y));b.style.width=Math.round(2*l)/b.view.scale-q})},jb=function(b,h,q,l,p){return Qa(b,h,function(v){var w=b.absolutePoints,J=w.length-1;v=b.view.translate;var y=b.view.scale,Y=q?w[0]:w[J];w=q?w[1]:w[J-1];J=w.x-Y.x;var N=w.y-Y.y,Ca=Math.sqrt(J*J+N*N);Y=l.call(this,Ca,J/Ca,N/Ca,Y,w);return new mxPoint(Y.x/y-v.x,Y.y/y-v.y)},function(v,w,J){var y=b.absolutePoints,Y=y.length-1;v=b.view.translate;var N=b.view.scale,Ca=q?y[0]:y[Y];y=q?y[1]:y[Y-1];Y=y.x-Ca.x;var Pa=y.y-Ca.y,Ka=Math.sqrt(Y*
-Y+Pa*Pa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ka,Y/Ka,Pa/Ka,Ca,y,w,J)})},$a=function(b){return function(h){return[Qa(h,["arrowWidth","arrowSize"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/
-2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(q.x+q.width-l.x)/q.width))})]}},lb=function(b){return function(h){return[Qa(h,["size"],function(q){var l=Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},ab=function(b,h,q){return function(l){var p=[Qa(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",h)))))*b;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/b)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(gb(l));return p}},fb=function(b,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Qa(v,["size"],function(J){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Y=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:b));return new mxPoint(J.x+
-Math.max(0,Math.min(.5*J.width,Y*(y?1:J.width))),J.getCenterY())},function(J,y,Y){J=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(q,(y.x-J.x)/J.width));this.state.style.size=J},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(gb(v));return w}},hb=function(b,h,q){b=null!=b?b:.5;return function(l){var p=[Qa(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
-"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*b,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(b,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(gb(l));return p}},Wa=function(){return function(b){var h=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));return h}},gb=function(b,h){return Qa(b,
+function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+N/2,Ka=l.y+Ca/2;l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Qa-N/2-Ca/2,Ka-Ca/2+N/2);b.lineTo(Qa-N/2+Ca/2,Ka-Ca/2-N/2);b.lineTo(Qa+Ca/2-3*N/2,Ka-3*Ca/2-N/2);b.lineTo(Qa-Ca/2-3*N/2,Ka-3*Ca/2+N/2);b.close();Y?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);
+b.moveTo(l.x-N/2+Ca/2,l.y-Ca/2-N/2);b.lineTo(l.x-Ca/2-3*N/2,l.y-3*Ca/2+N/2);b.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(b,h,q,l,p,v,w,J,y,Y){var N=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);b.begin();b.moveTo(N.x-p*y,N.y-v*y);b.lineTo(N.x-2*Qa+p*y,N.y-2*Ka+v*y);b.moveTo(N.x-Qa-Ka+v*y,N.y-Ka+Qa-p*y);b.lineTo(N.x+Ka-Qa-v*y,N.y-Ka-Qa+p*y);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,
+h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Qa.x-Ca,Qa.y+N);b.quadTo(l.x-Ca,l.y+N,l.x,l.y);b.quadTo(l.x+Ca,l.y-N,Qa.x+Ca,Qa.y-N);b.stroke()}});mxMarker.addMarker("async",function(b,h,q,l,p,v,w,J,y,Y){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){b.begin();b.moveTo(N.x,N.y);J?b.lineTo(N.x-p-v/2,N.y-v+p/2):b.lineTo(N.x+v/2-p,N.y-v-p/2);b.lineTo(N.x-p,N.y-v);b.close();Y?b.fillAndStroke():
+b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(h,q,l,p,v,w,J,y,Y,N){v*=J+Y;w*=J+Y;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/b,Ca.y-w+v/b):h.lineTo(Ca.x+w/b-v,Ca.y-w-v/b);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var mb=function(b,h,q){return Xa(b,["width"],h,function(l,p,v,w,J){J=b.shape.getEdgeWidth()*b.view.scale+q;return new mxPoint(w.x+p*l/4+v*J/2,w.y+v*l/4-p*J/2)},function(l,p,v,w,J,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
+w.y,J.x,J.y,y.x,y.y));b.style.width=Math.round(2*l)/b.view.scale-q})},Xa=function(b,h,q,l,p){return Ra(b,h,function(v){var w=b.absolutePoints,J=w.length-1;v=b.view.translate;var y=b.view.scale,Y=q?w[0]:w[J];w=q?w[1]:w[J-1];J=w.x-Y.x;var N=w.y-Y.y,Ca=Math.sqrt(J*J+N*N);Y=l.call(this,Ca,J/Ca,N/Ca,Y,w);return new mxPoint(Y.x/y-v.x,Y.y/y-v.y)},function(v,w,J){var y=b.absolutePoints,Y=y.length-1;v=b.view.translate;var N=b.view.scale,Ca=q?y[0]:y[Y];y=q?y[1]:y[Y-1];Y=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Y*
+Y+Qa*Qa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ka,Y/Ka,Qa/Ka,Ca,y,w,J)})},ib=function(b){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/
+2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(q.x+q.width-l.x)/q.width))})]}},gb=function(b){return function(h){return[Ra(h,["size"],function(q){var l=Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},Wa=function(b,h,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",h)))))*b;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/b)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(b,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(J){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Y=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:b));return new mxPoint(J.x+
+Math.max(0,Math.min(.5*J.width,Y*(y?1:J.width))),J.getCenterY())},function(J,y,Y){J=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(q,(y.x-J.x)/J.width));this.state.style.size=J},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},tb=function(b,h,q){b=null!=b?b:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*b,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(b,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(b){var h=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));return h}},fb=function(b,h){return Ra(b,
[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=h?h:q.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var p=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(q.x+q.width-Math.min(q.width/2,p),q.y+l)}p=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(q.x+q.width-Math.min(Math.max(q.width/2,q.height/2),Math.min(q.width,q.height)*
-p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Qa=function(b,h,q,l,p,v,w){var J=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(Y){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);
-w&&w(Y)};J.getPosition=q;J.setPosition=l;J.ignoreGrid=null!=p?p:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return J},ob={link:function(b){return[ub(b,!0,10),ub(b,!1,10)]},flexArrow:function(b){var h=b.view.graph.gridSize/b.view.scale,q=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(jb(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(b,h,q,l,p,v,w){var J=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(Y){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);
+w&&w(Y)};J.getPosition=q;J.setPosition=l;J.ignoreGrid=null!=p?p:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return J},rb={link:function(b){return[mb(b,!0,10),mb(b,!1,10)]},flexArrow:function(b){var h=b.view.graph.gridSize/b.view.scale,q=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Xa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*b.view.scale)+v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)-p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-b.shape.strokewidth)/
-3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Y.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),q.push(jb(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Y.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),q.push(Xa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(l,p,v,w,J){l=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*b.view.scale)+v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)-p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-b.shape.strokewidth)/
3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*l)-b.shape.getEdgeWidth())/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),
-Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<h&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(jb(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
+Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<h&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Xa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
b.view.scale)-v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)+p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(p-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Y.getEvent())||
-Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),q.push(jb(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
+Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),q.push(Xa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
b.view.scale)-v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)+p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(p-b.shape.strokewidth)/3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*l)-b.shape.getEdgeWidth())/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],
b.style.startWidth=b.style.endWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<h&&(b.style.endWidth=b.style.startWidth))})));return q},swimlane:function(b){var h=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(b.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(gb(b,q/2))}h.push(Qa(b,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(fb(b,q/2))}h.push(Ra(b,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=b.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&&(p.isTableRow(b.cell)||p.isTableCell(b.cell))){l=p.getSwimlaneDirection(b.style);var v=p.model.getParent(b.cell);v=p.model.getChildCells(v,!0);for(var w=[],J=0;J<v.length;J++)v[J]!=b.cell&&p.isSwimlane(v[J])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[J]))==
-l&&w.push(v[J]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:Wa(),ext:Wa(),rectangle:Wa(),triangle:Wa(),rhombus:Wa(),umlLifeline:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(b){return[Qa(b,
+l&&w.push(v[J]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(b){return[Ra(b,
["width","height"],function(h){var q=Math.max(oa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",oa.prototype.width))),l=Math.max(1.5*oa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style,"height",oa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(oa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*oa.prototype.corner,Math.min(h.height,q.y-h.y)))},
-!1)]},process:function(b){var h=[Qa(b,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
-!1)&&h.push(gb(b));return h},cross:function(b){return[Qa(b,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,
-Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
-function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(b){var h=[Qa(b,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));
-return h},dataStorage:function(b){return[Qa(b,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(b){var h=
-[Qa(b,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
-Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Qa(b,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Qa(b,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));
-return h},internalStorage:function(b){var h=[Qa(b,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&
-h.push(gb(b));return h},module:function(b){return[Qa(b,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
-q.y-h.y))/2)})]},corner:function(b){return[Qa(b,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(b){return[Qa(b,["dx","dy"],function(h){var q=
-Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:$a(1),doubleArrow:$a(.5),folder:function(b){return[Qa(b,["tabWidth","tabHeight"],function(h){var q=
+!1)]},process:function(b){var h=[Ra(b,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
+!1)&&h.push(fb(b));return h},cross:function(b){return[Ra(b,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,
+Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
+function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(b){var h=[Ra(b,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));
+return h},dataStorage:function(b){return[Ra(b,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(b){var h=
+[Ra(b,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
+Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(b,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(b,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));
+return h},internalStorage:function(b){var h=[Ra(b,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&
+h.push(fb(b));return h},module:function(b){return[Ra(b,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
+q.y-h.y))/2)})]},corner:function(b){return[Ra(b,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(b){return[Ra(b,["dx","dy"],function(h){var q=
+Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:ib(1),doubleArrow:ib(.5),folder:function(b){return[Ra(b,["tabWidth","tabHeight"],function(h){var q=
Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(b){return[Qa(b,["size"],function(h){var q=
-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(b){return[Qa(b,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
-Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:lb(x.prototype.size),cylinder3:lb(A.prototype.size),offPageConnector:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(b){var h=[Graph.createHandle(b,["size"],function(q){var l=
+(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(b){return[Ra(b,["size"],function(h){var q=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(b){return[Ra(b,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
+Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:gb(x.prototype.size),cylinder3:gb(A.prototype.size),offPageConnector:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(b){var h=[Graph.createHandle(b,["size"],function(q){var l=
Math.max(0,Math.min(q.width/2,q.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(q.x+l,q.y+l)},function(q,l){this.state.style.size=Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];b=Graph.createHandle(b,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*
-Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(b);return h},step:fb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:fb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:fb(aa.prototype.size,!1),display:fb(Ea.prototype.size,!1),cube:ab(1,e.prototype.size,!1),card:ab(.5,E.prototype.size,!0),loopLimit:ab(.5,G.prototype.size,!0),trapezoid:hb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:hb(1,Q.prototype.size,Q.prototype.fixedSize)};Graph.createHandle=
-Qa;Graph.handleFactory=ob;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=ob[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
-(h=ob[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(b=null==b?h:b.concat(h)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=ob[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var pb=new mxPoint(1,0),qb=new mxPoint(1,0),vb=mxUtils.toRadians(-30);pb=mxUtils.getRotatedPoint(pb,
-Math.cos(vb),Math.sin(vb));var rb=mxUtils.toRadians(-150);qb=mxUtils.getRotatedPoint(qb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(b,h,q,l,p){var v=b.view;l=null!=l&&0<l.length?l[0]:null;var w=b.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(b,l));null==J&&null!=h&&(J=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=pb.x,Y=pb.y,N=qb.x,Ca=qb.y,Pa="horizontal"==mxUtils.getValue(b.style,
-"elbow","horizontal");if(null!=w&&null!=J){b=function(la,pa,na){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-N*ma)/(y*Ca-Y*N);la=(Y*la-y*ma)/(Y*N-y*Ca);Pa?(na&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la)):(na&&(Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa));p.push(Ka)};var Ka=J;null==l&&(l=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/2));b(l.x,l.y,!0);b(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
-var mb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(b);q.snapToTerminals=!1;return q}return mb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(b,h,q){b=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,
+Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(b);return h},step:qb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:qb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:qb(aa.prototype.size,!1),display:qb(Ea.prototype.size,!1),cube:Wa(1,e.prototype.size,!1),card:Wa(.5,E.prototype.size,!0),loopLimit:Wa(.5,G.prototype.size,!0),trapezoid:tb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:tb(1,Q.prototype.size,Q.prototype.fixedSize)};Graph.createHandle=
+Ra;Graph.handleFactory=rb;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
+(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(b=null==b?h:b.concat(h)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=rb[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var kb=new mxPoint(1,0),hb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);kb=mxUtils.getRotatedPoint(kb,
+Math.cos(ob),Math.sin(ob));var lb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(b,h,q,l,p){var v=b.view;l=null!=l&&0<l.length?l[0]:null;var w=b.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(b,l));null==J&&null!=h&&(J=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=kb.x,Y=kb.y,N=hb.x,Ca=hb.y,Qa="horizontal"==mxUtils.getValue(b.style,
+"elbow","horizontal");if(null!=w&&null!=J){b=function(la,pa,na){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-N*ma)/(y*Ca-Y*N);la=(Y*la-y*ma)/(Y*N-y*Ca);Qa?(na&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la)):(na&&(Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa));p.push(Ka)};var Ka=J;null==l&&(l=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/2));b(l.x,l.y,!0);b(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
+var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(b);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(b,h,q){b=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h+.5*l,q+l*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+(1-p)*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return b};r.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(h*
Math.tan(l),.5*q);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,l));return b};ba.prototype.getConstraints=function(b,h,q){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q-l)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
+0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return b};E.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3738,8 +3739,8 @@ null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.
"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(h+l),p))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,q));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};bb.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=
-mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,h,q){b=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0),!1,null,0,q));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};bb.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
+mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,h,q){b=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(p+h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return b};za.prototype.getConstraints=function(b,h,q){h=parseFloat(mxUtils.getValue(b,"jettyWidth",za.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
"jettyHeight",za.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,3.5*b))];q>5*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>
@@ -3755,12 +3756,12 @@ h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(
[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)];Q.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
+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.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(h+l),.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,p));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return b};db.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return b};cb.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return b};ib.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=
+1),!1));return b};jb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=
function(b,h,q){b=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));b.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));return b};t.prototype.getConstraints=function(b,h,q){b=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));l=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return b};Ia.prototype.getConstraints=
@@ -3768,7 +3769,7 @@ function(b,h,q){b=[];var l=Math.min(q,h),p=Math.max(0,Math.min(l,l*parseFloat(mx
0),!1,null,p,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q-.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q-.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return b};Z.prototype.constraints=null;B.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)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];D.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)];Ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(m){d.escape();m=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),m);null!=m&&d.setSelectionCells(m)}function c(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var m=d.getSelectionCells(),r=0;r<m.length;r++)d.cellLabelChanged(m[r],"")}finally{d.getModel().endUpdate()}}}function f(m,r,x,A,C){C.getModel().beginUpdate();try{var F=C.getCellGeometry(m);null!=F&&x&&A&&(x/=A,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,C.getModel().setGeometry(m,
F));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{C.getModel().endUpdate()}}var e=this.editorUi,g=e.editor,d=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(e.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){d.popupMenuHandler.hideMenu();var m=d.view.scale,
@@ -4069,26 +4070,26 @@ image:IMAGE_PATH+"/sidebar-kubernetes.png"},{title:"Network",id:"network",image:
{title:mxResources.get("archiMate21"),id:"archimate",image:IMAGE_PATH+"/sidebar-archimate.png"},{title:mxResources.get("bpmn")+" 2.0",id:"bpmn2",image:IMAGE_PATH+"/sidebar-bpmn.png"},{title:mxResources.get("sysml"),id:"sysml",image:IMAGE_PATH+"/sidebar-sysml.png"},{title:"Value Stream Mapping",id:"lean_mapping",image:IMAGE_PATH+"/sidebar-leanmapping.png"}]},{title:mxResources.get("other"),entries:[{title:mxResources.get("cabinets"),id:"cabinets",image:IMAGE_PATH+"/sidebar-cabinets.png"},{title:"Infographic",
id:"infographic",image:IMAGE_PATH+"/sidebar-infographic.png"},{title:mxResources.get("eip"),id:"eip",image:IMAGE_PATH+"/sidebar-eip.png"},{title:mxResources.get("electrical"),id:"electrical",image:IMAGE_PATH+"/sidebar-electrical.png"},{title:mxResources.get("floorplans"),id:"floorplan",image:IMAGE_PATH+"/sidebar-floorplans.png"},{title:"Fluid Power (ISO 1219)",id:"fluid_power",image:IMAGE_PATH+"/sidebar-fluid_power.png"},{title:mxResources.get("gmdl"),id:"gmdl",image:IMAGE_PATH+"/sidebar-gmdl.png"},
{title:mxResources.get("procEng"),id:"pid",image:IMAGE_PATH+"/sidebar-pid.png"},{title:"Threat Modeling",id:"threatModeling",image:IMAGE_PATH+"/sidebar-threatmodeling.png"},{title:"Web Icons",id:"webicons",image:IMAGE_PATH+"/sidebar-webIcons.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=!1;this.shapetags={};null!=this.tagIndex&&(this.addTagIndex(Graph.decompress(this.tagIndex)),this.tagIndex=null);this.initPalettes()};"1"==urlParams.savesidebar&&
-(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=h.cloneNode(!0);
-p.style.backgroundImage="";p.style.textDecoration="none";p.style.fontWeight="bold";p.style.fontSize="14px";p.style.color="rgb(80, 80, 80)";p.style.width="456px";p.style.backgroundColor="#ffffff";p.style.paddingLeft="6px";var q=p.getElementsByTagName("button")[0];q.parentNode.removeChild(q);var t=k.cloneNode(!0);t.style.backgroundColor="#ffffff";t.style.borderColor="transparent";t.style.width="456px";p=(new DOMParser).parseFromString('<body style="background:#ffffff;font-family:Helvetica,Arial;">'+
-p.outerHTML+t.outerHTML+"</body>","text/html");this.editorUi.editor.convertImages(p.documentElement,mxUtils.bind(this,function(v){var w='<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="https://www.draw.io/styles/grapheditor.css"></head>'+mxUtils.getXml(v)+"</html>";t.style.position="absolute";window.document.body.appendChild(t);var r=t.clientHeight+18;t.parentNode.removeChild(t);this.editorUi.confirm("Image data created",mxUtils.bind(this,function(){(new mxXmlRequest(EXPORT_URL,
-"w=456&h="+r+"&html="+encodeURIComponent(Graph.compress(w)))).simulate(document,"_blank")}),null,mxResources.get("save"),mxResources.get("cancel"))}))}else{if("none"==k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var u=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=u;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+
-this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&
-(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=
-k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();
-window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,
-h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],
-w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerHTML="",mxUtils.write(F,
-this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title))):(D.style.display="none",F.innerHTML="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,
-r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerHTML="";mxUtils.write(C,mxResources.get("loading")+"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerHTML="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=
-JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||
-(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==
-this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+
-"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));
-this.setCurrentSearchEntryLibrary("clipart","finance");this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",
-h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",
-h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),
-{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
+(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=k.getElementsByTagName("svg");
+var q=(Math.ceil(p.length/6)+1)*this.thumbHeight,t=Graph.createSvgNode(0,0,456,q,"#ffffff"),u=new mxSvgCanvas2D(t);u.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);u.setFontStyle(mxConstants.FONT_BOLD);u.setFontColor("rgb(80, 80, 80)");u.setFontSize(14);for(var v=h.childNodes,w=0;w<v.length;w++)if(v[w].nodeType==mxConstants.NODETYPE_TEXT){u.plainText(6,0,0,0,mxUtils.getTextContent(v[w]));break}for(w=0;w<p.length;w++)u=p[w].cloneNode(!0),u.removeAttribute("style"),u.setAttribute("width",this.thumbWidth),
+u.setAttribute("height",this.thumbHeight),u.setAttribute("x",12+68*mxUtils.mod(w,6)),u.setAttribute("y",24+68*Math.floor(w/6)),t.appendChild(u);this.editorUi.editor.convertImages(t,mxUtils.bind(this,function(y){var x=document.createElement("canvas");x.width=456;x.height=q;var z=document.createElement("img");z.onload=mxUtils.bind(this,function(){x.getContext("2d").drawImage(z,0,0);this.editorUi.saveCanvas(x,null,"png")});y=Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(t);z.src=Editor.createSvgDataUri(y)}))}else{if("none"==
+k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var r=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=r;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);
+mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=
+function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<
+k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<
+h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};
+Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,
+C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title))):
+(D.style.display="none",F.innerHTML="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerHTML="";mxUtils.write(C,mxResources.get("loading")+
+"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerHTML="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));
+else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?
+(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",
+";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
+"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.setCurrentSearchEntryLibrary("clipart","finance");
+this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
+"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
+"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",
+Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
this.setCurrentSearchEntryLibrary("clipart","telco");this.addImagePalette("telco","Clipart / Telecommunication",h+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));this.setCurrentSearchEntryLibrary();this.addFlowchartPalette();this.addActiveDirectoryPalette();this.addAndroidPalette();this.addAtlassianPalette();
this.addBootstrapPalette();this.addDFDPalette();this.addErPalette();this.addIos7Palette();this.addIosPalette();this.addKubernetesPalette();this.addMockupPalette();this.addSitemapPalette();this.addUml25Palette();this.addUmlPalette(!1);this.addAlliedTelesisPalette();this.addAWS3Palette();this.addAWS4bPalette();this.addAWS4Palette();this.addAWS3DPalette();this.addAzurePalette();this.addAzure2Palette();this.addMSCAEPalette();this.addC4Palette();this.addCiscoPalette(p,k);this.addCisco19Palette();this.addCiscoSafePalette();
this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addGCPIconsPalette();this.addIBMPalette();this.addNetworkPalette();this.addOfficePalette();this.addRackPalette(m,k);this.addVeeamPalette();this.addVeeam2Palette();this.addVVDPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.addBpmn2Palette();this.addSysMLPalette(q,k);this.addLeanMappingPalette();this.addCabinetsPalette();this.addInfographicPalette();this.addEipPalette();this.addElectricalPalette();this.addFloorplanPalette();
@@ -10933,9 +10934,9 @@ DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.sha
DrawioFile.prototype.updateFile=function(b,e,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(m){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[m]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=m?this.mergeFile(m,b,e,c):this.reloadFile(b,
e))}catch(n){null!=e&&e(n)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,f,c){var m=!0;try{this.stats.fileMerged++;var n=this.getShadowPages(),v=b.getShadowPages();if(null!=v&&0<v.length){var d=[this.ui.diffPages(null!=c?c:n,v)],g=this.ignorePatches(d);this.setShadowPages(v);if(g)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",g);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;c={};g={};var k=this.ui.patchPages(n,d[0]),l=this.ui.getHashValueForPages(k,
-c),p=this.ui.getHashValueForPages(v,g);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",n,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",p,"valid",l==p,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(v)),x=this.compressReportData(this.getAnonymizedXmlForPages(k)),y=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(f,d,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+l+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+y+"\nTo: "+A+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+x,null,"mergeFile");return}if(null!=this.sync){var B=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==B||mxUtils.isEmptyObject(B)||d.push(B)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(t){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(t);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,t);else{var I=this.getCurrentUser(),O=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),O,t)}}catch(z){}}};
+c),p=this.ui.getHashValueForPages(v,g);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",n,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",p,"valid",l==p,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(v)),x=this.compressReportData(this.getAnonymizedXmlForPages(k)),y=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(f,d,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+l+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+y+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+x,null,"mergeFile");return}if(null!=this.sync){var A=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==A||mxUtils.isEmptyObject(A)||d.push(A)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(L){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(L);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,L);else{var K=this.getCurrentUser(),P=null!=K?K.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),P,L)}}catch(u){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var m=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(m=this.ui.anonymizeNode(m,!0));m.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,m,!0);f.appendChild(m)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,f,c,m){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var n=mxUtils.bind(this,function(g){var k=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
@@ -11005,7 +11006,7 @@ LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=fu
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
LocalFile.prototype.saveFile=function(b,e,f,c,m){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;m||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var v=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),g=mxUtils.bind(this,function(k){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var l=mxUtils.bind(this,
function(q){this.savingFile=!1;null!=c&&c({error:q})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(q){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);this.desc.lastModified==x.lastModified?q.write(n?this.ui.base64ToBlob(k,"image/png"):k).then(mxUtils.bind(this,function(){q.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){try{var A=this.desc;this.savingFile=!1;this.desc=y;this.fileSaved(v,A,d,l);this.removeDraft()}catch(B){l(B)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;l(x)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(k,b,n?"image/png":"text/xml",n);else if(k.length<MAX_REQUEST_SIZE){var p=b.lastIndexOf(".");p=0<p?b.substring(p+1):"xml";
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){try{var z=this.desc;this.savingFile=!1;this.desc=y;this.fileSaved(v,z,d,l);this.removeDraft()}catch(A){l(A)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;l(x)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(k,b,n?"image/png":"text/xml",n);else if(k.length<MAX_REQUEST_SIZE){var p=b.lastIndexOf(".");p=0<p?b.substring(p+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+p+"&xml="+encodeURIComponent(k)+"&filename="+encodeURIComponent(b)+(n?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}));d()}});n?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(k){g(k)}),c,this.ui.getCurrentFile()!=this?v:null,e.scale,e.border)):g(v)};
LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,f)};
@@ -11021,11 +11022,11 @@ StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(m){var n=[];
StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};
RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,f){function c(p,q,x,y,A,B){function I(){mxEvent.addListener(O,"click",null!=B?B:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()}),
-function(E){b.spinner.stop();b.handleError(E)}):(b.setMode(x,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}d++;++v>f&&(mxUtils.br(g),v=1);var O=document.createElement("a");O.style.overflow="hidden";O.style.display="inline-block";O.className="geBaseButton";O.style.boxSizing="border-box";O.style.fontSize="11px";O.style.position="relative";O.style.margin="4px";O.style.marginTop="8px";O.style.marginBottom="0px";O.style.padding="8px 10px 8px 10px";O.style.width="88px";O.style.height=
-"100px";O.style.whiteSpace="nowrap";O.setAttribute("title",q);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.overflow="hidden";t.style.position="absolute";t.style.bottom="8px";t.style.left="0px";t.style.right="0px";mxUtils.write(t,q);O.appendChild(t);if(null!=p){var z=document.createElement("img");z.setAttribute("src",p);z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width="60px";z.style.height="60px";z.style.paddingBottom="6px";O.appendChild(z)}else t.style.paddingTop=
-"5px",t.style.whiteSpace="normal",mxClient.IS_IOS?(O.style.padding="0px 10px 20px 10px",O.style.top="6px"):mxClient.IS_FF&&(t.style.paddingTop="0px",t.style.marginTop="-2px");if(null!=A)for(p=0;p<A.length;p++)mxUtils.br(t),mxUtils.write(t,A[p]);if(null!=y&&null==b[y]){z.style.visibility="hidden";mxUtils.setOpacity(t,10);var L=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});L.spin(O);
-var C=window.setTimeout(function(){null==b[y]&&(L.stop(),O.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(E,G){null!=b[y]&&G.getProperty("client")==b[y]&&(window.clearTimeout(C),mxUtils.setOpacity(t,100),z.style.visibility="",L.stop(),I(),"drive"==y&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else I();g.appendChild(O)}f=null!=f?f:2;var m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";m.style.paddingTop="0px";m.style.paddingBottom=
+var StorageDialog=function(b,e,f){function c(p,q,x,y,z,A){function K(){mxEvent.addListener(P,"click",null!=A?A:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()}),
+function(C){b.spinner.stop();b.handleError(C)}):(b.setMode(x,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}d++;++v>f&&(mxUtils.br(g),v=1);var P=document.createElement("a");P.style.overflow="hidden";P.style.display="inline-block";P.className="geBaseButton";P.style.boxSizing="border-box";P.style.fontSize="11px";P.style.position="relative";P.style.margin="4px";P.style.marginTop="8px";P.style.marginBottom="0px";P.style.padding="8px 10px 8px 10px";P.style.width="88px";P.style.height=
+"100px";P.style.whiteSpace="nowrap";P.setAttribute("title",q);var L=document.createElement("div");L.style.textOverflow="ellipsis";L.style.overflow="hidden";L.style.position="absolute";L.style.bottom="8px";L.style.left="0px";L.style.right="0px";mxUtils.write(L,q);P.appendChild(L);if(null!=p){var u=document.createElement("img");u.setAttribute("src",p);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";P.appendChild(u)}else L.style.paddingTop=
+"5px",L.style.whiteSpace="normal",mxClient.IS_IOS?(P.style.padding="0px 10px 20px 10px",P.style.top="6px"):mxClient.IS_FF&&(L.style.paddingTop="0px",L.style.marginTop="-2px");if(null!=z)for(p=0;p<z.length;p++)mxUtils.br(L),mxUtils.write(L,z[p]);if(null!=y&&null==b[y]){u.style.visibility="hidden";mxUtils.setOpacity(L,10);var D=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});D.spin(P);
+var B=window.setTimeout(function(){null==b[y]&&(D.stop(),P.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(C,G){null!=b[y]&&G.getProperty("client")==b[y]&&(window.clearTimeout(B),mxUtils.setOpacity(L,100),u.style.visibility="",D.stop(),K(),"drive"==y&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else K();g.appendChild(P)}f=null!=f?f:2;var m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";m.style.paddingTop="0px";m.style.paddingBottom=
"20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";n.style.padding="10px 0px 20px 0px";var v=0,d=0,g=document.createElement("div");g.style.paddingTop="2px";n.appendChild(g);var k=document.createElement("p"),l=document.createElement("p");l.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");m.appendChild(l);m.appendChild(n);v=0;"function"===typeof window.DriveClient&&
c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");n=document.createElement("span");n.style.position="absolute";n.style.cursor="pointer";n.style.bottom="27px";n.style.color="gray";n.style.userSelect="none";n.style.textAlign="center";n.style.left="50%";mxUtils.setPrefixedStyle(n.style,
@@ -11039,155 +11040,155 @@ mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(
"18px";n.style.padding="10px";n.style.width="340px";mxUtils.write(n,mxResources.get("openExistingDiagram"));mxEvent.addListener(n,"click",function(){b.actions.get("open").funct()});m.appendChild(n);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(x){n.style.marginBottom="24px";var y=document.createElement("a");y.style.display="inline-block";y.style.color="gray";y.style.cursor="pointer";y.style.marginTop="6px";mxUtils.write(y,mxResources.get("signOut"));n.style.marginBottom="16px";m.style.paddingBottom="18px";mxEvent.addListener(y,"click",function(){b.confirm(mxResources.get("areYouSure"),
function(){x()})});m.appendChild(y)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var p=b.drive.getUsersList();if(0<p.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");n.style.marginBottom="16px";m.style.paddingBottom="18px";m.appendChild(c);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(f=0;f<p.length;f++)v=document.createElement("option"),mxUtils.write(v,p[f].displayName),v.value=f,q.appendChild(v),
-v=document.createElement("option"),v.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(v,"<"+p[f].email+">"),v.setAttribute("disabled","disabled"),q.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=p.length;q.appendChild(v);mxEvent.addListener(q,"change",function(){var x=q.value,y=p.length!=x;y&&b.drive.setUser(p[x]);b.drive.authorize(y,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
+v=document.createElement("option"),v.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(v,"<"+p[f].email+">"),v.setAttribute("disabled","disabled"),q.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=p.length;q.appendChild(v);mxEvent.addListener(q,"change",function(){var x=q.value,y=p.length!=x;y&&b.drive.setUser(p[x]);b.drive.authorize(y,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
b.showSplash()})},!0)});m.appendChild(q)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(m);this.container=e},EmbedDialog=function(b,e,f,c,m,n,v,d,g){v=null!=v?v:"Check out the diagram I made using @drawio";c=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=n?mxUtils.write(c,n):mxUtils.write(c,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);n=document.createElement("div");
n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,b.formatFileSize(e.length));c.appendChild(n);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border=
"1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(l.value=e,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=mxResources.get("tooLargeUseDownload"))},0)};n=document.createElement("div");n.style.position="absolute";n.style.bottom="36px";n.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(null!=d?d:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var x=5E5>e.length?l.value:e;if(null!=m)m(x);else if(k)try{var y=b.openLink(x);null!=y&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=y&&null!=y.location.href&&y.location.href.substring(0,8)!=x.substring(0,8)&&(y.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(B){}}),
-f||500)}catch(B){b.handleError({message:B.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),p.className="geBtn",n.appendChild(p));if(!k||7500<e.length)d=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(null!=d?d:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var x=5E5>e.length?l.value:e;if(null!=m)m(x);else if(k)try{var y=b.openLink(x);null!=y&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=y&&null!=y.location.href&&y.location.href.substring(0,8)!=x.substring(0,8)&&(y.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),
+f||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),p.className="geBtn",n.appendChild(p));if(!k||7500<e.length)d=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
b.saveData(null!=g?g:"embed.txt","txt",e,"text/plain")}),d.className="geBtn",n.appendChild(d);if(k&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var q=mxUtils.button("",function(){try{var x="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);b.openLink(x)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}});d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height",
"18");d.setAttribute("border","0");q.appendChild(d);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";n.appendChild(q)}7168>e.length&&(q=mxUtils.button("",function(){try{var x="https://twitter.com/intent/tweet?text="+encodeURIComponent(v)+"&url="+encodeURIComponent(l.value);b.openLink(x)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}}),
d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom="5px",q.appendChild(d),q.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",n.appendChild(q))}!b.isOffline()&&5E5>e.length&&(q=mxUtils.button("",function(){try{var x="mailto:?subject="+encodeURIComponent(g||
b.defaultFilename)+"&body="+encodeURIComponent(l.value);b.openLink(x)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.mailImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom="5px",Editor.isDarkMode()&&(d.style.filter="invert(100%)"),q.appendChild(d),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className=
"geBtn",n.appendChild(q));d=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(d);q=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(n.appendChild(q),q.className="geBtn gePrimaryBtn",
d.className="geBtn"):(n.appendChild(p),d.className="geBtn",p.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function f(){var E=null!=C&&null!=C.getTitle()?C.getTitle():this.defaultFilename;if(z.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=E&&(G+="&title="+encodeURIComponent(E));0<L.length&&(G+="&s="+L);""!=x.value&&"0"!=x.value&&(G+="&border="+x.value);""!=p.value&&(G+="&height="+p.value);G+="&pan="+(y.checked?"1":"0");G+="&zoom="+(A.checked?"1":"0");G+="&fit="+(t.checked?"1":"0");
-G+="&resize="+(O.checked?"1":"0");G+="&x0="+Number(l.value);G+="&y0="+g;m.mathEnabled&&(G+="&math=1");I.checked?G+="&edit=_blank":B.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=G}else C.constructor==DriveFile||C.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=C.getHash().substring(1),G=C.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
-E&&(G+="&title="+encodeURIComponent(E)),""!=p.value&&(E=parseInt(p.value)+parseInt(l.value),G+="&height="+E),k.value=G):k.value=""}var c=document.createElement("div"),m=b.editor.graph,n=m.getGraphBounds(),v=m.view.scale,d=Math.floor(n.x/v-m.view.translate.x),g=Math.floor(n.y/v-m.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.marginTop="2px";k.style.width="410px";
+var GoogleSitesDialog=function(b,e){function f(){var C=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(u.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=C&&(G+="&title="+encodeURIComponent(C));0<D.length&&(G+="&s="+D);""!=x.value&&"0"!=x.value&&(G+="&border="+x.value);""!=p.value&&(G+="&height="+p.value);G+="&pan="+(y.checked?"1":"0");G+="&zoom="+(z.checked?"1":"0");G+="&fit="+(L.checked?"1":"0");
+G+="&resize="+(P.checked?"1":"0");G+="&x0="+Number(l.value);G+="&y0="+g;m.mathEnabled&&(G+="&math=1");K.checked?G+="&edit=_blank":A.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=G}else B.constructor==DriveFile||B.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=B.getHash().substring(1),G=B.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
+C&&(G+="&title="+encodeURIComponent(C)),""!=p.value&&(C=parseInt(p.value)+parseInt(l.value),G+="&height="+C),k.value=G):k.value=""}var c=document.createElement("div"),m=b.editor.graph,n=m.getGraphBounds(),v=m.view.scale,d=Math.floor(n.x/v-m.view.translate.x),g=Math.floor(n.y/v-m.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.marginTop="2px";k.style.width="410px";
c.appendChild(k);mxUtils.br(c);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.setAttribute("size","4");l.style.marginRight="16px";l.style.marginLeft="4px";l.value=d;c.appendChild(l);mxUtils.write(c,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");
p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(n.height/v);c.appendChild(p);mxUtils.br(c);n=document.createElement("hr");n.setAttribute("size","1");n.style.marginBottom="16px";n.style.marginTop="16px";c.appendChild(n);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=e||"";c.appendChild(q);
-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.setAttribute("size","3");x.style.marginBottom="8px";x.style.marginLeft="4px";x.value="0";c.appendChild(x);mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("pan")+" ");var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("zoom")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";B.setAttribute("title",window.location.href);c.appendChild(B);mxUtils.write(c,mxResources.get("edit")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";c.appendChild(I);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("checked","checked");O.defaultChecked=!0;O.style.marginLeft="16px";c.appendChild(O);mxUtils.write(c,mxResources.get("resize")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";c.appendChild(t);mxUtils.write(c,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
-"8px";c.appendChild(z);mxUtils.write(c,mxResources.get("embed")+" ");var L=b.getBasenames().join(";"),C=b.getCurrentFile();mxEvent.addListener(y,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(O,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(I,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(q,"change",f);f();
+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.setAttribute("size","3");x.style.marginBottom="8px";x.style.marginLeft="4px";x.value="0";c.appendChild(x);mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("pan")+" ");var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginLeft="8px";c.appendChild(K);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var 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("resize")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";c.appendChild(L);mxUtils.write(c,mxResources.get("fit")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft=
+"8px";c.appendChild(u);mxUtils.write(c,mxResources.get("embed")+" ");var D=b.getBasenames().join(";"),B=b.getCurrentFile();mxEvent.addListener(y,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(P,"change",f);mxEvent.addListener(L,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(q,"change",f);f();
mxEvent.addListener(k,"click",function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";e.appendChild(n);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var m=document.createElement("div");m.style.position="relative";m.style.border="1px solid gray";m.style.width="100%";m.style.height="360px";m.style.overflow="hidden";m.style.marginBottom="16px";mxEvent.disableContextMenu(m);c.appendChild(m);var n=new Graph(m);n.setCellsCloneable(!0);n.setPanning(!0);n.setAllowDanglingEdges(!1);n.connectionHandler.select=!1;n.view.setTranslate(20,20);n.border=20;n.panningHandler.useLeftButtonForPanning=!0;var v="curved=1;";n.cellRenderer.installCellOverlayListeners=
-function(A,B,I){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(I.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(O){B.fireEvent(new mxEventObject("pointerdown","event",O,"state",A))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(I.node,"touchstart",function(O){B.fireEvent(new mxEventObject("pointerdown","event",O,"state",A))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=
-!1;n.connectionHandler.createEdgeState=function(A){A=n.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var d=n.getDefaultParent(),g=mxUtils.bind(this,function(A){var B=new mxCellOverlay(this.connectImage,"Add outgoing");B.cursor="hand";B.addListener(mxEvent.CLICK,function(I,O){n.connectionHandler.reset();n.clearSelection();var t=n.getCellGeometry(A),z;p(function(){z=n.insertVertex(d,null,"Entry",t.x,t.y,80,30,"rounded=1;");g(z);n.view.refresh(z);
-n.insertEdge(d,null,"",A,z,v)},function(){n.scrollCellToVisible(z)})});B.addListener("pointerdown",function(I,O){I=O.getProperty("event");O=O.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var t=mxUtils.convertPoint(n.container,mxEvent.getClientX(I),mxEvent.getClientY(I));n.connectionHandler.start(O,t.x,t.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(I);mxEvent.consume(I)});n.addCellOverlay(A,B)});n.getModel().beginUpdate();try{var k=n.insertVertex(d,null,"Start",
+function(z,A,K){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(K.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(P){A.fireEvent(new mxEventObject("pointerdown","event",P,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(K.node,"touchstart",function(P){A.fireEvent(new mxEventObject("pointerdown","event",P,"state",z))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=
+!1;n.connectionHandler.createEdgeState=function(z){z=n.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var d=n.getDefaultParent(),g=mxUtils.bind(this,function(z){var A=new mxCellOverlay(this.connectImage,"Add outgoing");A.cursor="hand";A.addListener(mxEvent.CLICK,function(K,P){n.connectionHandler.reset();n.clearSelection();var L=n.getCellGeometry(z),u;p(function(){u=n.insertVertex(d,null,"Entry",L.x,L.y,80,30,"rounded=1;");g(u);n.view.refresh(u);
+n.insertEdge(d,null,"",z,u,v)},function(){n.scrollCellToVisible(u)})});A.addListener("pointerdown",function(K,P){K=P.getProperty("event");P=P.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var L=mxUtils.convertPoint(n.container,mxEvent.getClientX(K),mxEvent.getClientY(K));n.connectionHandler.start(P,L.x,L.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(K);mxEvent.consume(K)});n.addCellOverlay(z,A)});n.getModel().beginUpdate();try{var k=n.insertVertex(d,null,"Start",
0,0,80,30,"ellipse");g(k)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var l=new mxCompactTreeLayout(n);l.edgeRouting=!1;l.levelDistance=30;v="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(l=new mxCompactTreeLayout(n,!1),l.edgeRouting=!1,l.levelDistance=30,v="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(l=new mxRadialTreeLayout(n,!1),l.edgeRouting=!1,l.levelDistance=80):"verticalFlow"==f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"organic"==f?(l=new mxFastOrganicLayout(n,!1),l.forceConstant=80):"circle"==f&&(l=new mxCircleLayout(n));if(null!=l){var p=function(A,B){n.getModel().beginUpdate();try{null!=A&&A(),l.execute(n.getDefaultParent(),k)}catch(I){throw I;}finally{A=new mxMorphing(n),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=B&&B()})),A.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(A,B,I,O,t){q.apply(this,arguments);p()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&c.appendChild(x);var y=mxUtils.button(mxResources.get("insert"),function(A){n.clearCellOverlays();
-var B=n.getModel().getChildren(n.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(B,!0));B=b.editor.graph.importCells(B,A.x,A.y);A=b.editor.graph.view;var I=A.getBounds(B);I.x-=A.translate.x;I.y-=A.translate.y;b.editor.graph.scrollRectToVisible(I);b.editor.graph.setSelectionCells(B);null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()});c.appendChild(y);y.className="geBtn gePrimaryBtn";
+f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"organic"==f?(l=new mxFastOrganicLayout(n,!1),l.forceConstant=80):"circle"==f&&(l=new mxCircleLayout(n));if(null!=l){var p=function(z,A){n.getModel().beginUpdate();try{null!=z&&z(),l.execute(n.getDefaultParent(),k)}catch(K){throw K;}finally{z=new mxMorphing(n),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=A&&A()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(z,A,K,P,L){q.apply(this,arguments);p()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&c.appendChild(x);var y=mxUtils.button(mxResources.get("insert"),function(z){n.clearCellOverlays();
+var A=n.getModel().getChildren(n.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(A,!0));A=b.editor.graph.importCells(A,z.x,z.y);z=b.editor.graph.view;var K=z.getBounds(A);K.x-=z.translate.x;K.y-=z.translate.y;b.editor.graph.scrollRectToVisible(K);b.editor.graph.setSelectionCells(A);null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()});c.appendChild(y);y.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(x)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var m=document.createElement("h2");mxUtils.write(m,mxResources.get("backgroundImage"));m.style.marginTop="0px";c.appendChild(m);var n=null!=f&&null!=f.originalSrc;m=!1;var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");
d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.width="360px";g.value=n||null==f?"":f.src;var k=document.createElement("select");k.style.width="360px";if(null!=b.pages)for(var l=0;l<b.pages.length;l++){var p=document.createElement("option");mxUtils.write(p,b.pages[l].getName()||
-mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=f&&f.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0);k.appendChild(p)}n||null!=b.pages&&1!=b.pages.length||(v.style.display="none",d.style.display="none",k.style.display="none");var q=document.createElement("option"),x=!1,y=!1,A=function(z,L){x||null!=z&&y||(d.checked?null!=L&&L(q.selected?null:
-k.value):""==g.value||b.isOffline()?(I.value="",O.value="",null!=L&&L("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(C){I.value=C.width;O.value=C.height;null!=L&&L(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));I.value="";O.value="";null!=L&&L(null)})))},B=mxUtils.bind(this,function(z){b.importFiles(z,0,0,b.maxBackgroundSize,function(L,C,E,G,P,J){g.value=L;A();g.focus()},function(){},function(L){return"image/"==L.type.substring(0,
-6)},function(L){for(var C=0;C<L.length;C++)L[C]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){n?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var z=c.parentNode,L=null;mxEvent.addListener(z,
-"dragleave",function(C){null!=L&&(L.parentNode.removeChild(L),L=null);C.stopPropagation();C.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(C){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=b.highlightElement(z));C.stopPropagation();C.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(C){null!=L&&(L.parentNode.removeChild(L),L=null);if(0<C.dataTransfer.files.length)B(C.dataTransfer.files);else if(0<=mxUtils.indexOf(C.dataTransfer.types,
-"text/uri-list")){var E=C.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(E)&&(g.value=decodeURIComponent(E),A())}C.stopPropagation();C.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var I=document.createElement("input");I.setAttribute("type","text");I.style.width="60px";I.style.marginLeft="8px";I.style.marginRight="16px";
-I.value=null==f||n?"":f.width;c.appendChild(I);mxUtils.write(c,mxResources.get("height")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.width="60px";O.style.marginLeft="8px";O.style.marginRight="16px";O.value=null==f||n?"":f.height;c.appendChild(O);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(g,"change",A);ImageDialog.filePicked=function(z){z.action==google.picker.Action.PICKED&&null!=z.docs[0].thumbnails&&(z=z.docs[0].thumbnails[z.docs[0].thumbnails.length-1],
-null!=z&&(g.value=z.url,A()));g.focus()};c.appendChild(d);c.appendChild(k);mxUtils.br(c);n?(d.setAttribute("checked","checked"),d.checked=!0):(v.setAttribute("checked","checked"),v.checked=!0);!m&&d.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),k.appendChild(q),mxEvent.addListener(k,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));f=document.createElement("div");
-f.style.marginTop="30px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);l=mxUtils.button(mxResources.get("reset"),function(){g.value="";I.value="";O.value="";v.checked=!0;x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className="geBtn";l.width="100";f.appendChild(l);if(Graph.fileSupport){var t=document.createElement("input");t.setAttribute("multiple","multiple");t.setAttribute("type",
-"file");mxEvent.addListener(t,"change",function(z){null!=t.files&&(B(t.files),t.type="",t.type="file",t.value="")});t.style.display="none";c.appendChild(t);l=mxUtils.button(mxResources.get("open"),function(){t.click()});l.className="geBtn";f.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(z){e(""!=z&&null!=z?new mxImage(z,I.value,O.value):null,null==z)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";
-f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(m);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(x,y,A){var B=x.split("\n");if("plantUmlPng"==y||"plantUmlSvg"==y||"plantUmlTxt"==y){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var I=function(V,M,W,U,X){n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(new mxRectangle(0,0,U,X));var u=null;O.getModel().beginUpdate();try{u="txt"==M?b.insertAsPreText(W,n.x,n.y):O.insertVertex(null,null,null,n.x,n.y,
-U,X,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(W)+";"),O.setAttributeForCell(u,"plantUmlData",JSON.stringify({data:V,format:M},null,2))}finally{O.getModel().endUpdate()}null!=u&&(O.setSelectionCell(u),O.scrollCellToVisible(u))},O=b.editor.graph,t="plantUmlTxt"==y?"txt":"plantUmlPng"==y?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-x&&"svg"==t?window.setTimeout(function(){b.spinner.stop();I(x,t,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(x,t,function(V,M,W){b.spinner.stop();I(x,t,V,M,W)},function(V){b.handleError(V)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(O=b.editor.graph,b.generateMermaidImage(x,t,function(V,M,W){n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(new mxRectangle(0,0,M,W));b.spinner.stop();var U=null;O.getModel().beginUpdate();try{U=O.insertVertex(null,null,null,n.x,n.y,M,W,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-V+";"),O.setAttributeForCell(U,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{O.getModel().endUpdate()}null!=U&&(O.setSelectionCell(U),O.scrollCellToVisible(U))},function(V){b.handleError(V)}));else if("table"==y){y=null;for(var z=[],L=0,C={},E=0;E<B.length;E++){var G=mxUtils.trim(B[E]);if("primary key"==G.substring(0,11).toLowerCase()){var P=G.match(/\((.+)\)/);P&&P[1]&&(C[P[1]]=!0);B.splice(E,1)}else 0<G.toLowerCase().indexOf("primary key")&&(C[G.split(" ")[0]]=
-!0,B[E]=mxUtils.trim(G.replace(/primary key/i,"")))}for(E=0;E<B.length;E++)if(G=mxUtils.trim(B[E]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(L,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,z.push(y),G=b.editor.graph.getPreferredSizeForCell(J),null!=
-G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))L+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);P=C[G.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(P?"1":"0")+";");J.vertex=!0;var F=new mxCell(P?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(P?"fontStyle=1;":""));F.vertex=!0;J.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(P?"fontStyle=5;":""));G.vertex=!0;J.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
-Math.max(y.geometry.width,G.width+30)));y.insert(J,P?0:null);y.geometry.height+=30}0<z.length&&(O=b.editor.graph,n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(z,!0)),O.setSelectionCells(O.importCells(z,n.x,n.y)),O.scrollCellToVisible(O.getSelectionCell()))}else if("list"==y){if(0<B.length){O=b.editor.graph;J=null;z=[];for(E=y=0;E<B.length;E++)";"!=B[E].charAt(0)&&(0==B[E].length?J=null:null==J?(J=new mxCell(B[E],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-J.vertex=!0,z.push(J),G=O.getPreferredSizeForCell(J),null!=G&&J.geometry.width<G.width+10&&(J.geometry.width=G.width+10),y+=J.geometry.width+40):"--"==B[E]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,J.geometry.height+=G.geometry.height,J.insert(G)):0<B[E].length&&(L=new mxCell(B[E],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;"),
-L.vertex=!0,G=O.getPreferredSizeForCell(L),null!=G&&L.geometry.width<G.width&&(L.geometry.width=G.width),J.geometry.width=Math.max(J.geometry.width,L.geometry.width),J.geometry.height+=L.geometry.height,J.insert(L)));if(0<z.length){n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(z,!0));O.getModel().beginUpdate();try{z=O.importCells(z,n.x,n.y);G=[];for(E=0;E<z.length;E++)G.push(z[E]),G=G.concat(z[E].children);O.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{O.getModel().endUpdate()}O.setSelectionCells(z);
-O.scrollCellToVisible(O.getSelectionCell())}}}else{J=function(V){var M=H[V];null==M&&(M=new mxCell(V,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),M.vertex=!0,H[V]=M,z.push(M));return M};var H={};z=[];for(E=0;E<B.length;E++)if(";"!=B[E].charAt(0)){var S=B[E].split("->");2<=S.length&&(P=J(S[0]),F=J(S[S.length-1]),S=new mxCell(2<S.length?S[1]:"",new mxGeometry),S.edge=!0,P.insertEdge(S,!0),F.insertEdge(S,!1),z.push(S))}if(0<z.length){B=document.createElement("div");B.style.visibility="hidden";
-document.body.appendChild(B);O=new Graph(B);O.getModel().beginUpdate();try{z=O.importCells(z);for(E=0;E<z.length;E++)O.getModel().isVertex(z[E])&&(G=O.getPreferredSizeForCell(z[E]),z[E].geometry.width=Math.max(z[E].geometry.width,G.width),z[E].geometry.height=Math.max(z[E].geometry.height,G.height));E=!0;"horizontalFlow"==y||"verticalFlow"==y?((new mxHierarchicalLayout(O,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(O.getDefaultParent(),z),E=!1):"circle"==y?
-(new mxCircleLayout(O)).execute(O.getDefaultParent()):(L=new mxFastOrganicLayout(O),L.disableEdgeStyle=!1,L.forceConstant=180,L.execute(O.getDefaultParent()));E&&(C=new mxParallelEdgeLayout(O),C.spacing=30,C.execute(O.getDefaultParent()))}finally{O.getModel().endUpdate()}O.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{z=O.getModel().getChildren(O.getDefaultParent()),n=mxEvent.isAltDown(A)?n:b.editor.graph.getCenterInsertPoint(O.getBoundingBoxFromGeometry(z,!0)),G=b.editor.graph.importCells(z,
-n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());O.destroy();B.parentNode.removeChild(B)}}}function m(){return"list"==d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?
+mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=f&&f.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0);k.appendChild(p)}n||null!=b.pages&&1!=b.pages.length||(v.style.display="none",d.style.display="none",k.style.display="none");var q=document.createElement("option"),x=!1,y=!1,z=function(u,D){x||null!=u&&y||(d.checked?null!=D&&D(q.selected?null:
+k.value):""==g.value||b.isOffline()?(K.value="",P.value="",null!=D&&D("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(B){K.value=B.width;P.value=B.height;null!=D&&D(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));K.value="";P.value="";null!=D&&D(null)})))},A=mxUtils.bind(this,function(u){b.importFiles(u,0,0,b.maxBackgroundSize,function(D,B,C,G,N,I){g.value=D;z();g.focus()},function(){},function(D){return"image/"==D.type.substring(0,
+6)},function(D){for(var B=0;B<D.length;B++)D[B]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){n?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var u=c.parentNode,D=null;mxEvent.addListener(u,
+"dragleave",function(B){null!=D&&(D.parentNode.removeChild(D),D=null);B.stopPropagation();B.preventDefault()});mxEvent.addListener(u,"dragover",mxUtils.bind(this,function(B){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(u));B.stopPropagation();B.preventDefault()}));mxEvent.addListener(u,"drop",mxUtils.bind(this,function(B){null!=D&&(D.parentNode.removeChild(D),D=null);if(0<B.dataTransfer.files.length)A(B.dataTransfer.files);else if(0<=mxUtils.indexOf(B.dataTransfer.types,
+"text/uri-list")){var C=B.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(C)&&(g.value=decodeURIComponent(C),z())}B.stopPropagation();B.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var K=document.createElement("input");K.setAttribute("type","text");K.style.width="60px";K.style.marginLeft="8px";K.style.marginRight="16px";
+K.value=null==f||n?"":f.width;c.appendChild(K);mxUtils.write(c,mxResources.get("height")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.width="60px";P.style.marginLeft="8px";P.style.marginRight="16px";P.value=null==f||n?"":f.height;c.appendChild(P);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(g,"change",z);ImageDialog.filePicked=function(u){u.action==google.picker.Action.PICKED&&null!=u.docs[0].thumbnails&&(u=u.docs[0].thumbnails[u.docs[0].thumbnails.length-1],
+null!=u&&(g.value=u.url,z()));g.focus()};c.appendChild(d);c.appendChild(k);mxUtils.br(c);n?(d.setAttribute("checked","checked"),d.checked=!0):(v.setAttribute("checked","checked"),v.checked=!0);!m&&d.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),k.appendChild(q),mxEvent.addListener(k,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));f=document.createElement("div");
+f.style.marginTop="30px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);l=mxUtils.button(mxResources.get("reset"),function(){g.value="";K.value="";P.value="";v.checked=!0;x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className="geBtn";l.width="100";f.appendChild(l);if(Graph.fileSupport){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
+"file");mxEvent.addListener(L,"change",function(u){null!=L.files&&(A(L.files),L.type="",L.type="file",L.value="")});L.style.display="none";c.appendChild(L);l=mxUtils.button(mxResources.get("open"),function(){L.click()});l.className="geBtn";f.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(u){e(""!=u&&null!=u?new mxImage(u,K.value,P.value):null,null==u)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";
+f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(m);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(x,y,z){var A=x.split("\n");if("plantUmlPng"==y||"plantUmlSvg"==y||"plantUmlTxt"==y){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var K=function(W,J,V,U,X){n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(new mxRectangle(0,0,U,X));var t=null;P.getModel().beginUpdate();try{t="txt"==J?b.insertAsPreText(V,n.x,n.y):P.insertVertex(null,null,null,n.x,n.y,
+U,X,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),P.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:W,format:J},null,2))}finally{P.getModel().endUpdate()}null!=t&&(P.setSelectionCell(t),P.scrollCellToVisible(t))},P=b.editor.graph,L="plantUmlTxt"==y?"txt":"plantUmlPng"==y?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+x&&"svg"==L?window.setTimeout(function(){b.spinner.stop();K(x,L,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(x,L,function(W,J,V){b.spinner.stop();K(x,L,W,J,V)},function(W){b.handleError(W)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(P=b.editor.graph,b.generateMermaidImage(x,L,function(W,J,V){n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(new mxRectangle(0,0,J,V));b.spinner.stop();var U=null;P.getModel().beginUpdate();try{U=P.insertVertex(null,null,null,n.x,n.y,J,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+W+";"),P.setAttributeForCell(U,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{P.getModel().endUpdate()}null!=U&&(P.setSelectionCell(U),P.scrollCellToVisible(U))},function(W){b.handleError(W)}));else if("table"==y){y=null;for(var u=[],D=0,B={},C=0;C<A.length;C++){var G=mxUtils.trim(A[C]);if("primary key"==G.substring(0,11).toLowerCase()){var N=G.match(/\((.+)\)/);N&&N[1]&&(B[N[1]]=!0);A.splice(C,1)}else 0<G.toLowerCase().indexOf("primary key")&&(B[G.split(" ")[0]]=
+!0,A[C]=mxUtils.trim(G.replace(/primary key/i,"")))}for(C=0;C<A.length;C++)if(G=mxUtils.trim(A[C]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(D,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,u.push(y),G=b.editor.graph.getPreferredSizeForCell(I),null!=
+G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))D+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);N=B[G.split(" ")[0]];var I=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(N?"1":"0")+";");I.vertex=!0;var F=new mxCell(N?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(N?"fontStyle=1;":""));F.vertex=!0;I.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(N?"fontStyle=5;":""));G.vertex=!0;I.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
+Math.max(y.geometry.width,G.width+30)));y.insert(I,N?0:null);y.geometry.height+=30}0<u.length&&(P=b.editor.graph,n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(P.getBoundingBoxFromGeometry(u,!0)),P.setSelectionCells(P.importCells(u,n.x,n.y)),P.scrollCellToVisible(P.getSelectionCell()))}else if("list"==y){if(0<A.length){P=b.editor.graph;I=null;u=[];for(C=y=0;C<A.length;C++)";"!=A[C].charAt(0)&&(0==A[C].length?I=null:null==I?(I=new mxCell(A[C],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+I.vertex=!0,u.push(I),G=P.getPreferredSizeForCell(I),null!=G&&I.geometry.width<G.width+10&&(I.geometry.width=G.width+10),y+=I.geometry.width+40):"--"==A[C]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,I.geometry.height+=G.geometry.height,I.insert(G)):0<A[C].length&&(D=new mxCell(A[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+D.vertex=!0,G=P.getPreferredSizeForCell(D),null!=G&&D.geometry.width<G.width&&(D.geometry.width=G.width),I.geometry.width=Math.max(I.geometry.width,D.geometry.width),I.geometry.height+=D.geometry.height,I.insert(D)));if(0<u.length){n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(P.getBoundingBoxFromGeometry(u,!0));P.getModel().beginUpdate();try{u=P.importCells(u,n.x,n.y);G=[];for(C=0;C<u.length;C++)G.push(u[C]),G=G.concat(u[C].children);P.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{P.getModel().endUpdate()}P.setSelectionCells(u);
+P.scrollCellToVisible(P.getSelectionCell())}}}else{I=function(W){var J=H[W];null==J&&(J=new mxCell(W,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),J.vertex=!0,H[W]=J,u.push(J));return J};var H={};u=[];for(C=0;C<A.length;C++)if(";"!=A[C].charAt(0)){var R=A[C].split("->");2<=R.length&&(N=I(R[0]),F=I(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,N.insertEdge(R,!0),F.insertEdge(R,!1),u.push(R))}if(0<u.length){A=document.createElement("div");A.style.visibility="hidden";
+document.body.appendChild(A);P=new Graph(A);P.getModel().beginUpdate();try{u=P.importCells(u);for(C=0;C<u.length;C++)P.getModel().isVertex(u[C])&&(G=P.getPreferredSizeForCell(u[C]),u[C].geometry.width=Math.max(u[C].geometry.width,G.width),u[C].geometry.height=Math.max(u[C].geometry.height,G.height));C=!0;"horizontalFlow"==y||"verticalFlow"==y?((new mxHierarchicalLayout(P,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(P.getDefaultParent(),u),C=!1):"circle"==y?
+(new mxCircleLayout(P)).execute(P.getDefaultParent()):(D=new mxFastOrganicLayout(P),D.disableEdgeStyle=!1,D.forceConstant=180,D.execute(P.getDefaultParent()));C&&(B=new mxParallelEdgeLayout(P),B.spacing=30,B.execute(P.getDefaultParent()))}finally{P.getModel().endUpdate()}P.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{u=P.getModel().getChildren(P.getDefaultParent()),n=mxEvent.isAltDown(z)?n:b.editor.graph.getCenterInsertPoint(P.getBoundingBoxFromGeometry(u,!0)),G=b.editor.graph.importCells(u,
+n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());P.destroy();A.parentNode.removeChild(A)}}}function m(){return"list"==d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==d.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==d.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"==d.value||"plantUmlTxt"==d.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 n=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var v=document.createElement("textarea");v.style.boxSizing="border-box";v.style.resize=
"none";v.style.width="100%";v.style.height="354px";v.style.marginBottom="16px";var d=document.createElement("select");if("formatSql"==f||"mermaid"==f)d.style.display="none";var g=document.createElement("option");g.setAttribute("value","list");mxUtils.write(g,mxResources.get("list"));"plantUml"!=f&&d.appendChild(g);null!=f&&"fromText"!=f||g.setAttribute("selected","selected");g=document.createElement("option");g.setAttribute("value","table");mxUtils.write(g,mxResources.get("formatSql"));"formatSql"==
f&&(d.appendChild(g),g.setAttribute("selected","selected"));g=document.createElement("option");g.setAttribute("value","mermaid");mxUtils.write(g,mxResources.get("formatSql"));"mermaid"==f&&(d.appendChild(g),g.setAttribute("selected","selected"));g=document.createElement("option");g.setAttribute("value","diagram");mxUtils.write(g,mxResources.get("diagram"));var k=document.createElement("option");k.setAttribute("value","circle");mxUtils.write(k,mxResources.get("circle"));var l=document.createElement("option");
l.setAttribute("value","horizontalFlow");mxUtils.write(l,mxResources.get("horizontalFlow"));var p=document.createElement("option");p.setAttribute("value","verticalFlow");mxUtils.write(p,mxResources.get("verticalFlow"));"plantUml"!=f&&(d.appendChild(g),d.appendChild(k),d.appendChild(l),d.appendChild(p));g=document.createElement("option");g.setAttribute("value","plantUmlSvg");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&g.setAttribute("selected",
"selected");k=document.createElement("option");k.setAttribute("value","plantUmlPng");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");l=document.createElement("option");l.setAttribute("value","plantUmlTxt");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(d.appendChild(g),d.appendChild(k),d.appendChild(l));var q=m();v.value=q;e.appendChild(v);this.init=function(){v.focus()};
-Graph.fileSupport&&(v.addEventListener("dragover",function(x){x.stopPropagation();x.preventDefault()},!1),v.addEventListener("drop",function(x){x.stopPropagation();x.preventDefault();if(0<x.dataTransfer.files.length){x=x.dataTransfer.files[0];var y=new FileReader;y.onload=function(A){v.value=A.target.result};y.readAsText(x)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var x=m();if(0==v.value.length||v.value==q)q=x,v.value=q});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(g=mxUtils.button(mxResources.get("help"),
+Graph.fileSupport&&(v.addEventListener("dragover",function(x){x.stopPropagation();x.preventDefault()},!1),v.addEventListener("drop",function(x){x.stopPropagation();x.preventDefault();if(0<x.dataTransfer.files.length){x=x.dataTransfer.files[0];var y=new FileReader;y.onload=function(z){v.value=z.target.result};y.readAsText(x)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var x=m();if(0==v.value.length||v.value==q)q=x,v.value=q});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(g=mxUtils.button(mxResources.get("help"),
function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),function(){v.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&e.appendChild(g);k=mxUtils.button(mxResources.get("insert"),function(x){b.hideDialog();c(v.value,d.value,x)});e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,A,B,I){function O(oa){null!=oa&&(Da=qa=oa?135:140);oa=!0;if(null!=La)for(;H<La.length&&(oa||0!=mxUtils.mod(H,30));){var sa=La[H++];sa=L(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);oa&&sa.click();oa=!1}}function t(){if(Y&&null!=x)f||b.hideDialog(),x(Y,ea,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ba,T);else{var oa=F.value;null!=oa&&
-0<oa.length&&b.pickFolder(b.mode,function(sa){b.createFile(oa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=N&&0<N.length?N:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function z(oa,sa,ya,wa,ua,xa,ha){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");V.removeAttribute("disabled");Q=sa;T=ya;N=xa;R=oa;Y=wa;ba=ha;ea=ua;R.style.backgroundColor=d;R.style.border=g}function L(oa,sa,ya,wa,ua,xa,ha,da,
+e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A,K){function P(oa){null!=oa&&(Da=qa=oa?135:140);oa=!0;if(null!=La)for(;H<La.length&&(oa||0!=mxUtils.mod(H,30));){var sa=La[H++];sa=D(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);oa&&sa.click();oa=!1}}function L(){if(Y&&null!=x)f||b.hideDialog(),x(Y,ea,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ba,T);else{var oa=F.value;null!=oa&&
+0<oa.length&&b.pickFolder(b.mode,function(sa){b.createFile(oa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=O&&0<O.length?O:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function u(oa,sa,ya,wa,ua,xa,ha){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");W.removeAttribute("disabled");Q=sa;T=ya;O=xa;S=oa;Y=wa;ba=ha;ea=ua;S.style.backgroundColor=d;S.style.border=g}function D(oa,sa,ya,wa,ua,xa,ha,da,
ca,la,ia){function ma(Ma,Ta){null==Ka?(Ia=Ma,Ia=/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)?PROXY_URL+"?url="+encodeURIComponent(Ia):TEMPLATE_PATH+"/"+Ia,mxUtils.get(Ia,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ka=Ua.getText());Ta(Ka,Ia)}))):Ta(Ka,Ia)}function ra(Ma,Ta,Ua){if(null!=Ma&&mxUtils.isAncestorNode(document.body,na)){Ma=mxUtils.parseXml(Ma);Ma=Editor.parseDiagramNode(Ma.documentElement);var Za=new mxCodec(Ma.ownerDocument),Wa=new mxGraphModel;
-Za.decode(Ma,Wa);Ma=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,Ma,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;z(na,null,null,oa,ha,ia)},!0,!1)}}function pa(Ma,Ta){null==oa||Ra||
+Za.decode(Ma,Wa);Ma=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,Ma,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;u(na,null,null,oa,ha,ia)},!0,!1)}}function pa(Ma,Ta){null==oa||Ra||
b.sidebar.currentElt==na?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Sa?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Sa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Sa.naturalWidth+'" height="'+Sa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ra(Ta,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma))):(b.sidebar.currentElt=
na,Ra=!0,ma(oa,function(Ua){Ra&&b.sidebar.currentElt==na&&ra(Ua,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma));Ra=!1})))}var na=document.createElement("div");na.className="geTemplate";na.style.position="relative";na.style.height=Da+"px";na.style.width=qa+"px";var Ka=null,Ia=oa;Editor.isDarkMode()&&(na.style.filter="invert(100%)");null!=ya?na.setAttribute("title",mxResources.get(ya,null,ya)):null!=wa&&0<wa.length&&na.setAttribute("title",wa);var Ra=!1,Sa=null;if(null!=xa){na.style.display="inline-flex";
-na.style.justifyContent="center";na.style.alignItems="center";ua=document.createElement("img");ua.setAttribute("src",xa);ua.setAttribute("alt",wa);ua.style.maxWidth=Da+"px";ua.style.maxHeight=qa+"px";Sa=ua;var Ja=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ua);ua.onerror=function(){this.src!=Ja?this.src=Ja:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){z(na,null,null,oa,ha,ia)}),null,null);mxEvent.addListener(na,
-"dblclick",function(Ma){t();mxEvent.consume(Ma)})}else if(!la&&null!=oa&&0<oa.length){var Oa=function(Ma){V.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";S.spin(Z);ma(oa,function(Ta,Ua){S.stop();null!=Ta&&(z(na,Ta,sa,null,null,ia,Ua),Ma&&t())})};ua=ca||TEMPLATE_PATH+"/"+oa.substring(0,oa.length-4)+".png";na.style.backgroundImage="url("+ua+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!=
+na.style.justifyContent="center";na.style.alignItems="center";ua=document.createElement("img");ua.setAttribute("src",xa);ua.setAttribute("alt",wa);ua.style.maxWidth=Da+"px";ua.style.maxHeight=qa+"px";Sa=ua;var Ja=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ua);ua.onerror=function(){this.src!=Ja?this.src=Ja:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){u(na,null,null,oa,ha,ia)}),null,null);mxEvent.addListener(na,
+"dblclick",function(Ma){L();mxEvent.consume(Ma)})}else if(!la&&null!=oa&&0<oa.length){var Oa=function(Ma){W.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";R.spin(Z);ma(oa,function(Ta,Ua){R.stop();null!=Ta&&(u(na,Ta,sa,null,null,ia,Ua),Ma&&L())})};ua=ca||TEMPLATE_PATH+"/"+oa.substring(0,oa.length-4)+".png";na.style.backgroundImage="url("+ua+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!=
ya){wa=document.createElement("table");wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";xa=document.createElement("tbody");ca=document.createElement("tr");la=document.createElement("td");la.setAttribute("align","center");la.setAttribute("valign","middle");var Pa=document.createElement("span");Pa.style.display="inline-block";Pa.style.padding="4px 8px 4px 8px";
Pa.style.userSelect="none";Pa.style.borderRadius="3px";Pa.style.background="rgba(255,255,255,0.85)";Pa.style.overflow="hidden";Pa.style.textOverflow="ellipsis";Pa.style.maxWidth=Da-34+"px";mxUtils.write(Pa,mxResources.get(ya,null,ya));la.appendChild(Pa);ca.appendChild(la);xa.appendChild(ca);wa.appendChild(xa);na.appendChild(wa)}mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){Oa()}),null,null);mxEvent.addListener(na,"dblclick",function(Ma){Oa(!0);mxEvent.consume(Ma)})}else wa=document.createElement("table"),
wa.setAttribute("width","100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",xa=document.createElement("tbody"),ca=document.createElement("tr"),la=document.createElement("td"),la.setAttribute("align","center"),la.setAttribute("valign","middle"),Pa=document.createElement("span"),Pa.style.display="inline-block",Pa.style.padding="4px 8px 4px 8px",Pa.style.userSelect="none",Pa.style.borderRadius="3px",Pa.style.background="#ffffff",Pa.style.overflow="hidden",Pa.style.textOverflow="ellipsis",
-Pa.style.maxWidth=Da-34+"px",mxUtils.write(Pa,mxResources.get(ya,null,ya)),la.appendChild(Pa),ca.appendChild(la),xa.appendChild(ca),wa.appendChild(xa),na.appendChild(wa),ua&&z(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){z(na,null,null,oa,ha)}),null,null),null!=da?mxEvent.addListener(na,"click",da):(mxEvent.addListener(na,"click",function(Ma){z(na,null,null,oa,ha)}),mxEvent.addListener(na,"dblclick",function(Ma){t();mxEvent.consume(Ma)}));if(null!=oa){var Qa=document.createElement("img");
+Pa.style.maxWidth=Da-34+"px",mxUtils.write(Pa,mxResources.get(ya,null,ya)),la.appendChild(Pa),ca.appendChild(la),xa.appendChild(ca),wa.appendChild(xa),na.appendChild(wa),ua&&u(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){u(na,null,null,oa,ha)}),null,null),null!=da?mxEvent.addListener(na,"click",da):(mxEvent.addListener(na,"click",function(Ma){u(na,null,null,oa,ha)}),mxEvent.addListener(na,"dblclick",function(Ma){L();mxEvent.consume(Ma)}));if(null!=oa){var Qa=document.createElement("img");
Qa.setAttribute("src",Sidebar.prototype.searchImage);Qa.setAttribute("title",mxResources.get("preview"));Qa.className="geActiveButton";Qa.style.position="absolute";Qa.style.cursor="default";Qa.style.padding="8px";Qa.style.right="0px";Qa.style.top="0px";na.appendChild(Qa);var Ya=!1;mxEvent.addGestureListeners(Qa,mxUtils.bind(this,function(Ma){Ya=b.sidebar.currentElt==na}),null,null);mxEvent.addListener(Qa,"click",mxUtils.bind(this,function(Ma){Ya||pa(Ma,Qa);mxEvent.consume(Ma)}))}Z.appendChild(na);
-return na}function C(){function oa(pa,na){var Ka=mxResources.get(pa);null==Ka&&(Ka=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ka.length&&(Ka=Ka.substring(0,18)+"&hellip;");return Ka+" ("+na.length+")"}function sa(pa,na,Ka){mxEvent.addListener(na,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ka?Aa[pa][Ka]:Ca[pa],W=null,O(!1))})}Ga&&(Ga=!1,mxEvent.addListener(Z,"scroll",function(pa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
-(O(),mxEvent.consume(pa))}));if(0<Na){var ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,mxResources.get("custom"));Ba.appendChild(ya);for(var wa in Ha){var ua=document.createElement("div"),xa=wa;ya=Ha[wa];18<xa.length&&(xa=xa.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-ua.setAttribute("title",xa+" ("+ya.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=k&&(ua.style.padding=k);Ba.appendChild(ua);(function(pa,na){mxEvent.addListener(ua,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ha[pa],W=null,O(!1))})})(wa,ua)}ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,"draw.io");Ba.appendChild(ya)}for(wa in Ca){xa=
+return na}function B(){function oa(pa,na){var Ka=mxResources.get(pa);null==Ka&&(Ka=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ka.length&&(Ka=Ka.substring(0,18)+"&hellip;");return Ka+" ("+na.length+")"}function sa(pa,na,Ka){mxEvent.addListener(na,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ka?Aa[pa][Ka]:Ca[pa],V=null,P(!1))})}Ga&&(Ga=!1,mxEvent.addListener(Z,"scroll",function(pa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
+(P(),mxEvent.consume(pa))}));if(0<Na){var ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,mxResources.get("custom"));Ba.appendChild(ya);for(var wa in Ha){var ua=document.createElement("div"),xa=wa;ya=Ha[wa];18<xa.length&&(xa=xa.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+ua.setAttribute("title",xa+" ("+ya.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=k&&(ua.style.padding=k);Ba.appendChild(ua);(function(pa,na){mxEvent.addListener(ua,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ha[pa],V=null,P(!1))})})(wa,ua)}ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,"draw.io");Ba.appendChild(ya)}for(wa in Ca){xa=
Aa[wa];var ha=ua=document.createElement(xa?"ul":"div");ya=Ca[wa];var da=oa(wa,ya);if(null!=xa){var ca=document.createElement("li"),la=document.createElement("div");la.className="geTempTreeCaret";la.setAttribute("title",da);mxUtils.write(la,da);ha=la;ca.appendChild(la);da=document.createElement("ul");da.className="geTempTreeNested";da.style.visibility="hidden";for(var ia in xa){var ma=document.createElement("li"),ra=oa(ia,xa[ia]);ma.setAttribute("title",ra);mxUtils.write(ma,ra);sa(wa,ma,ia);da.appendChild(ma)}ca.appendChild(da);
ua.className="geTempTree";ua.appendChild(ca);(function(pa,na){mxEvent.addListener(na,"click",function(){pa.style.visibility="visible";pa.classList.toggle("geTempTreeActive");pa.classList.toggle("geTempTreeNested")&&setTimeout(function(){pa.style.visibility="hidden"},550);na.classList.toggle("geTempTreeCaret-down")})})(da,la)}else ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-ua.setAttribute("title",da),mxUtils.write(ua,da);null!=k&&(ua.style.padding=k);Ba.appendChild(ua);null==Fa&&0<ya.length&&(Fa=ua,Fa.style.backgroundColor=v,La=ya);sa(wa,ha)}O(!1)}var E=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
-G.style.userSelect="none";G.style.height="100%";var P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.height="46px";f&&G.appendChild(P);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||E||!f||P.appendChild(J);f&&mxUtils.write(P,(E?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+J);F.style.marginLeft="10px";F.style.width=e||
-E?"144px":"244px";this.init=function(){f&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(oa){b.sidebar.hideTooltip()}),null,null)};f&&(P.appendChild(F),I?F.style.width=e||E?"350px":"450px":(null!=b.editor.diagramFileTypes&&(I=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),I.style.marginLeft=
-"6px",I.style.width=e||E?"80px":"180px",P.appendChild(I)),null!=b.editor.fileExtensions&&(E=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),E.style.marginTop="12px",P.appendChild(E))));P=!1;var H=0,S=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}),V=mxUtils.button(A||mxResources.get("create"),function(){V.setAttribute("disabled","disabled");t();V.removeAttribute("disabled")});V.className="geBtn gePrimaryBtn";
-if(p||q){var M=[],W=null,U=null,X=null,u=function(oa){V.setAttribute("disabled","disabled");for(var sa=0;sa<M.length;sa++)M[sa].className=sa==oa?"geBtn gePrimaryBtn":"geBtn"};P=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);E=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ba.style.display="";fa.style.display="";Z.style.left="160px";u(0);Z.scrollTop=0;Z.innerHTML="";H=0;W!=La&&(La=W,Ca=U,Na=X,Ba.innerHTML="",C(),W=null)});
-M.push(E);A.appendChild(E);var D=function(oa){Ba.style.display="none";fa.style.display="none";Z.style.left="30px";u(oa?-1:1);null==W&&(W=La);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,wa,ua){H=0;S.stop();La=ya;ua=ua||{};var xa=0,ha;for(ha in ua)xa+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Ba.style.display="";Z.style.left="160px";Ba.innerHTML="";
-Na=0;Ca={"draw.io":ya};for(ha in ua)Ca[ha]=ua[ha];C()}else O(!0)};oa?q(K.value,sa):p(sa)};p&&(E=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){D()}),A.appendChild(E),M.push(E));if(q){E=document.createElement("span");E.style.marginLeft="10px";E.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(E);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(oa){13==
-oa.keyCode&&D(!0)});A.appendChild(K);E=mxUtils.button(mxResources.get("search"),function(){D(!0)});E.className="geBtn";A.appendChild(E)}u(0)}var T=null,N=null,Q=null,R=null,Y=null,ba=null,ea=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";A=(f?72:40)+(P?30:0);Z.style.top=A+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var fa=document.createElement("div");
-fa.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");fa.appendChild(aa);var va=document.createElement("img"),ja="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";va.setAttribute("src",
+ua.setAttribute("title",da),mxUtils.write(ua,da);null!=k&&(ua.style.padding=k);Ba.appendChild(ua);null==Fa&&0<ya.length&&(Fa=ua,Fa.style.backgroundColor=v,La=ya);sa(wa,ha)}P(!1)}var C=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
+G.style.userSelect="none";G.style.height="100%";var N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.height="46px";f&&G.appendChild(N);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight="10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
+IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||C||!f||N.appendChild(I);f&&mxUtils.write(N,(C?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+I);F.style.marginLeft="10px";F.style.width=e||
+C?"144px":"244px";this.init=function(){f&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(oa){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(F),K?F.style.width=e||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(K=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),K.style.marginLeft=
+"6px",K.style.width=e||C?"80px":"180px",N.appendChild(K)),null!=b.editor.fileExtensions&&(C=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),C.style.marginTop="12px",N.appendChild(C))));N=!1;var H=0,R=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(z||mxResources.get("create"),function(){W.setAttribute("disabled","disabled");L();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
+if(p||q){var J=[],V=null,U=null,X=null,t=function(oa){W.setAttribute("disabled","disabled");for(var sa=0;sa<J.length;sa++)J[sa].className=sa==oa?"geBtn gePrimaryBtn":"geBtn"};N=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ba.style.display="";fa.style.display="";Z.style.left="160px";t(0);Z.scrollTop=0;Z.innerHTML="";H=0;V!=La&&(La=V,Ca=U,Na=X,Ba.innerHTML="",B(),V=null)});
+J.push(C);z.appendChild(C);var E=function(oa){Ba.style.display="none";fa.style.display="none";Z.style.left="30px";t(oa?-1:1);null==V&&(V=La);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var sa=function(ya,wa,ua){H=0;R.stop();La=ya;ua=ua||{};var xa=0,ha;for(ha in ua)xa+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Ba.style.display="";Z.style.left="160px";Ba.innerHTML="";
+Na=0;Ca={"draw.io":ya};for(ha in ua)Ca[ha]=ua[ha];B()}else P(!0)};oa?q(M.value,sa):p(sa)};p&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),z.appendChild(C),J.push(C));if(q){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(C);var M=document.createElement("input");M.style.marginRight="10px";M.style.marginLeft="10px";M.style.width="220px";mxEvent.addListener(M,"keypress",function(oa){13==
+oa.keyCode&&E(!0)});z.appendChild(M);C=mxUtils.button(mxResources.get("search"),function(){E(!0)});C.className="geBtn";z.appendChild(C)}t(0)}var T=null,O=null,Q=null,S=null,Y=null,ba=null,ea=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";z=(f?72:40)+(N?30:0);Z.style.top=z+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var fa=document.createElement("div");
+fa.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");fa.appendChild(aa);var va=document.createElement("img"),ja="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";va.setAttribute("src",
ja);va.setAttribute("title",mxResources.get("search"));va.style.position="relative";va.style.left="-18px";va.style.top="1px";va.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(va);mxEvent.addListener(va,"click",function(){va.getAttribute("src")==Dialog.prototype.closeImage&&(va.setAttribute("src",ja),va.setAttribute("title",mxResources.get("search")),aa.value="",null!=Ea&&(Ea.click(),Ea=null));aa.focus()});mxEvent.addListener(aa,"keydown",mxUtils.bind(this,function(oa){if(13==
oa.keyCode){var sa=aa.value;if(""==sa)null!=Ea&&(Ea.click(),Ea=null);else{if(null==NewDialog.tagsList[l]){var ya={};for(ia in Ca)for(var wa=Ca[ia],ua=0;ua<wa.length;ua++){var xa=wa[ua];if(null!=xa.tags)for(var ha=xa.tags.toLowerCase().split(";"),da=0;da<ha.length;da++)null==ya[ha[da]]&&(ya[ha[da]]=[]),ya[ha[da]].push(xa)}NewDialog.tagsList[l]=ya}var ca=sa.toLowerCase().split(" ");ya=NewDialog.tagsList[l];if(0<Na&&null==ya.__tagsList__){for(ia in Ha)for(wa=Ha[ia],ua=0;ua<wa.length;ua++)for(xa=wa[ua],
ha=xa.title.split(" "),ha.push(ia),da=0;da<ha.length;da++){var la=ha[da].toLowerCase();null==ya[la]&&(ya[la]=[]);ya[la].push(xa)}ya.__tagsList__=!0}var ia=[];wa={};for(ua=ha=0;ua<ca.length;ua++)if(0<ca[ua].length){la=ya[ca[ua]];var ma={};ia=[];if(null!=la)for(da=0;da<la.length;da++)xa=la[da],0==ha==(null==wa[xa.url])&&(ma[xa.url]=!0,ia.push(xa));wa=ma;ha++}Z.scrollTop=0;Z.innerHTML="";H=0;ya=document.createElement("div");ya.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
-mxUtils.write(ya,mxResources.get(0==ia.length?"noResultsFor":"resultsFor",[sa]));Z.appendChild(ya);null!=Fa&&null==Ea&&(Fa.style.backgroundColor="",Ea=Fa,Fa=ya);La=ia;W=null;O(!1)}mxEvent.consume(oa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(oa){""==aa.value?(va.setAttribute("src",ja),va.setAttribute("title",mxResources.get("search"))):(va.setAttribute("src",Dialog.prototype.closeImage),va.setAttribute("title",mxResources.get("reset")))}));A+=23;var Ba=document.createElement("div");
-Ba.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,qa=140,Ca={},Aa={},Ha={},Na=0,Ga=!0,Fa=null,Ea=null;Ca.basic=[{title:"blankDiagram",select:!0}];var La=Ca.basic;if(!e){var za=function(){mxUtils.get(ka,function(oa){if(!ta){ta=!0;oa=oa.getXml().documentElement.firstChild;for(var sa={};null!=oa;){if("undefined"!==typeof oa.getAttribute)if("clibs"==
+mxUtils.write(ya,mxResources.get(0==ia.length?"noResultsFor":"resultsFor",[sa]));Z.appendChild(ya);null!=Fa&&null==Ea&&(Fa.style.backgroundColor="",Ea=Fa,Fa=ya);La=ia;V=null;P(!1)}mxEvent.consume(oa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(oa){""==aa.value?(va.setAttribute("src",ja),va.setAttribute("title",mxResources.get("search"))):(va.setAttribute("src",Dialog.prototype.closeImage),va.setAttribute("title",mxResources.get("reset")))}));z+=23;var Ba=document.createElement("div");
+Ba.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,qa=140,Ca={},Aa={},Ha={},Na=0,Ga=!0,Fa=null,Ea=null;Ca.basic=[{title:"blankDiagram",select:!0}];var La=Ca.basic;if(!e){var za=function(){mxUtils.get(ka,function(oa){if(!ta){ta=!0;oa=oa.getXml().documentElement.firstChild;for(var sa={};null!=oa;){if("undefined"!==typeof oa.getAttribute)if("clibs"==
oa.nodeName){for(var ya=oa.getAttribute("name"),wa=oa.getElementsByTagName("add"),ua=[],xa=0;xa<wa.length;xa++)ua.push(encodeURIComponent(mxUtils.getTextContent(wa[xa])));null!=ya&&0<ua.length&&(sa[ya]=ua.join(";"))}else if(ua=oa.getAttribute("url"),null!=ua){wa=oa.getAttribute("section");ya=oa.getAttribute("subsection");if(null==wa&&(xa=ua.indexOf("/"),wa=ua.substring(0,xa),null==ya)){var ha=ua.indexOf("/",xa+1);-1<ha&&(ya=ua.substring(xa+1,ha))}xa=Ca[wa];null==xa&&(xa=[],Ca[wa]=xa);ua=oa.getAttribute("clibs");
-null!=sa[ua]&&(ua=sa[ua]);ua={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:ua,tags:oa.getAttribute("tags")};xa.push(ua);null!=ya&&(xa=Aa[wa],null==xa&&(xa={},Aa[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ua))}oa=oa.nextSibling}S.stop();C()}})};G.appendChild(fa);G.appendChild(Ba);G.appendChild(Z);var ta=!1,ka=l;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&
-(ka=PROXY_URL+"?url="+encodeURIComponent(ka));S.spin(Z);null!=B?B(function(oa,sa){Ha=oa;X=Na=sa;za()},za):za();U=Ca}mxEvent.addListener(F,"keypress",function(oa){b.dialog.container.firstChild==G&&13==oa.keyCode&&t()});B=document.createElement("div");B.style.marginTop=e?"4px":"16px";B.style.textAlign="right";B.style.position="absolute";B.style.left="40px";B.style.bottom="24px";B.style.right="40px";e||b.isOffline()||!f||null!=c||m||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-A.className="geBtn",B.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||m&&null==n||B.appendChild(A);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var oa=new FilenameDialog(b,"",mxResources.get("create"),function(sa){null!=sa&&0<sa.length&&(sa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
-encodeURIComponent(F.value)+"&create="+encodeURIComponent(sa)),null==b.getCurrentFile()?window.location.href=sa:window.openWindow(sa))},mxResources.get("url"));b.showDialog(oa.container,300,80,!0,!0);oa.init()}),e.className="geBtn",B.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var oa=document.createElement("input");oa.setAttribute("multiple","multiple");oa.setAttribute("type","file");mxEvent.addListener(oa,"change",function(sa){b.openFiles(oa.files,
-!0);oa.value=""});oa.style.display="none";document.body.appendChild(oa);b.newDlgFileInputElt=oa}b.newDlgFileInputElt.click()}),y.className="geBtn",B.appendChild(y));B.appendChild(V);b.editor.cancelFirst||null!=c||m&&null==n||B.appendChild(A);G.appendChild(B);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,A,B){function I(P,J,F,H){function S(){mxEvent.addListener(V,"click",function(){var u=F;if(v){var D=z.value,K=D.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>K){u=null!=u?u:G.value;var T="";u==App.MODE_GOOGLE?T=b.drive.extension:u==App.MODE_GITHUB?T=b.gitHub.extension:u==App.MODE_GITLAB?T=b.gitLab.extension:u==App.MODE_TRELLO?T=b.trello.extension:u==App.MODE_DROPBOX?T=b.dropbox.extension:u==App.MODE_ONEDRIVE?T=b.oneDrive.extension:u==App.MODE_DEVICE&&
-(T=".drawio");0<=K&&(D=D.substring(0,K));z.value=D+T}}O(F)})}var V=document.createElement("a");V.style.overflow="hidden";var M=document.createElement("img");M.src=P;M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";V.style.display="inline-block";V.className="geBaseButton";V.style.position="relative";V.style.margin="4px";V.style.padding="8px 8px 10px 8px";V.style.whiteSpace="nowrap";V.appendChild(M);V.style.color=
-"gray";V.style.fontSize="11px";var W=document.createElement("div");V.appendChild(W);mxUtils.write(W,J);if(null!=H&&null==b[H]){M.style.visibility="hidden";mxUtils.setOpacity(W,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(V);var X=window.setTimeout(function(){null==b[H]&&(U.stop(),V.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(X),
-mxUtils.setOpacity(W,100),M.style.visibility="",U.stop(),S())}))}else S();C.appendChild(V);++E==p&&(mxUtils.br(C),E=0)}function O(P){var J=z.value;if(null==P||null!=J&&0<J.length)B&&b.hideDialog(),f(J,P,z)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;B=null!=B?B:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var t=document.createElement("h2");mxUtils.write(t,m||mxResources.get("create"));t.style.marginTop="0px";t.style.marginBottom=
-"24px";n.appendChild(t);mxUtils.write(n,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",e);z.style.width="200px";z.style.marginLeft="10px";z.style.marginBottom="20px";z.style.maxWidth="70%";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)};n.appendChild(z);null!=A&&(null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,z,b.editor.diagramFileTypes),
-m.style.marginLeft="6px",m.style.width="90px",n.appendChild(m)),n.appendChild(FilenameDialog.createTypeHint(b,z,A)));A=null;if("1"!=urlParams.noDevice&&null!=q&&null!=x&&"image/"==x.substring(0,6)&&("image/svg"!=x.substring(0,9)||mxClient.IS_SVG)){z.style.width="160px";m=document.createElement("img");var L=y?q:btoa(unescape(encodeURIComponent(q)));m.setAttribute("src","data:"+x+";base64,"+L);m.style.position="absolute";m.style.top="70px";m.style.right="100px";m.style.maxWidth="120px";m.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(A=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(L,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+x+";base64,"+L+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
-A.style.marginTop="6px",A.className="geBtn");g&&Editor.popupsAllowed&&(m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(P){mxEvent.isPopupTrigger(P)||O("_blank")}))}mxUtils.br(n);var C=document.createElement("div");C.style.textAlign="center";var E=0;C.style.marginTop="6px";n.appendChild(C);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),G.appendChild(q),I(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),G.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),I(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),G.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),I(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),G.appendChild(q),I(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),G.appendChild(q),I(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),G.appendChild(q),I(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),G.appendChild(q),b.mode!=App.MODE_DEVICE&&d||q.setAttribute("selected","selected"),l&&I(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),
-d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),G.appendChild(d),b.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),I(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=k&&(l=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
-function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});l.className="geBtn";b.editor.cancelFirst&&null==c&&d.appendChild(l);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){O(null)}),q.className="geBtn",d.appendChild(q));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){O("_blank")}),g.className="geBtn",d.appendChild(g));CreateDialog.showDownloadButton&&(g=mxUtils.button(mxResources.get("download"),
-function(){O("download")}),g.className="geBtn",d.appendChild(g),null!=A&&(g.style.marginTop="6px",d.style.marginTop="6px"));null!=A&&(mxUtils.br(d),d.appendChild(A));b.editor.cancelFirst&&null==c||d.appendChild(l);mxEvent.addListener(z,"keypress",function(P){13==P.keyCode?O(App.MODE_DEVICE):27==P.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(d);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+null!=sa[ua]&&(ua=sa[ua]);ua={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:ua,tags:oa.getAttribute("tags")};xa.push(ua);null!=ya&&(xa=Aa[wa],null==xa&&(xa={},Aa[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ua))}oa=oa.nextSibling}R.stop();B()}})};G.appendChild(fa);G.appendChild(Ba);G.appendChild(Z);var ta=!1,ka=l;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&
+(ka=PROXY_URL+"?url="+encodeURIComponent(ka));R.spin(Z);null!=A?A(function(oa,sa){Ha=oa;X=Na=sa;za()},za):za();U=Ca}mxEvent.addListener(F,"keypress",function(oa){b.dialog.container.firstChild==G&&13==oa.keyCode&&L()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!f||null!=c||m||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+z.className="geBtn",A.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||m&&null==n||A.appendChild(z);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var oa=new FilenameDialog(b,"",mxResources.get("create"),function(sa){null!=sa&&0<sa.length&&(sa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
+encodeURIComponent(F.value)+"&create="+encodeURIComponent(sa)),null==b.getCurrentFile()?window.location.href=sa:window.openWindow(sa))},mxResources.get("url"));b.showDialog(oa.container,300,80,!0,!0);oa.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var oa=document.createElement("input");oa.setAttribute("multiple","multiple");oa.setAttribute("type","file");mxEvent.addListener(oa,"change",function(sa){b.openFiles(oa.files,
+!0);oa.value=""});oa.style.display="none";document.body.appendChild(oa);b.newDlgFileInputElt=oa}b.newDlgFileInputElt.click()}),y.className="geBtn",A.appendChild(y));A.appendChild(W);b.editor.cancelFirst||null!=c||m&&null==n||A.appendChild(z);G.appendChild(A);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A){function K(N,I,F,H){function R(){mxEvent.addListener(W,"click",function(){var t=F;if(v){var E=u.value,M=E.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>M){t=null!=t?t:G.value;var T="";t==App.MODE_GOOGLE?T=b.drive.extension:t==App.MODE_GITHUB?T=b.gitHub.extension:t==App.MODE_GITLAB?T=b.gitLab.extension:t==App.MODE_TRELLO?T=b.trello.extension:t==App.MODE_DROPBOX?T=b.dropbox.extension:t==App.MODE_ONEDRIVE?T=b.oneDrive.extension:t==App.MODE_DEVICE&&
+(T=".drawio");0<=M&&(E=E.substring(0,M));u.value=E+T}}P(F)})}var W=document.createElement("a");W.style.overflow="hidden";var J=document.createElement("img");J.src=N;J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="60px";J.style.height="60px";J.style.paddingBottom="6px";W.style.display="inline-block";W.className="geBaseButton";W.style.position="relative";W.style.margin="4px";W.style.padding="8px 8px 10px 8px";W.style.whiteSpace="nowrap";W.appendChild(J);W.style.color=
+"gray";W.style.fontSize="11px";var V=document.createElement("div");W.appendChild(V);mxUtils.write(V,I);if(null!=H&&null==b[H]){J.style.visibility="hidden";mxUtils.setOpacity(V,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(W);var X=window.setTimeout(function(){null==b[H]&&(U.stop(),W.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(X),
+mxUtils.setOpacity(V,100),J.style.visibility="",U.stop(),R())}))}else R();B.appendChild(W);++C==p&&(mxUtils.br(B),C=0)}function P(N){var I=u.value;if(null==N||null!=I&&0<I.length)A&&b.hideDialog(),f(I,N,u)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;A=null!=A?A:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var L=document.createElement("h2");mxUtils.write(L,m||mxResources.get("create"));L.style.marginTop="0px";L.style.marginBottom=
+"24px";n.appendChild(L);mxUtils.write(n,mxResources.get("filename")+":");var u=document.createElement("input");u.setAttribute("value",e);u.style.width="200px";u.style.marginLeft="10px";u.style.marginBottom="20px";u.style.maxWidth="70%";this.init=function(){u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);null!=z&&(null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,u,b.editor.diagramFileTypes),
+m.style.marginLeft="6px",m.style.width="90px",n.appendChild(m)),n.appendChild(FilenameDialog.createTypeHint(b,u,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=x&&"image/"==x.substring(0,6)&&("image/svg"!=x.substring(0,9)||mxClient.IS_SVG)){u.style.width="160px";m=document.createElement("img");var D=y?q:btoa(unescape(encodeURIComponent(q)));m.setAttribute("src","data:"+x+";base64,"+D);m.style.position="absolute";m.style.top="70px";m.style.right="100px";m.style.maxWidth="120px";m.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(z=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(D,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+x+";base64,"+D+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(I){b.handleError(I)}))}),
+z.style.marginTop="6px",z.className="geBtn");g&&Editor.popupsAllowed&&(m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(N){mxEvent.isPopupTrigger(N)||P("_blank")}))}mxUtils.br(n);var B=document.createElement("div");B.style.textAlign="center";var C=0;B.style.marginTop="6px";n.appendChild(B);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),G.appendChild(q),K(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),G.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),K(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),G.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),K(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),G.appendChild(q),K(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),G.appendChild(q),K(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),G.appendChild(q),K(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),G.appendChild(q),b.mode!=App.MODE_DEVICE&&d||q.setAttribute("selected","selected"),l&&K(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),
+d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),G.appendChild(d),b.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),K(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=k&&(l=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
+function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});l.className="geBtn";b.editor.cancelFirst&&null==c&&d.appendChild(l);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){P(null)}),q.className="geBtn",d.appendChild(q));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){P("_blank")}),g.className="geBtn",d.appendChild(g));CreateDialog.showDownloadButton&&(g=mxUtils.button(mxResources.get("download"),
+function(){P("download")}),g.className="geBtn",d.appendChild(g),null!=z&&(g.style.marginTop="6px",d.style.marginTop="6px"));null!=z&&(mxUtils.br(d),d.appendChild(z));b.editor.cancelFirst&&null==c||d.appendChild(l);mxEvent.addListener(u,"keypress",function(N){13==N.keyCode?P(App.MODE_DEVICE):27==N.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(d);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,e,f,c,m){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var v=mxUtils.button(mxResources.get("openInThisWindow"),function(){m&&b.hideDialog();null!=c&&c()});v.className="geBtn";v.style.marginBottom="8px";v.style.width="280px";n.appendChild(v);mxUtils.br(n);var d=mxUtils.button(mxResources.get("openInNewWindow"),function(){m&&b.hideDialog();
-null!=f&&f();b.openLink(e,null,!0)});d.className="geBtn gePrimaryBtn";d.style.width=v.style.width;n.appendChild(d);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,m,n,v,d){function g(){0<p.value.length?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")}n=null!=n?n:!0;var k=b.editor.graph,l=document.createElement("div");mxUtils.write(l,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor=
+null!=f&&f();b.openLink(e,null,!0)});d.className="geBtn gePrimaryBtn";d.style.width=v.style.width;n.appendChild(d);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,m,n,v,d){function g(){0<p.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}n=null!=n?n:!0;var k=b.editor.graph,l=document.createElement("div");mxUtils.write(l,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor=
"transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var p=document.createElement("input");p.setAttribute("value",f);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?460:340)-20+"px";p.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){p.value="";p.focus()});
-e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,A=function(t,z,L,C){var E="data:"==t.substring(0,5);!b.isOffline()||E&&"undefined"===typeof chrome?0<t.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(t,function(G){b.spinner.stop();b.hideDialog();var P=!1===C?1:null!=z&&null!=L?Math.max(z/G.width,L/G.height):Math.min(1,Math.min(520/G.width,520/G.height));n&&(t=b.convertDataUri(t));c(t,Math.round(Number(G.width)*P),Math.round(Number(G.height)*P),q,x,y)},
-function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(t,null,null,q,x,y)):(t=b.convertDataUri(t),z=null==z?120:z,L=null==L?100:L,b.hideDialog(),c(t,z,L,q,x,y))},B=function(t,z){if(null!=t){var L=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=L?A(t,L.width,L.height,z):A(t,null,null,z)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var t=l.parentNode,z=null;mxEvent.addListener(t,"dragleave",function(L){null!=z&&(z.parentNode.removeChild(z),z=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(t,"dragover",mxUtils.bind(this,function(L){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=b.highlightElement(t));L.stopPropagation();L.preventDefault()}));mxEvent.addListener(t,"drop",mxUtils.bind(this,function(L){null!=z&&(z.parentNode.removeChild(z),z=null);if(0<L.dataTransfer.files.length)b.importFiles(L.dataTransfer.files,
-0,0,b.maxImageSize,function(E,G,P,J,F,H,S,V){B(E,V)},function(){},function(E){return"image/"==E.type.substring(0,6)},function(E){for(var G=0;G<E.length;G++)E[G]()},!mxEvent.isControlDown(L),null,null,!0);else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var C=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(C)&&B(decodeURIComponent(C))}L.stopPropagation();L.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
-"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(t){t.action==google.picker.Action.PICKED&&null!=t.docs[0].thumbnails&&(t=t.docs[0].thumbnails[t.docs[0].thumbnails.length-1],null!=t&&(p.value=t.url));p.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
-"file");mxEvent.addListener(I,"change",function(t){null!=I.files&&(b.importFiles(I.files,0,0,b.maxImageSize,function(z,L,C,E,G,P){B(z)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var L=0;L<z.length;L++)z[L]()},!0),I.type="",I.type="file",I.value="")});I.style.display="none";document.body.appendChild(I);b.imgDlgFileInputElt=I}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
-"keypress",function(t){13==t.keyCode&&B(p.value)});var O=mxUtils.button(mxResources.get("crop"),function(){var t=new CropImageDialog(b,p.value,q,function(z,L,C){q=z;x=L;y=C});b.showDialog(t.container,300,390,!0,!0)});v&&(O.className="geBtn",d.appendChild(O));mxEvent.addListener(p,"change",function(t){q=null;g()});g();v=mxUtils.button(mxResources.get("apply"),function(){B(p.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);b.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop=
-"120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),l.appendChild(v));l.appendChild(d);this.container=l},LinkDialog=function(b,e,f,c,m,n,v){function d(t,z,L){L=mxUtils.button("",L);
-L.className="geBtn";L.setAttribute("title",z);z=document.createElement("img");z.style.height="26px";z.style.width="26px";z.setAttribute("src",t);L.style.minWidth="42px";L.style.verticalAlign="middle";L.appendChild(z);O.appendChild(L)}var g=document.createElement("div");g.style.height="100%";mxUtils.write(g,mxResources.get("editLink")+":");var k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow=
+e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,z=function(L,u,D,B){var C="data:"==L.substring(0,5);!b.isOffline()||C&&"undefined"===typeof chrome?0<L.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(L,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=u&&null!=D?Math.max(u/G.width,D/G.height):Math.min(1,Math.min(520/G.width,520/G.height));n&&(L=b.convertDataUri(L));c(L,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,x,y)},
+function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(L,null,null,q,x,y)):(L=b.convertDataUri(L),u=null==u?120:u,D=null==D?100:D,b.hideDialog(),c(L,u,D,q,x,y))},A=function(L,u){if(null!=L){var D=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=D?z(L,D.width,D.height,u):z(L,null,null,u)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var L=l.parentNode,u=null;mxEvent.addListener(L,"dragleave",function(D){null!=u&&(u.parentNode.removeChild(u),u=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(D){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(L));D.stopPropagation();D.preventDefault()}));mxEvent.addListener(L,"drop",mxUtils.bind(this,function(D){null!=u&&(u.parentNode.removeChild(u),u=null);if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,
+0,0,b.maxImageSize,function(C,G,N,I,F,H,R,W){A(C,W)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()},!mxEvent.isControlDown(D),null,null,!0);else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var B=D.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(B)&&A(decodeURIComponent(B))}D.stopPropagation();D.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
+"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(L){L.action==google.picker.Action.PICKED&&null!=L.docs[0].thumbnails&&(L=L.docs[0].thumbnails[L.docs[0].thumbnails.length-1],null!=L&&(p.value=L.url));p.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var K=document.createElement("input");K.setAttribute("multiple","multiple");K.setAttribute("type",
+"file");mxEvent.addListener(K,"change",function(L){null!=K.files&&(b.importFiles(K.files,0,0,b.maxImageSize,function(u,D,B,C,G,N){A(u)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var D=0;D<u.length;D++)u[D]()},!0),K.type="",K.type="file",K.value="")});K.style.display="none";document.body.appendChild(K);b.imgDlgFileInputElt=K}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
+"keypress",function(L){13==L.keyCode&&A(p.value)});var P=mxUtils.button(mxResources.get("crop"),function(){var L=new CropImageDialog(b,p.value,q,function(u,D,B){q=u;x=D;y=B});b.showDialog(L.container,300,390,!0,!0)});v&&(P.className="geBtn",d.appendChild(P));mxEvent.addListener(p,"change",function(L){q=null;g()});g();v=mxUtils.button(mxResources.get("apply"),function(){A(p.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);b.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop=
+"120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),l.appendChild(v));l.appendChild(d);this.container=l},LinkDialog=function(b,e,f,c,m,n,v){function d(L,u,D){D=mxUtils.button("",D);
+D.className="geBtn";D.setAttribute("title",u);u=document.createElement("img");u.style.height="26px";u.style.width="26px";u.setAttribute("src",L);D.style.minWidth="42px";D.style.verticalAlign="middle";D.appendChild(u);P.appendChild(D)}var g=document.createElement("div");g.style.height="100%";mxUtils.write(g,mxResources.get("editLink")+":");var k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow=
"clip";k.style.cursor="default";k.style.paddingRight="20px";var l=document.createElement("input");l.setAttribute("placeholder",mxResources.get("dragUrlsHere"));l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="97%";l.style.boxSizing="border-box";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";l.style.marginBottom="4px";var p=document.createElement("div");p.setAttribute("title",
mxResources.get("reset"));p.style.position="relative";p.style.left="-16px";p.style.width="12px";p.style.height="14px";p.style.cursor="pointer";p.style.display="inline-block";p.style.top="3px";p.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(p,"click",function(){l.value="";l.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");
-var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geLinkDialogOption");var y=document.createElement("select");y.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=v&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);v=null!=v?v:"_blank";A.setAttribute("title",v);n&&(l.style.width="340px");if(m&&
-null!=b.pages){null!=e&&Graph.isPageLink(e)?(x.setAttribute("checked","checked"),x.defaultChecked=!0):(l.setAttribute("value",e),q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);k.appendChild(l);k.appendChild(p);n&&(k.appendChild(A),mxUtils.write(k,mxResources.get("openInNewWindow")));mxUtils.br(k);k.appendChild(x);m=!1;for(n=0;n<b.pages.length;n++)p=document.createElement("option"),mxUtils.write(p,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),p.setAttribute("value",
-"data:page/id,"+b.pages[n].getId()),e==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0),y.appendChild(p);if(!m&&x.checked){var B=document.createElement("option");mxUtils.write(B,mxResources.get("pageNotFound"));B.setAttribute("disabled","disabled");B.setAttribute("selected","selected");B.setAttribute("value","pageNotFound");y.appendChild(B);mxEvent.addListener(y,"change",function(){null==B.parentNode||B.selected||B.parentNode.removeChild(B)})}k.appendChild(y)}else l.setAttribute("value",
-e),k.appendChild(l),k.appendChild(p);g.appendChild(k);var I=mxUtils.button(f,function(){b.hideDialog();c(x.checked?"pageNotFound"!==y.value?y.value:e:l.value,LinkDialog.selectedDocs,A.checked?v:null)});I.style.verticalAlign="middle";I.className="geBtn gePrimaryBtn";this.init=function(){x.checked?y.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(y,"focus",function(){q.removeAttribute("checked");x.setAttribute("checked",
-"checked");x.checked=!0});mxEvent.addListener(l,"focus",function(){x.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var t=g.parentNode,z=null;mxEvent.addListener(t,"dragleave",function(L){null!=z&&(z.parentNode.removeChild(z),z=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(t,"dragover",mxUtils.bind(this,function(L){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=b.highlightElement(t));L.stopPropagation();L.preventDefault()}));
-mxEvent.addListener(t,"drop",mxUtils.bind(this,function(L){null!=z&&(z.parentNode.removeChild(z),z=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,I.click());L.stopPropagation();L.preventDefault()}),!1)}};var O=document.createElement("div");O.style.marginTop="18px";O.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-f.style.verticalAlign="middle";f.className="geBtn";O.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&O.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(t){if(t.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=t.docs;var z=t.docs[0].url;"application/mxe"==t.docs[0].mimeType||null!=t.docs[0].mimeType&&
-"application/vnd.jgraph."==t.docs[0].mimeType.substring(0,23)?z="https://www.draw.io/#G"+t.docs[0].id:"application/vnd.google-apps.folder"==t.docs[0].mimeType&&(z="https://drive.google.com/#folders/"+t.docs[0].id);l.value=z;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var t=b.drive.createLinkPicker();b.linkPicker=t.setCallback(function(z){LinkDialog.filePicked(z)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(t){l.value=t[0].link;l.focus()}})});null!=b.oneDrive&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(t,z){l.value=z.value[0].webUrl;l.focus()},!0)});null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(t){if(null!=t){t=t.split("/");var z=t[0],L=t[1],C=t[2];t=t.slice(3,t.length).join("/");l.value="https://github.com/"+z+"/"+L+"/blob/"+C+"/"+t;l.focus()}})});null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(t){if(null!=t){t=t.split("/");var z=
-t[0],L=t[1],C=t[2];t=t.slice(3,t.length).join("/");l.value=DRAWIO_GITLAB_URL+"/"+z+"/"+L+"/blob/"+C+"/"+t;l.focus()}})});mxEvent.addListener(l,"keypress",function(t){13==t.keyCode&&(b.hideDialog(),c(x.checked?y.value:l.value,LinkDialog.selectedDocs))});O.appendChild(I);b.editor.cancelFirst||O.appendChild(f);g.appendChild(O);this.container=g},FeedbackDialog=function(b,e,f,c){var m=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize=
+var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geLinkDialogOption");var y=document.createElement("select");y.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=v&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);v=null!=v?v:"_blank";z.setAttribute("title",v);n&&(l.style.width="340px");if(m&&
+null!=b.pages){null!=e&&Graph.isPageLink(e)?(x.setAttribute("checked","checked"),x.defaultChecked=!0):(l.setAttribute("value",e),q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);k.appendChild(l);k.appendChild(p);n&&(k.appendChild(z),mxUtils.write(k,mxResources.get("openInNewWindow")));mxUtils.br(k);k.appendChild(x);m=!1;for(n=0;n<b.pages.length;n++)p=document.createElement("option"),mxUtils.write(p,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),p.setAttribute("value",
+"data:page/id,"+b.pages[n].getId()),e==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0),y.appendChild(p);if(!m&&x.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");y.appendChild(A);mxEvent.addListener(y,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}k.appendChild(y)}else l.setAttribute("value",
+e),k.appendChild(l),k.appendChild(p);g.appendChild(k);var K=mxUtils.button(f,function(){b.hideDialog();c(x.checked?"pageNotFound"!==y.value?y.value:e:l.value,LinkDialog.selectedDocs,z.checked?v:null)});K.style.verticalAlign="middle";K.className="geBtn gePrimaryBtn";this.init=function(){x.checked?y.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(y,"focus",function(){q.removeAttribute("checked");x.setAttribute("checked",
+"checked");x.checked=!0});mxEvent.addListener(l,"focus",function(){x.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var L=g.parentNode,u=null;mxEvent.addListener(L,"dragleave",function(D){null!=u&&(u.parentNode.removeChild(u),u=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(D){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(L));D.stopPropagation();D.preventDefault()}));
+mxEvent.addListener(L,"drop",mxUtils.bind(this,function(D){null!=u&&(u.parentNode.removeChild(u),u=null);0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(D.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,K.click());D.stopPropagation();D.preventDefault()}),!1)}};var P=document.createElement("div");P.style.marginTop="18px";P.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+f.style.verticalAlign="middle";f.className="geBtn";P.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&P.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(L){if(L.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=L.docs;var u=L.docs[0].url;"application/mxe"==L.docs[0].mimeType||null!=L.docs[0].mimeType&&
+"application/vnd.jgraph."==L.docs[0].mimeType.substring(0,23)?u="https://www.draw.io/#G"+L.docs[0].id:"application/vnd.google-apps.folder"==L.docs[0].mimeType&&(u="https://drive.google.com/#folders/"+L.docs[0].id);l.value=u;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var L=b.drive.createLinkPicker();b.linkPicker=L.setCallback(function(u){LinkDialog.filePicked(u)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(L){l.value=L[0].link;l.focus()}})});null!=b.oneDrive&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(L,u){l.value=u.value[0].webUrl;l.focus()},!0)});null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(L){if(null!=L){L=L.split("/");var u=L[0],D=L[1],B=L[2];L=L.slice(3,L.length).join("/");l.value="https://github.com/"+u+"/"+D+"/blob/"+B+"/"+L;l.focus()}})});null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(L){if(null!=L){L=L.split("/");var u=
+L[0],D=L[1],B=L[2];L=L.slice(3,L.length).join("/");l.value=DRAWIO_GITLAB_URL+"/"+u+"/"+D+"/blob/"+B+"/"+L;l.focus()}})});mxEvent.addListener(l,"keypress",function(L){13==L.keyCode&&(b.hideDialog(),c(x.checked?y.value:l.value,LinkDialog.selectedDocs))});P.appendChild(K);b.editor.cancelFirst||P.appendChild(f);g.appendChild(P);this.container=g},FeedbackDialog=function(b,e,f,c){var m=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize=
"18px";n.style.marginBottom="18px";m.appendChild(n);n=document.createElement("div");mxUtils.write(n,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));m.appendChild(n);var v=document.createElement("input");v.setAttribute("type","text");v.style.marginTop="6px";v.style.width="600px";var d=mxUtils.button(mxResources.get("sendMessage"),function(){var p=l.value+(k.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;p.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(v.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+
":\n"+p),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});d.className="geBtn gePrimaryBtn";if(!f){d.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(v,
@@ -11196,193 +11197,193 @@ f.appendChild(k);n=document.createElement("span");mxUtils.write(n," "+mxResource
m.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(d)):(f.appendChild(d),f.appendChild(n));m.appendChild(f);this.container=m};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,e,f){var c=document.createElement("div"),m=document.createElement("h3");m.style.marginTop="0px";mxUtils.write(m,mxResources.get("revisionHistory"));c.appendChild(m);m=document.createElement("div");m.style.position="absolute";m.style.overflow="auto";m.style.width="170px";m.style.height="378px";c.appendChild(m);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.left="199px";n.style.width="470px";n.style.height="376px";
n.style.overflow="hidden";var v=document.createElement("div");v.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";n.appendChild(v);mxEvent.disableContextMenu(n);c.appendChild(n);var d=new Graph(n);d.setTooltips(!1);d.setEnabled(!1);d.setPanning(!0);d.panningHandler.ignoreCell=!0;d.panningHandler.useLeftButtonForPanning=!0;d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;var g=0,k=null,l=0,p=d.getGlobalVariable;
-d.getGlobalVariable=function(R){return"page"==R&&null!=k&&null!=k[l]?k[l].getAttribute("name"):"pagenumber"==R?l+1:"pagecount"==R?null!=k?k.length:1:p.apply(this,arguments)};d.getLinkForCell=function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
-hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},x=new Spinner(q),y=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),B={};for(q=0;q<A.length;q++)B[A[q].getAttribute("id")]=A[q];var I=null,O=null,t=null,z=null,L=mxUtils.button("",function(){null!=t&&d.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 C=mxUtils.button("",function(){null!=t&&d.zoomOut()});C.className="geSprite geSprite-zoomout";C.setAttribute("title",mxResources.get("zoomOut"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var E=mxUtils.button("",function(){null!=t&&(d.maxFitScale=8,d.fit(8),d.center())});E.className="geSprite geSprite-fit";E.setAttribute("title",mxResources.get("fit"));E.style.outline="none";E.style.border=
-"none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var G=mxUtils.button("",function(){null!=t&&(d.zoomActual(),d.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var P=mxUtils.button("",function(){});P.className="geSprite geSprite-middle";P.setAttribute("title",mxResources.get("compare"));
-P.style.outline="none";P.style.border="none";P.style.margin="2px";mxUtils.setOpacity(P,60);var J=n.cloneNode(!1);J.style.pointerEvent="none";n.parentNode.appendChild(J);var F=new Graph(J);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(P,function(R){R=B[k[g].getAttribute("id")];mxUtils.setOpacity(P,20);v.innerHTML="";null==R?mxUtils.write(v,
-mxResources.get("pageNotFound")):(H.style.display="none",n.style.display="none",J.style.display="",J.style.backgroundColor=n.style.backgroundColor,R=Editor.parseDiagramNode(R),(new mxCodec(R.ownerDocument)).decode(R,F.getModel()),F.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(P,60);v.innerHTML="";"none"==n.style.display&&(H.style.display="",n.style.display="",J.style.display="none")});var H=document.createElement("div");H.style.position=
-"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var S=mxUtils.button(mxResources.get("download"),function(){if(null!=t){var R=mxUtils.getXml(t.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(R,Y,"text/xml"):(R="undefined"===typeof pako?"&xml="+encodeURIComponent(R):"&data="+encodeURIComponent(Graph.compress(R)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+R)).simulate(document,"_blank"))}});S.className="geBtn";S.setAttribute("disabled","disabled");var V=mxUtils.button(mxResources.get("restore"),function(R){null!=t&&null!=z&&(mxEvent.isShiftDown(R)?null!=t&&(R=b.getPagesForNode(t.documentElement),R=b.diffPages(b.pages,R),R=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(R,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(R.container,620,460,!0,!0),R.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(z):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(z);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
-V.className="geBtn";V.setAttribute("disabled","disabled");V.setAttribute("title","Shift+Click for Diff");var M=document.createElement("select");M.setAttribute("disabled","disabled");M.style.maxWidth="80px";M.style.position="relative";M.style.top="-2px";M.style.verticalAlign="bottom";M.style.marginRight="6px";M.style.display="none";var W=null;mxEvent.addListener(M,"change",function(R){null!=W&&(W(R),mxEvent.consume(R))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=t&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(t.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=f&&(U.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=O&&b.openLink(O.getUrl(M.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=f&&(X.style.display="none",V.className="geBtn gePrimaryBtn");A=document.createElement("div");
-A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var u=document.createElement("div");u.className="geToolbarContainer";u.style.backgroundColor="transparent";u.style.padding="2px";u.style.border="none";u.style.left="199px";u.style.top="442px";var D=null;if(null!=e&&0<e.length){n.style.cursor="move";var K=document.createElement("table");K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";
-var T=document.createElement("tbody"),N=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(R){var Y=new Date(R.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Da){null!=Da&&(Da=Ba(Editor.parseDiagramNode(Da)));return Da},Ba=function(Da){var qa=Da.getAttribute("background");
-if(null==qa||""==qa||qa==mxConstants.NONE)qa=d.defaultPageBackgroundColor;n.style.backgroundColor=qa;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};M.style.display="none";M.innerHTML="";t=aa;z=fa;k=parseSelectFunction=null;l=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");k=[];for(fa=0;fa<aa.length;fa++)k.push(aa[fa]);l=Math.min(g,k.length-1);0<k.length&&ja(k[l]);if(1<k.length)for(M.removeAttribute("disabled"),M.style.display=
-"",fa=0;fa<k.length;fa++)aa=document.createElement("option"),mxUtils.write(aa,k[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),aa.setAttribute("value",fa),fa==l&&aa.setAttribute("selected","selected"),M.appendChild(aa);W=function(){try{var Da=parseInt(M.value);l=g=Da;ja(k[Da])}catch(qa){M.value=g,b.handleError(qa)}}}else Ba(va);fa=R.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=fa?fa+" ":"")+Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());H.setAttribute("title",ba.getAttribute("title"));L.removeAttribute("disabled");C.removeAttribute("disabled");E.removeAttribute("disabled");G.removeAttribute("disabled");P.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&V.removeAttribute("disabled"),S.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(L,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(G,60);
-mxUtils.setOpacity(P,60)}else M.style.display="none",M.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";R==e[e.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===N?mxUtils.write(Z,Y.toLocaleTimeString()):
-mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ba.appendChild(Z);ba.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=R.fileSize?" "+b.formatFileSize(parseInt(R.fileSize)):"")+(null!=R.lastModifyingUserName?" "+R.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(fa){O!=R&&(x.stop(),null!=I&&(I.style.backgroundColor=""),O=R,I=ba,I.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",z=t=null,H.removeAttribute("title"),H.innerHTML=
-mxUtils.htmlEntities(mxResources.get("loading")+"..."),n.style.backgroundColor=d.defaultPageBackgroundColor,v.innerHTML="",d.getModel().clear(),V.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),M.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(L,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(P,20),x.spin(n),R.getXml(function(aa){if(O==R)try{ea(aa)}catch(va){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+va.message)}},function(aa){x.stop();M.style.display="none";M.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(ba,
-"dblclick",function(fa){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);T.appendChild(ba)}return ba}(e[q]);null!=Q&&q==e.length-1&&(D=Q)}K.appendChild(T);m.appendChild(K)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",u.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",u.style.display=
-"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=D&&D.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";u.appendChild(M);u.appendChild(L);u.appendChild(C);u.appendChild(G);u.appendChild(E);u.appendChild(P);b.editor.cancelFirst?(A.appendChild(m),A.appendChild(S),A.appendChild(U),A.appendChild(V),A.appendChild(X)):(A.appendChild(S),A.appendChild(U),A.appendChild(V),A.appendChild(X),A.appendChild(m));c.appendChild(A);
-c.appendChild(u);c.appendChild(H);this.container=c},DraftDialog=function(b,e,f,c,m,n,v,d,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,e);k.appendChild(l);var p=document.createElement("select"),q=mxUtils.bind(this,function(){O=mxUtils.parseXml(g[p.value].data);t=b.editor.extractGraphModel(O.documentElement,!0);z=0;this.init()});if(null!=g){p.style.marginLeft=
-"4px";for(e=0;e<g.length;e++){var x=document.createElement("option");x.setAttribute("value",e);var y=new Date(g[e].created),A=new Date(g[e].modified);mxUtils.write(x,y.toLocaleDateString()+" "+y.toLocaleTimeString()+" - "+(y.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());p.appendChild(x)}l.appendChild(p);mxEvent.addListener(p,"change",q)}null==f&&(f=g[0].data);var B=document.createElement("div");B.style.position="absolute";B.style.border="1px solid lightGray";
-B.style.marginTop="10px";B.style.left="40px";B.style.right="40px";B.style.top="46px";B.style.bottom="74px";B.style.overflow="hidden";mxEvent.disableContextMenu(B);k.appendChild(B);var I=new Graph(B);I.setEnabled(!1);I.setPanning(!0);I.panningHandler.ignoreCell=!0;I.panningHandler.useLeftButtonForPanning=!0;I.minFitScale=null;I.maxFitScale=null;I.centerZoom=!0;var O=mxUtils.parseXml(f),t=b.editor.extractGraphModel(O.documentElement,!0),z=0,L=null,C=I.getGlobalVariable;I.getGlobalVariable=function(G){return"page"==
-G&&null!=L&&null!=L[z]?L[z].getAttribute("name"):"pagenumber"==G?z+1:"pagecount"==G?null!=L?L.length:1:C.apply(this,arguments)};I.getLinkForCell=function(){return null};f=mxUtils.button("",function(){I.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){I.zoomOut()});l.className="geSprite geSprite-zoomout";l.setAttribute("title",
-mxResources.get("zoomOut"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);e=mxUtils.button("",function(){I.maxFitScale=8;I.fit(8);I.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);x=mxUtils.button("",function(){I.zoomActual();I.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));
-x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);v=mxUtils.button(v||mxResources.get("discard"),function(){m.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):b.hideDialog(!0))})])});v.className="geBtn";var E=document.createElement("select");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";
-E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[p.value])});n.className="geBtn gePrimaryBtn";y=document.createElement("div");y.style.position="absolute";y.style.bottom="30px";y.style.right="40px";y.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function G(H){if(null!=H){var S=H.getAttribute("background");if(null==S||""==S||S==mxConstants.NONE)S=Editor.isDarkMode()?"transparent":"#ffffff";B.style.backgroundColor=S;(new mxCodec(H.ownerDocument)).decode(H,I.getModel());I.maxFitScale=1;I.fit(8);I.center()}return H}function P(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(E,"change",function(H){z=parseInt(E.value);P(L[z]);mxEvent.consume(H)});if("mxfile"==t.nodeName){var J=t.getElementsByTagName("diagram");
-L=[];for(var F=0;F<J.length;F++)L.push(J[F]);0<L.length&&P(L[z]);E.innerHTML="";if(1<L.length)for(E.style.display="",F=0;F<L.length;F++)J=document.createElement("option"),mxUtils.write(J,L[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),J.setAttribute("value",F),F==z&&J.setAttribute("selected","selected"),E.appendChild(J);else E.style.display="none"}else G(t)};A.appendChild(E);A.appendChild(f);A.appendChild(l);A.appendChild(x);A.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(A);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,X,u,D){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
-for(var K=0;K<X.length;K++)if("label"!=X[K].nodeName){var T=mxUtils.trim(X[K].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(D&&0<=T.indexOf(u)||!D&&T.substring(0,u.length)===u)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&L.value?(S.removeAttribute("disabled"),V.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));L.value&&z.value?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")}function g(U,
-X,u){F.innerHTML="";var D=l.model.getDescendants(l.model.getRoot()),K=z.value.toLowerCase(),T=C.checked?new RegExp(K):null,N=null;A=null;p!=K&&(p=K,q=null,y=!1);var Q=null==q;if(0<K.length){if(y){y=!1;for(var R,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){R=Y;break}U=(R+1)%b.pages.length;q=null;do y=!1,D=b.pages[U],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(D),l.model.setRoot(D.root),U=(U+1)%b.pages.length;while(!g(!0,X,u)&&U!=R);q&&(q=null,u?b.editor.graph.model.execute(new SelectPage(b,
-D)):b.selectPage(D));y=!1;l=b.editor.graph;return g(!0,X,u)}for(Y=0;Y<D.length;Y++){R=l.view.getState(D[Y]);X&&null!=T&&(Q=Q||R==q);if(null!=R&&null!=R.cell.value&&(Q||null==N)&&(l.model.isVertex(R.cell)||l.model.isEdge(R.cell))){null!=R.style&&"1"==R.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(R.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(R.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ba=0;X&&n&&null!=T&&R==q&&(label=label.substr(B),
-ba=B);var ea=""==L.value,Z=ea;if(null==T&&(Z&&0<=label.indexOf(K)||!Z&&label.substring(0,K.length)===K||ea&&v(T,R.cell,K,Z))||null!=T&&(T.test(label)||ea&&v(T,R.cell,K,Z)))if(n&&(null!=T?(ea=label.match(T),A=ea[0].toLowerCase(),B=ba+ea.index+A.length):(A=K,B=A.length)),Q){N=R;break}else null==N&&(N=R)}Q=Q||R==q}}if(null!=N){if(Y==D.length&&E.checked)return q=null,y=!0,g(!0,X,u);q=N;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?u||l.getSelectionCell()==q.cell&&1==l.getSelectionCount()||
-l.setSelectionCell(q.cell):l.highlightCell(q.cell)}else{if(!U&&E.checked)return y=!0,g(!0,X,u);l.isEnabled()&&!u&&l.clearSelection()}x=null!=N;n&&!U&&d();return 0==K.length||null!=N}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,A=null,B=0,I=1,O=document.createElement("div");O.style.userSelect="none";O.style.overflow="hidden";O.style.padding="10px";O.style.height="100%";var t=n?"260px":"200px",z=document.createElement("input");z.setAttribute("placeholder",mxResources.get("find"));
-z.setAttribute("type","text");z.style.marginTop="4px";z.style.marginBottom="6px";z.style.width=t;z.style.fontSize="12px";z.style.borderRadius="4px";z.style.padding="6px";O.appendChild(z);mxUtils.br(O);if(n){var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("replaceWith"));L.setAttribute("type","text");L.style.marginTop="4px";L.style.marginBottom="6px";L.style.width=t;L.style.fontSize="12px";L.style.borderRadius="4px";L.style.padding="6px";O.appendChild(L);mxUtils.br(O);
-mxEvent.addListener(L,"input",d)}var C=document.createElement("input");C.setAttribute("id","geFindWinRegExChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";O.appendChild(C);t=document.createElement("label");t.setAttribute("for","geFindWinRegExChck");O.appendChild(t);mxUtils.write(t,mxResources.get("regularExpression"));O.appendChild(t);t=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");t.style.position="relative";t.style.marginLeft="6px";t.style.top="-1px";O.appendChild(t);
-mxUtils.br(O);var E=document.createElement("input");E.setAttribute("id","geFindWinAllPagesChck");E.setAttribute("type","checkbox");E.style.marginRight="4px";O.appendChild(E);t=document.createElement("label");t.setAttribute("for","geFindWinAllPagesChck");O.appendChild(t);mxUtils.write(t,mxResources.get("allPages"));O.appendChild(t);var G=document.createElement("div");mxUtils.br(O);t=document.createElement("div");t.style.left="0px";t.style.right="0px";t.style.marginTop="6px";t.style.padding="0 6px 0 6px";
-t.style.textAlign="center";O.appendChild(t);var P=mxUtils.button(mxResources.get("reset"),function(){F.innerHTML="";z.value="";z.style.backgroundColor="";n&&(L.value="",d());p=q=null;y=!1;z.focus()});P.setAttribute("title",mxResources.get("reset"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";n||t.appendChild(P);var J=mxUtils.button(mxResources.get("find"),function(){try{z.style.backgroundColor=
-g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";t.appendChild(J);var F=document.createElement("div");F.style.marginTop="10px";if(n){var H=function(U,X,u,D,K){if(null==K||"1"!=K.html)return D=U.toLowerCase().indexOf(X,D),0>D?U:U.substr(0,
-D)+u+U.substr(D+X.length);var T=U;X=mxUtils.htmlEntities(X);K=[];var N=-1;for(U=U.replace(/<br>/ig,"\n");-1<(N=U.indexOf("<",N+1));)K.push(N);N=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");D=U.toLowerCase().indexOf(X,D);if(0>D)return T;T=D+X.length;u=mxUtils.htmlEntities(u);U=U.substr(0,D)+u+U.substr(T);for(var Q=0,R=0;R<K.length;R++){if(K[R]-Q<D)U=U.substr(0,K[R])+N[R]+U.substr(K[R]);else{var Y=K[R]-Q<T?D+Q:K[R]+(u.length-X.length);U=U.substr(0,Y)+N[R]+U.substr(Y)}Q+=N[R].length}return U.replace(/\n/g,
-"<br>")},S=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=q&&L.value){var U=q.cell,X=l.getLabel(U);l.isCellEditable(U)&&l.model.setValue(U,H(X,A,L.value,B-A.length,l.getCurrentCellStyle(U)));z.style.backgroundColor=g(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(u){b.handleError(u)}});S.setAttribute("title",mxResources.get("replFind"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow=
-"ellipsis";S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");t.appendChild(S);mxUtils.br(t);var V=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=q&&L.value){var U=q.cell,X=l.getLabel(U);l.model.setValue(U,H(X,A,L.value,B-A.length,l.getCurrentCellStyle(U)));S.setAttribute("disabled","disabled");V.setAttribute("disabled","disabled")}}catch(u){b.handleError(u)}});V.setAttribute("title",mxResources.get("replace"));V.style.float="none";V.style.width="120px";
-V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn gePrimaryBtn";V.setAttribute("disabled","disabled");t.appendChild(V);var M=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(L.value){p=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var u=0,D={};g(!1,!0,!0)&&100>u;){var K=q.cell,T=l.getLabel(K),N=D[K.id];if(N&&N.replAllMrk==
-I&&N.replAllPos>=B)break;D[K.id]={replAllMrk:I,replAllPos:B};l.isCellEditable(K)&&(l.model.setValue(K,H(T,A,L.value,B-A.length,l.getCurrentCellStyle(K))),u++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[u]))}catch(Q){b.handleError(Q)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}I++}});M.setAttribute("title",mxResources.get("replaceAll"));M.style.float="none";M.style.width="120px";
-M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");t.appendChild(M);mxUtils.br(t);t.appendChild(P);P=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));P.setAttribute("title",mxResources.get("close"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
-"ellipsis";P.className="geBtn";t.appendChild(P);mxUtils.br(t);t.appendChild(F)}else P.style.width="90px",J.style.width="90px";mxEvent.addListener(z,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)k.funct();else if(p!=z.value.toLowerCase()||13==U.keyCode)try{z.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){z.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(O,"keydown",function(U){70==
-U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(k.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),O,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?E.removeAttribute("disabled"):(E.checked=!1,E.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(U,X){var u=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,u-this.table.clientHeight-("1"==
-urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var W=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",W);this.destroy=function(){mxEvent.removeListener(window,"resize",W);this.window.destroy()}},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
+d.getGlobalVariable=function(S){return"page"==S&&null!=k&&null!=k[l]?k[l].getAttribute("name"):"pagenumber"==S?l+1:"pagecount"==S?null!=k?k.length:1:p.apply(this,arguments)};d.getLinkForCell=function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(S,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
+hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},x=new Spinner(q),y=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={};for(q=0;q<z.length;q++)A[z[q].getAttribute("id")]=z[q];var K=null,P=null,L=null,u=null,D=mxUtils.button("",function(){null!=L&&d.zoomIn()});D.className="geSprite geSprite-zoomin";D.setAttribute("title",mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");
+mxUtils.setOpacity(D,20);var B=mxUtils.button("",function(){null!=L&&d.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var C=mxUtils.button("",function(){null!=L&&(d.maxFitScale=8,d.fit(8),d.center())});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.outline="none";C.style.border=
+"none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var G=mxUtils.button("",function(){null!=L&&(d.zoomActual(),d.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var N=mxUtils.button("",function(){});N.className="geSprite geSprite-middle";N.setAttribute("title",mxResources.get("compare"));
+N.style.outline="none";N.style.border="none";N.style.margin="2px";mxUtils.setOpacity(N,60);var I=n.cloneNode(!1);I.style.pointerEvent="none";n.parentNode.appendChild(I);var F=new Graph(I);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(N,function(S){S=A[k[g].getAttribute("id")];mxUtils.setOpacity(N,20);v.innerHTML="";null==S?mxUtils.write(v,
+mxResources.get("pageNotFound")):(H.style.display="none",n.style.display="none",I.style.display="",I.style.backgroundColor=n.style.backgroundColor,S=Editor.parseDiagramNode(S),(new mxCodec(S.ownerDocument)).decode(S,F.getModel()),F.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(N,60);v.innerHTML="";"none"==n.style.display&&(H.style.display="",n.style.display="",I.style.display="none")});var H=document.createElement("div");H.style.position=
+"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=L){var S=mxUtils.getXml(L.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(S,Y,"text/xml"):(S="undefined"===typeof pako?"&xml="+encodeURIComponent(S):"&data="+encodeURIComponent(Graph.compress(S)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+S)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var W=mxUtils.button(mxResources.get("restore"),function(S){null!=L&&null!=u&&(mxEvent.isShiftDown(S)?null!=L&&(S=b.getPagesForNode(L.documentElement),S=b.diffPages(b.pages,S),S=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(S,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(S.container,620,460,!0,!0),S.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(u):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(u);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+W.className="geBtn";W.setAttribute("disabled","disabled");W.setAttribute("title","Shift+Click for Diff");var J=document.createElement("select");J.setAttribute("disabled","disabled");J.style.maxWidth="80px";J.style.position="relative";J.style.top="-2px";J.style.verticalAlign="bottom";J.style.marginRight="6px";J.style.display="none";var V=null;mxEvent.addListener(J,"change",function(S){null!=V&&(V(S),mxEvent.consume(S))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=L&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(L.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=f&&(U.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=P&&b.openLink(P.getUrl(J.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=f&&(X.style.display="none",W.className="geBtn gePrimaryBtn");z=document.createElement("div");
+z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var t=document.createElement("div");t.className="geToolbarContainer";t.style.backgroundColor="transparent";t.style.padding="2px";t.style.border="none";t.style.left="199px";t.style.top="442px";var E=null;if(null!=e&&0<e.length){n.style.cursor="move";var M=document.createElement("table");M.style.border="1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";
+var T=document.createElement("tbody"),O=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(S){var Y=new Date(S.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Da){null!=Da&&(Da=Ba(Editor.parseDiagramNode(Da)));return Da},Ba=function(Da){var qa=Da.getAttribute("background");
+if(null==qa||""==qa||qa==mxConstants.NONE)qa=d.defaultPageBackgroundColor;n.style.backgroundColor=qa;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};J.style.display="none";J.innerHTML="";L=aa;u=fa;k=parseSelectFunction=null;l=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");k=[];for(fa=0;fa<aa.length;fa++)k.push(aa[fa]);l=Math.min(g,k.length-1);0<k.length&&ja(k[l]);if(1<k.length)for(J.removeAttribute("disabled"),J.style.display=
+"",fa=0;fa<k.length;fa++)aa=document.createElement("option"),mxUtils.write(aa,k[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),aa.setAttribute("value",fa),fa==l&&aa.setAttribute("selected","selected"),J.appendChild(aa);V=function(){try{var Da=parseInt(J.value);l=g=Da;ja(k[Da])}catch(qa){J.value=g,b.handleError(qa)}}}else Ba(va);fa=S.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=fa?fa+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());H.setAttribute("title",ba.getAttribute("title"));D.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");G.removeAttribute("disabled");N.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&W.removeAttribute("disabled"),R.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(N,60)}else J.style.display="none",J.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";S==e[e.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===O?mxUtils.write(Z,Y.toLocaleTimeString()):
+mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ba.appendChild(Z);ba.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=S.fileSize?" "+b.formatFileSize(parseInt(S.fileSize)):"")+(null!=S.lastModifyingUserName?" "+S.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(fa){P!=S&&(x.stop(),null!=K&&(K.style.backgroundColor=""),P=S,K=ba,K.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",u=L=null,H.removeAttribute("title"),H.innerHTML=
+mxUtils.htmlEntities(mxResources.get("loading")+"..."),n.style.backgroundColor=d.defaultPageBackgroundColor,v.innerHTML="",d.getModel().clear(),W.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),J.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(N,20),x.spin(n),S.getXml(function(aa){if(P==S)try{ea(aa)}catch(va){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+va.message)}},function(aa){x.stop();J.style.display="none";J.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(ba,
+"dblclick",function(fa){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);T.appendChild(ba)}return ba}(e[q]);null!=Q&&q==e.length-1&&(E=Q)}M.appendChild(T);m.appendChild(M)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",t.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",t.style.display=
+"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=E&&E.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";t.appendChild(J);t.appendChild(D);t.appendChild(B);t.appendChild(G);t.appendChild(C);t.appendChild(N);b.editor.cancelFirst?(z.appendChild(m),z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X)):(z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X),z.appendChild(m));c.appendChild(z);
+c.appendChild(t);c.appendChild(H);this.container=c},DraftDialog=function(b,e,f,c,m,n,v,d,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,e);k.appendChild(l);var p=document.createElement("select"),q=mxUtils.bind(this,function(){P=mxUtils.parseXml(g[p.value].data);L=b.editor.extractGraphModel(P.documentElement,!0);u=0;this.init()});if(null!=g){p.style.marginLeft=
+"4px";for(e=0;e<g.length;e++){var x=document.createElement("option");x.setAttribute("value",e);var y=new Date(g[e].created),z=new Date(g[e].modified);mxUtils.write(x,y.toLocaleDateString()+" "+y.toLocaleTimeString()+" - "+(y.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());p.appendChild(x)}l.appendChild(p);mxEvent.addListener(p,"change",q)}null==f&&(f=g[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";
+A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);k.appendChild(A);var K=new Graph(A);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;var P=mxUtils.parseXml(f),L=b.editor.extractGraphModel(P.documentElement,!0),u=0,D=null,B=K.getGlobalVariable;K.getGlobalVariable=function(G){return"page"==
+G&&null!=D&&null!=D[u]?D[u].getAttribute("name"):"pagenumber"==G?u+1:"pagecount"==G?null!=D?D.length:1:B.apply(this,arguments)};K.getLinkForCell=function(){return null};f=mxUtils.button("",function(){K.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){K.zoomOut()});l.className="geSprite geSprite-zoomout";l.setAttribute("title",
+mxResources.get("zoomOut"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);e=mxUtils.button("",function(){K.maxFitScale=8;K.fit(8);K.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);x=mxUtils.button("",function(){K.zoomActual();K.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));
+x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);v=mxUtils.button(v||mxResources.get("discard"),function(){m.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):b.hideDialog(!0))})])});v.className="geBtn";var C=document.createElement("select");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";
+C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[p.value])});n.className="geBtn gePrimaryBtn";y=document.createElement("div");y.style.position="absolute";y.style.bottom="30px";y.style.right="40px";y.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function G(H){if(null!=H){var R=H.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=R;(new mxCodec(H.ownerDocument)).decode(H,K.getModel());K.maxFitScale=1;K.fit(8);K.center()}return H}function N(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(C,"change",function(H){u=parseInt(C.value);N(D[u]);mxEvent.consume(H)});if("mxfile"==L.nodeName){var I=L.getElementsByTagName("diagram");
+D=[];for(var F=0;F<I.length;F++)D.push(I[F]);0<D.length&&N(D[u]);C.innerHTML="";if(1<D.length)for(C.style.display="",F=0;F<D.length;F++)I=document.createElement("option"),mxUtils.write(I,D[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),I.setAttribute("value",F),F==u&&I.setAttribute("selected","selected"),C.appendChild(I);else C.style.display="none"}else G(L)};z.appendChild(C);z.appendChild(f);z.appendChild(l);z.appendChild(x);z.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(z);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,X,t,E){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
+for(var M=0;M<X.length;M++)if("label"!=X[M].nodeName){var T=mxUtils.trim(X[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(E&&0<=T.indexOf(t)||!E&&T.substring(0,t.length)===t)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&D.value?(R.removeAttribute("disabled"),W.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));D.value&&u.value?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}function g(U,
+X,t){F.innerHTML="";var E=l.model.getDescendants(l.model.getRoot()),M=u.value.toLowerCase(),T=B.checked?new RegExp(M):null,O=null;z=null;p!=M&&(p=M,q=null,y=!1);var Q=null==q;if(0<M.length){if(y){y=!1;for(var S,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){S=Y;break}U=(S+1)%b.pages.length;q=null;do y=!1,E=b.pages[U],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(E),l.model.setRoot(E.root),U=(U+1)%b.pages.length;while(!g(!0,X,t)&&U!=S);q&&(q=null,t?b.editor.graph.model.execute(new SelectPage(b,
+E)):b.selectPage(E));y=!1;l=b.editor.graph;return g(!0,X,t)}for(Y=0;Y<E.length;Y++){S=l.view.getState(E[Y]);X&&null!=T&&(Q=Q||S==q);if(null!=S&&null!=S.cell.value&&(Q||null==O)&&(l.model.isVertex(S.cell)||l.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ba=0;X&&n&&null!=T&&S==q&&(label=label.substr(A),
+ba=A);var ea=""==D.value,Z=ea;if(null==T&&(Z&&0<=label.indexOf(M)||!Z&&label.substring(0,M.length)===M||ea&&v(T,S.cell,M,Z))||null!=T&&(T.test(label)||ea&&v(T,S.cell,M,Z)))if(n&&(null!=T?(ea=label.match(T),z=ea[0].toLowerCase(),A=ba+ea.index+z.length):(z=M,A=z.length)),Q){O=S;break}else null==O&&(O=S)}Q=Q||S==q}}if(null!=O){if(Y==E.length&&C.checked)return q=null,y=!0,g(!0,X,t);q=O;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?t||l.getSelectionCell()==q.cell&&1==l.getSelectionCount()||
+l.setSelectionCell(q.cell):l.highlightCell(q.cell)}else{if(!U&&C.checked)return y=!0,g(!0,X,t);l.isEnabled()&&!t&&l.clearSelection()}x=null!=O;n&&!U&&d();return 0==M.length||null!=O}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,z=null,A=0,K=1,P=document.createElement("div");P.style.userSelect="none";P.style.overflow="hidden";P.style.padding="10px";P.style.height="100%";var L=n?"260px":"200px",u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));
+u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width=L;u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";P.appendChild(u);mxUtils.br(P);if(n){var D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("replaceWith"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=L;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";P.appendChild(D);mxUtils.br(P);
+mxEvent.addListener(D,"input",d)}var B=document.createElement("input");B.setAttribute("id","geFindWinRegExChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";P.appendChild(B);L=document.createElement("label");L.setAttribute("for","geFindWinRegExChck");P.appendChild(L);mxUtils.write(L,mxResources.get("regularExpression"));P.appendChild(L);L=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");L.style.position="relative";L.style.marginLeft="6px";L.style.top="-1px";P.appendChild(L);
+mxUtils.br(P);var C=document.createElement("input");C.setAttribute("id","geFindWinAllPagesChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";P.appendChild(C);L=document.createElement("label");L.setAttribute("for","geFindWinAllPagesChck");P.appendChild(L);mxUtils.write(L,mxResources.get("allPages"));P.appendChild(L);var G=document.createElement("div");mxUtils.br(P);L=document.createElement("div");L.style.left="0px";L.style.right="0px";L.style.marginTop="6px";L.style.padding="0 6px 0 6px";
+L.style.textAlign="center";P.appendChild(L);var N=mxUtils.button(mxResources.get("reset"),function(){F.innerHTML="";u.value="";u.style.backgroundColor="";n&&(D.value="",d());p=q=null;y=!1;u.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";n||L.appendChild(N);var I=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
+g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});I.setAttribute("title",mxResources.get("find")+" (Enter)");I.style.float="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";L.appendChild(I);var F=document.createElement("div");F.style.marginTop="10px";if(n){var H=function(U,X,t,E,M){if(null==M||"1"!=M.html)return E=U.toLowerCase().indexOf(X,E),0>E?U:U.substr(0,
+E)+t+U.substr(E+X.length);var T=U;X=mxUtils.htmlEntities(X);M=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)M.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");E=U.toLowerCase().indexOf(X,E);if(0>E)return T;T=E+X.length;t=mxUtils.htmlEntities(t);U=U.substr(0,E)+t+U.substr(T);for(var Q=0,S=0;S<M.length;S++){if(M[S]-Q<E)U=U.substr(0,M[S])+O[S]+U.substr(M[S]);else{var Y=M[S]-Q<T?E+Q:M[S]+(t.length-X.length);U=U.substr(0,Y)+O[S]+U.substr(Y)}Q+=O[S].length}return U.replace(/\n/g,
+"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&D.value){var U=q.cell,X=l.getLabel(U);l.isCellEditable(U)&&l.model.setValue(U,H(X,z,D.value,A-z.length,l.getCurrentCellStyle(U)));u.style.backgroundColor=g(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
+"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");L.appendChild(R);mxUtils.br(L);var W=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&D.value){var U=q.cell,X=l.getLabel(U);l.model.setValue(U,H(X,z,D.value,A-z.length,l.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");W.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});W.setAttribute("title",mxResources.get("replace"));W.style.float="none";W.style.width="120px";
+W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");L.appendChild(W);var J=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(D.value){p=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var t=0,E={};g(!1,!0,!0)&&100>t;){var M=q.cell,T=l.getLabel(M),O=E[M.id];if(O&&O.replAllMrk==
+K&&O.replAllPos>=A)break;E[M.id]={replAllMrk:K,replAllPos:A};l.isCellEditable(M)&&(l.model.setValue(M,H(T,z,D.value,A-z.length,l.getCurrentCellStyle(M))),t++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[t]))}catch(Q){b.handleError(Q)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}K++}});J.setAttribute("title",mxResources.get("replaceAll"));J.style.float="none";J.style.width="120px";
+J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");L.appendChild(J);mxUtils.br(L);L.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
+"ellipsis";N.className="geBtn";L.appendChild(N);mxUtils.br(L);L.appendChild(F)}else N.style.width="90px",I.style.width="90px";mxEvent.addListener(u,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)k.funct();else if(p!=u.value.toLowerCase()||13==U.keyCode)try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){u.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(P,"keydown",function(U){70==
+U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(k.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),P,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?C.removeAttribute("disabled"):(C.checked=!1,C.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(U,X){var t=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,t-this.table.clientHeight-("1"==
+urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var V=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",V);this.destroy=function(){mxEvent.removeListener(window,"resize",V);this.window.destroy()}},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
"hidden";b.style.height="100%";if(n){var d=document.createElement("input");d.setAttribute("id","geFreehandBrush");d.setAttribute("type","checkbox");d.style.margin="10px 5px 0px 10px";d.style.float="left";b.appendChild(d);var g=document.createElement("label");g.setAttribute("for","geFreehandBrush");g.style.float="left";g.style.marginTop="10px";b.appendChild(g);mxUtils.write(g,mxResources.get("brush"));b.appendChild(g);mxUtils.br(b);var k=document.createElement("input");k.setAttribute("type","range");
k.setAttribute("min","2");k.setAttribute("max","30");k.setAttribute("value",v.freehand.getBrushSize());k.style.width="90%";k.style.visibility="hidden";b.appendChild(k);mxUtils.br(b);mxEvent.addListener(d,"change",function(){v.freehand.setPerfectFreehandMode(this.checked);k.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(k,"change",function(){v.freehand.setBrushSize(parseInt(this.value))})}var l=mxUtils.button(mxResources.get("startDrawing"),function(){v.freehand.isDrawing()?
v.freehand.stopDrawing():v.freehand.startDrawing()});l.setAttribute("title",mxResources.get("startDrawing"));l.style.marginTop=n?"5px":"10px";l.style.width="90%";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.textAlign="center";l.className="geBtn gePrimaryBtn";b.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),b,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
v.addListener("freehandStateChanged",mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));l.setAttribute("title",mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));l.className="geBtn"+(v.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){v.freehand.isDrawing()&&v.freehand.stopDrawing()}));
this.window.setLocation=function(q,x){var y=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;q=Math.max(0,Math.min(q,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));x=Math.max(0,Math.min(x,y-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==q&&this.getY()==x||mxWindow.prototype.setLocation.apply(this,arguments)};var p=mxUtils.bind(this,function(){var q=this.window.getX(),x=this.window.getY();
-this.window.setLocation(q,x)});mxEvent.addListener(window,"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},TagsWindow=function(b,e,f,c,m){var n=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(k,l){if(n.isEnabled()){var p=new FilenameDialog(b,"",mxResources.get("add"),function(q){b.hideDialog();if(null!=q&&0<q.length){q=q.split(" ");for(var x=[],y=0;y<q.length;y++){var A=
-mxUtils.trim(q[y]);""!=A&&0>mxUtils.indexOf(k,A)&&x.push(A)}0<x.length&&(n.isSelectionEmpty()?l(k.concat(x)):n.addTagsForCells(n.getSelectionCells(),x))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(p.container,300,80,!0,!0);p.init()}}),d=v.div;this.window=new mxWindow(mxResources.get("tags"),d,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
+this.window.setLocation(q,x)});mxEvent.addListener(window,"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},TagsWindow=function(b,e,f,c,m){var n=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(k,l){if(n.isEnabled()){var p=new FilenameDialog(b,"",mxResources.get("add"),function(q){b.hideDialog();if(null!=q&&0<q.length){q=q.split(" ");for(var x=[],y=0;y<q.length;y++){var z=
+mxUtils.trim(q[y]);""!=z&&0>mxUtils.indexOf(k,z)&&x.push(z)}0<x.length&&(n.isSelectionEmpty()?l(k.concat(x)):n.addTagsForCells(n.getSelectionCells(),x))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(p.container,300,80,!0,!0);p.init()}}),d=v.div;this.window=new mxWindow(mxResources.get("tags"),d,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
this.window.addListener("show",mxUtils.bind(this,function(){v.refresh();this.window.fit()}));this.window.setLocation=function(k,l){var p=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;k=Math.max(0,Math.min(k,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));l=Math.max(0,Math.min(l,p-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==k&&this.getY()==l||mxWindow.prototype.setLocation.apply(this,
arguments)};var g=mxUtils.bind(this,function(){var k=this.window.getX(),l=this.window.getY();this.window.setLocation(k,l)});mxEvent.addListener(window,"resize",g);this.destroy=function(){mxEvent.removeListener(window,"resize",g);this.window.destroy()}},AuthDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));
var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?
(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg",d.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[v]));var g=document.createElement("input");g.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),function(){c(g.checked)});v.insertBefore(d,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize=
"18px";v.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(g),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),m.appendChild(f),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(n,"click",function(k){g.checked=!g.checked;mxEvent.consume(k)}));this.container=m},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),
m=[];if(null!=b.sidebar.customEntries)for(var n=0;n<b.sidebar.customEntries.length;n++){for(var v=b.sidebar.customEntries[n],d={title:b.getResource(v.title),entries:[]},g=0;g<v.entries.length;g++){var k=v.entries[g];d.entries.push({id:k.id,title:b.getResource(k.title),desc:b.getResource(k.desc),image:k.preview})}m.push(d)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)m.push(f[n]);else{d={title:f[n].title,entries:[]};for(g=0;g<f[n].entries.length;g++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(C){for(var E=0;E<C.length;E++)(function(G){var P=y.cloneNode(!1);P.style.fontWeight="bold";P.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";P.style.padding="6px 0px 6px 20px";mxUtils.write(P,G.title);l.appendChild(P);for(var J=0;J<G.entries.length;J++)(function(F){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
-"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=b.sidebar.isEntryVisible(F.id);S.defaultChecked=S.checked;H.appendChild(S);mxUtils.write(H," "+F.title);l.appendChild(H);var V=function(M){if(null==M||"INPUT"!=mxEvent.getSource(M).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var W=document.createElement("pre");
-W.style.boxSizing="border-box";W.style.fontFamily="inherit";W.style.margin="20px";W.style.right="0px";W.style.textAlign="left";mxUtils.write(W,F.desc);p.appendChild(W)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
-M&&mxEvent.consume(M)}};mxEvent.addListener(H,"click",V);mxEvent.addListener(H,"dblclick",function(M){S.checked=!S.checked;mxEvent.consume(M)});x.push(function(){return S.checked?F.id:null});0==E&&0==J&&V()})(G.entries[J])})(C[E])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
+f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(B){for(var C=0;C<B.length;C++)(function(G){var N=y.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,G.title);l.appendChild(N);for(var I=0;I<G.entries.length;I++)(function(F){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
+"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;H.appendChild(R);mxUtils.write(H," "+F.title);l.appendChild(H);var W=function(J){if(null==J||"INPUT"!=mxEvent.getSource(J).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var V=document.createElement("pre");
+V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);p.appendChild(V)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
+J&&mxEvent.consume(J)}};mxEvent.addListener(H,"click",W);mxEvent.addListener(H,"dblclick",function(J){R.checked=!R.checked;mxEvent.consume(J)});x.push(function(){return R.checked?F.id:null});0==C&&0==I&&W()})(G.entries[I])})(B[C])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
p=document.createElement("div");l.style.position="absolute";l.style.top="40px";l.style.left="0px";l.style.width="202px";l.style.bottom="60px";l.style.overflow="auto";p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";var q=null,x=[],y=document.createElement("div");y.style.position="relative";y.style.left="0px";y.style.right="0px";n(f);c.style.padding=
-"30px";c.appendChild(g);c.appendChild(l);c.appendChild(p);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.position="relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;f.appendChild(A);n=
-document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(C){A.checked=!A.checked;mxEvent.consume(C)});var B=document.createElement("input");B.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(B),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),B.style.position="relative",B.style.top="1px",
-B.checked=!0,B.defaultChecked=!0,mxEvent.addListener(n,"click",function(C){mxEvent.getSource(C)!=B&&(B.checked=!B.checked,mxEvent.consume(C))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var C=[],E=0;E<x.length;E++){var G=x[E].apply(this,arguments);null!=G&&C.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(E=mxUtils.indexOf(C,".scratchpad"),null!=b.scratchpad!=
-(0<=E&&0<C.splice(E,1).length)&&b.toggleScratchpad(),E=mxUtils.indexOf(C,"search"),mxSettings.settings.search=0<=E&&0<C.splice(E,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),B.checked&&mxSettings.save());b.sidebar.showEntries(C.join(";"),B.checked,!0);b.setSidebarTitles(A.checked,B.checked)});g.className="geBtn gePrimaryBtn"}else{var I=document.createElement("table");n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");
-I.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var O=mxUtils.bind(this,function(C,E,G){var P=document.createElement("input");P.type="checkbox";I.appendChild(P);P.checked=b.sidebar.isEntryVisible(G);var J=document.createElement("span");mxUtils.write(J,E);E=document.createElement("div");E.style.display="block";E.appendChild(P);E.appendChild(J);mxEvent.addListener(J,"click",function(F){P.checked=!P.checked;mxEvent.consume(F)});C.appendChild(E);
-return function(){return P.checked?G:null}});g.appendChild(e);g.appendChild(m);g.appendChild(v);n.appendChild(g);I.appendChild(n);x=[];var t=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)t++;var z=[e,m,v],L=0;for(n=0;n<f.length;n++)(function(C){for(var E=0;E<C.entries.length;E++){var G=C.entries[E];x.push(O(z[Math.floor(L/(t/3))],G.title,G.id));L++}})(f[n]);c.appendChild(I);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";B=document.createElement("input");
-isLocalStorage&&(B.setAttribute("type","checkbox"),B.checked=!0,B.defaultChecked=!0,f.appendChild(B),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(C){B.checked=!B.checked;mxEvent.consume(C)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var C=["search"],E=0;E<x.length;E++){var G=
-x[E].apply(this,arguments);null!=G&&C.push(G)}b.sidebar.showEntries(0<C.length?C.join(";"):"",B.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerHTML=
-"";for(var y=0;y<d.length;y++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var B=document.createElement("span");B.className="geSprite geSprite-delete";B.style.position="relative";B.style.cursor="pointer";B.style.top="5px";B.style.marginRight="4px";B.style.display="inline-block";A.appendChild(B);mxUtils.write(A,d[y]);v.appendChild(A);mxUtils.br(v);mxEvent.addListener(B,"click",function(I){return function(){b.confirm(mxResources.get("delete")+' "'+d[I]+'"?',function(){null!=f&&
-f(d[I]);d.splice(I,1);m()})}}(y))}}}var n=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var d=mxSettings.getPlugins().slice(),g=!1;n.appendChild(v);m();g=!1;var k=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(y){y&&0>mxUtils.indexOf(d,y)&&d.push(y);m()})}:function(){var y=document.createElement("div"),A=document.createElement("span");A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");
-y.appendChild(A);var B=document.createElement("select");B.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var I=document.createElement("option");mxUtils.write(I,App.publicPlugin[A]);I.value=App.publicPlugin[A];B.appendChild(I)}y.appendChild(B);mxUtils.br(y);mxUtils.br(y);A=mxUtils.button(mxResources.get("custom")+"...",function(){var O=new FilenameDialog(b,"",mxResources.get("add"),function(t){b.hideDialog();if(null!=t&&0<t.length){t=t.split(";");for(var z=0;z<t.length;z++){var L=t[z],
-C=App.pluginRegistry[L];null!=C&&(L=C);0<L.length&&0>mxUtils.indexOf(d,L)&&d.push(L)}m()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(O.container,300,80,!0,!0);O.init()});A.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var O=App.pluginRegistry[B.value];0>mxUtils.indexOf(d,O)&&(d.push(O),m())}),null,null,null,A);b.showDialog(y.container,300,100,!0,!0)});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+"30px";c.appendChild(g);c.appendChild(l);c.appendChild(p);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;f.appendChild(z);n=
+document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(B){z.checked=!z.checked;mxEvent.consume(B)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(A),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),A.style.position="relative",A.style.top="1px",
+A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(n,"click",function(B){mxEvent.getSource(B)!=A&&(A.checked=!A.checked,mxEvent.consume(B))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var B=[],C=0;C<x.length;C++){var G=x[C].apply(this,arguments);null!=G&&B.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(C=mxUtils.indexOf(B,".scratchpad"),null!=b.scratchpad!=
+(0<=C&&0<B.splice(C,1).length)&&b.toggleScratchpad(),C=mxUtils.indexOf(B,"search"),mxSettings.settings.search=0<=C&&0<B.splice(C,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(B.join(";"),A.checked,!0);b.setSidebarTitles(z.checked,A.checked)});g.className="geBtn gePrimaryBtn"}else{var K=document.createElement("table");n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");
+K.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var P=mxUtils.bind(this,function(B,C,G){var N=document.createElement("input");N.type="checkbox";K.appendChild(N);N.checked=b.sidebar.isEntryVisible(G);var I=document.createElement("span");mxUtils.write(I,C);C=document.createElement("div");C.style.display="block";C.appendChild(N);C.appendChild(I);mxEvent.addListener(I,"click",function(F){N.checked=!N.checked;mxEvent.consume(F)});B.appendChild(C);
+return function(){return N.checked?G:null}});g.appendChild(e);g.appendChild(m);g.appendChild(v);n.appendChild(g);K.appendChild(n);x=[];var L=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)L++;var u=[e,m,v],D=0;for(n=0;n<f.length;n++)(function(B){for(var C=0;C<B.entries.length;C++){var G=B.entries[C];x.push(P(u[Math.floor(D/(L/3))],G.title,G.id));D++}})(f[n]);c.appendChild(K);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";A=document.createElement("input");
+isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,f.appendChild(A),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(B){A.checked=!A.checked;mxEvent.consume(B)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var B=["search"],C=0;C<x.length;C++){var G=
+x[C].apply(this,arguments);null!=G&&B.push(G)}b.sidebar.showEntries(0<B.length?B.join(";"):"",A.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerHTML=
+"";for(var y=0;y<d.length;y++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var A=document.createElement("span");A.className="geSprite geSprite-delete";A.style.position="relative";A.style.cursor="pointer";A.style.top="5px";A.style.marginRight="4px";A.style.display="inline-block";z.appendChild(A);mxUtils.write(z,d[y]);v.appendChild(z);mxUtils.br(v);mxEvent.addListener(A,"click",function(K){return function(){b.confirm(mxResources.get("delete")+' "'+d[K]+'"?',function(){null!=f&&
+f(d[K]);d.splice(K,1);m()})}}(y))}}}var n=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var d=mxSettings.getPlugins().slice(),g=!1;n.appendChild(v);m();g=!1;var k=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(y){y&&0>mxUtils.indexOf(d,y)&&d.push(y);m()})}:function(){var y=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");
+y.appendChild(z);var A=document.createElement("select");A.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var K=document.createElement("option");mxUtils.write(K,App.publicPlugin[z]);K.value=App.publicPlugin[z];A.appendChild(K)}y.appendChild(A);mxUtils.br(y);mxUtils.br(y);z=mxUtils.button(mxResources.get("custom")+"...",function(){var P=new FilenameDialog(b,"",mxResources.get("add"),function(L){b.hideDialog();if(null!=L&&0<L.length){L=L.split(";");for(var u=0;u<L.length;u++){var D=L[u],
+B=App.pluginRegistry[D];null!=B&&(D=B);0<D.length&&0>mxUtils.indexOf(d,D)&&d.push(D)}m()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(P.container,300,80,!0,!0);P.init()});z.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var P=App.pluginRegistry[A.value];0>mxUtils.indexOf(d,P)&&(d.push(P),m())}),null,null,null,z);b.showDialog(y.container,300,100,!0,!0)});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
l.className="geBtn";var p=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){g?(mxSettings.setPlugins(d),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});p.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});x.className="geBtn";b.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var C=B.checked,E=I.checked,G=x.geometry,P=g.width,J=g.height,F=(300-P)/2,H=(300-J)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+P&&(G.width=F+P-G.x,G.x=Math.min(G.x,F+P));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+J&&
-(G.height=H+J-G.y,G.y=Math.min(G.y,H+J));var S=(G.x-F)/P*100;P=100-(G.x+G.width-F)/P*100;F=(G.y-H)/J*100;G=100-(G.y+G.height-H)/J*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(P)+"% "+mxUtils.format(G)+"% "+mxUtils.format(S)+"%"+(C?" round "+q+"%":E?" round 50%":"")+")"}function n(C){null!=l&&(!0!==C&&(l.model.setGeometry(x,p.clone()),q=5,t.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.style.visibility=B.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");
-d.style.height="300px";d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function C(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var E=l.createVertexHandler;l.createVertexHandler=function(){var K=
-E.apply(this,arguments);K.livePreview=!1;return K};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,P=g.width,J=g.height,F=(300-P)/2,H=(300-J)/2,S=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),V=parseFloat(S[0]),M=parseFloat(S[1]),W=parseFloat(S[2]),U=parseFloat(S[3]);isFinite(V)&&isFinite(M)&&isFinite(W)&&isFinite(U)?(G.x=U/100*P+F,G.y=V/100*J+H,G.width=(100-M)/100*P+F-G.x,G.height=(100-W)/100*J+H-G.y,"round"==S[4]?"50%"==S[5]?I.setAttribute("checked","checked"):(q=parseInt(S[5]),t.value=
-q,B.setAttribute("checked","checked"),O.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(K){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,C);l.addListener(mxEvent.CELLS_RESIZED,C);var X=l.graphHandler.mouseUp,u=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){u.apply(this,arguments);k.style.backgroundColor=
-""};l.dblClick=function(){};var D=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){D.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,
-100,100,100),q=5,x=new mxCell("",p.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);
-var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id","croppingRounded");B.setAttribute("name","croppingShape");B.style.margin="5px";v.appendChild(B);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var I=document.createElement("input");I.setAttribute("type","radio");I.setAttribute("id","croppingEllipse");I.setAttribute("name","croppingShape");I.style.margin="5px";v.appendChild(I);
-e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(A,"change",n);mxEvent.addListener(B,"change",n);mxEvent.addListener(I,"change",n);var O=document.createElement("div");O.style.textAlign="center";O.style.visibility="hidden";var t=document.createElement("input");t.setAttribute("type","range");t.setAttribute("min","1");t.setAttribute("max","49");t.setAttribute("value",q);t.setAttribute("title",mxResources.get("arcSize"));
-O.appendChild(t);v.appendChild(O);mxEvent.addListener(t,"change",function(){q=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";d=mxUtils.button(mxResources.get("apply"),function(){c(m(),x.geometry.width,x.geometry.height);b.hideDialog()});d.className="geBtn gePrimaryBtn";var z=mxUtils.button(mxResources.get("reset"),function(){c(null,g.width,g.height);b.hideDialog()});z.className="geBtn";var L=document.createElement("div");L.style.marginTop=
-"10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(e),L.appendChild(z),L.appendChild(d)):(L.appendChild(z),L.appendChild(d),L.appendChild(e));v.appendChild(L);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,m=document.createElement("div"),n=document.createElement("table"),v=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");n.style.paddingLeft=
+!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var B=A.checked,C=K.checked,G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+N&&(G.width=F+N-G.x,G.x=Math.min(G.x,F+N));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+I&&
+(G.height=H+I-G.y,G.y=Math.min(G.y,H+I));var R=(G.x-F)/N*100;N=100-(G.x+G.width-F)/N*100;F=(G.y-H)/I*100;G=100-(G.y+G.height-H)/I*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(N)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(B?" round "+q+"%":C?" round 50%":"")+")"}function n(B){null!=l&&(!0!==B&&(l.model.setGeometry(x,p.clone()),q=5,L.value=q),l.model.setStyle(x,y+m()),l.selectAll(),P.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");
+d.style.height="300px";d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function B(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var C=l.createVertexHandler;l.createVertexHandler=function(){var M=
+C.apply(this,arguments);M.livePreview=!1;return M};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2,R=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),W=parseFloat(R[0]),J=parseFloat(R[1]),V=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(W)&&isFinite(J)&&isFinite(V)&&isFinite(U)?(G.x=U/100*N+F,G.y=W/100*I+H,G.width=(100-J)/100*N+F-G.x,G.height=(100-V)/100*I+H-G.y,"round"==R[4]?"50%"==R[5]?K.setAttribute("checked","checked"):(q=parseInt(R[5]),L.value=
+q,A.setAttribute("checked","checked"),P.style.visibility="visible"):z.setAttribute("checked","checked")):f=null}else f=null}catch(M){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,B);l.addListener(mxEvent.CELLS_RESIZED,B);var X=l.graphHandler.mouseUp,t=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){t.apply(this,arguments);k.style.backgroundColor=
+""};l.dblClick=function(){};var E=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){E.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,
+100,100,100),q=5,x=new mxCell("",p.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";v.appendChild(z);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);
+var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var K=document.createElement("input");K.setAttribute("type","radio");K.setAttribute("id","croppingEllipse");K.setAttribute("name","croppingShape");K.style.margin="5px";v.appendChild(K);
+e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(z,"change",n);mxEvent.addListener(A,"change",n);mxEvent.addListener(K,"change",n);var P=document.createElement("div");P.style.textAlign="center";P.style.visibility="hidden";var L=document.createElement("input");L.setAttribute("type","range");L.setAttribute("min","1");L.setAttribute("max","49");L.setAttribute("value",q);L.setAttribute("title",mxResources.get("arcSize"));
+P.appendChild(L);v.appendChild(P);mxEvent.addListener(L,"change",function(){q=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";d=mxUtils.button(mxResources.get("apply"),function(){c(m(),x.geometry.width,x.geometry.height);b.hideDialog()});d.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("reset"),function(){c(null,g.width,g.height);b.hideDialog()});u.className="geBtn";var D=document.createElement("div");D.style.marginTop=
+"10px";D.style.textAlign="right";b.editor.cancelFirst?(D.appendChild(e),D.appendChild(u),D.appendChild(d)):(D.appendChild(u),D.appendChild(d),D.appendChild(e));v.appendChild(D);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,m=document.createElement("div"),n=document.createElement("table"),v=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");n.style.paddingLeft=
"6px";mxUtils.write(g,mxResources.get("relative")+":");var l=document.createElement("input");l.setAttribute("type","checkbox");null!=c&&c.relative&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);this.init=function(){l.focus()};k.appendChild(l);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type",
"text");p.style.width="100px";p.value=null!=c?c.x:"";k.appendChild(p);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.y:"";k.appendChild(q);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
k=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c&&null!=c.offset?c.offset.x:"";k.appendChild(x);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("dy")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";
-y.value=null!=c&&null!=c.offset?c.offset.y:"";k.appendChild(y);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.width:"";k.appendChild(A);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=
-document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="100px";B.value=null!=c?c.height:"";k.appendChild(B);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.width="100px";I.value=
-1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(I);d.appendChild(g);d.appendChild(k);v.appendChild(d);n.appendChild(v);m.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var O=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var t=0;t<e.length;t++){var z=f.getCellGeometry(e[t]);null!=z&&(z=z.clone(),f.isCellMovable(e[t])&&(z.relative=l.checked,
-0<mxUtils.trim(p.value).length&&(z.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(z.y=Number(q.value)),0<mxUtils.trim(x.value).length&&(null==z.offset&&(z.offset=new mxPoint),z.offset.x=Number(x.value)),0<mxUtils.trim(y.value).length&&(null==z.offset&&(z.offset=new mxPoint),z.offset.y=Number(y.value))),f.isCellResizable(e[t])&&(0<mxUtils.trim(A.value).length&&(z.width=Number(A.value)),0<mxUtils.trim(B.value).length&&(z.height=Number(B.value))),f.getModel().setGeometry(e[t],z));0<mxUtils.trim(I.value).length&&
-f.setCellStyles(mxConstants.STYLE_ROTATION,Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(E){for(E=document.elementFromPoint(E.clientX,
-E.clientY);null!=E&&E.parentNode!=x;)E=E.parentNode;var G=null;if(null!=E){var P=x.firstChild;for(G=0;null!=P&&P!=E;)P=P.nextSibling,G++}return G}function d(E,G,P,J,F,H,S,V,M){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==E&&null!=S||null==A[E]){var W=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));Q.style.color=null==R.title||0==
-R.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var U=F,X=H;if(F>b.maxImageSize||H>b.maxImageSize){var u=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,H));F*=u;H*=u}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var D=document.createElement("div");D.setAttribute("draggable","true");D.style.display="inline-block";D.style.position="relative";D.style.padding="0 12px";D.style.cursor="move";mxUtils.setPrefixedStyle(D.style,"transition",
-"transform .1s ease-in-out");if(null!=E){var K=document.createElement("img");K.setAttribute("src",t.convert(E));K.style.width=U+"px";K.style.height=X+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((100-X)/2)+"px";K.style.paddingLeft=Math.floor((100-U)/2)+"px";D.appendChild(K)}else if(null!=S){var T=b.stringToCells(Graph.decompress(S.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,D,null,!0,!1),D.firstChild.style.display="inline-block",D.firstChild.style.cursor="")}var N=document.createElement("img");
-N.setAttribute("src",Editor.closeBlackImage);N.setAttribute("border","0");N.setAttribute("title",mxResources.get("delete"));N.setAttribute("align","top");N.style.paddingTop="4px";N.style.position="absolute";N.style.marginLeft="-12px";N.style.zIndex="1";N.style.cursor="pointer";mxEvent.addListener(N,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,fa,aa){mxEvent.addListener(N,"click",function(va){A[fa]=null;for(var ja=0;ja<l.length;ja++)if(null!=l[ja].data&&l[ja].data==fa||null!=l[ja].xml&&
-null!=aa&&l[ja].xml==aa.xml){l.splice(ja,1);break}D.parentNode.removeChild(Z);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(va)});mxEvent.addListener(N,"dblclick",function(va){mxEvent.consume(va)})})(D,E,S);D.appendChild(N);D.style.marginBottom="30px";var Q=document.createElement("div");Q.style.position="absolute";Q.style.boxSizing="border-box";Q.style.bottom="-18px";Q.style.left="10px";Q.style.right="10px";Q.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";Q.style.overflow="hidden";Q.style.textAlign="center";var R=null;null!=E?(R={data:E,w:F,h:H,title:M},null!=V&&(R.aspect=V),A[E]=K,l.push(R)):null!=S&&(S.aspect="fixed",l.push(S),R=S);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=O&&(O(),O=null,mxEvent.consume(Z))});W();D.appendChild(Q);mxEvent.addListener(Q,"mousedown",function(Z){"true"!=Q.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
-!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,R.title||"",mxResources.get("ok"),function(aa){null!=aa&&(R.title=aa,W())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=O&&(O(),O=null);if(null==R.title||0==R.title.length)Q.innerHTML="";Q.style.textOverflow="";Q.style.whiteSpace="";Q.style.cursor="text";Q.style.color="";Q.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(Q.style,"user-select","text");Q.focus();document.execCommand("selectAll",!1,null);O=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";R.title=Q.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(D,"dblclick",T);x.appendChild(D);mxEvent.addListener(D,"dragstart",function(Z){null==E&&null!=S&&(N.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",
-S.xml);B=v(Z);mxClient.IS_GC&&(D.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);N.style.visibility="";Q.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(Z){"hidden"==N.style.visibility&&(N.style.visibility="",Q.style.visibility="");B=null;mxUtils.setOpacity(D,100);mxUtils.setPrefixedStyle(D.style,"transform",null)})}else z||(z=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
-!1;try{if(U=mxUtils.parseXml(E),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){X=mxUtils.getTextContent(ba[Y]);T=b.stringToCells(Graph.decompress(X));var ea=b.editor.graph.getBoundingBoxFromGeometry(T);
-d(null,null,0,0,0,0,{xml:X,w:ea.width,h:ea.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function g(E){E.dataTransfer.dropEffect=null!=B?"move":"copy";E.stopPropagation();E.preventDefault()}function k(E){E.stopPropagation();E.preventDefault();z=!1;I=v(E);if(null!=B)null!=I&&I<x.children.length?(l.splice(I>B?I-1:I,0,l.splice(B,1)[0]),x.insertBefore(x.children[B],x.children[I])):(l.push(l.splice(B,1)[0]),x.appendChild(x.children[B]));
-else if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,0,0,b.maxImageSize,L(E));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(E.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(P){d(G,null,0,0,P.width,P.height);x.scrollTop=x.scrollHeight})}E.stopPropagation();E.preventDefault()}var l=[];f=document.createElement("div");
+y.value=null!=c&&null!=c.offset?c.offset.y:"";k.appendChild(y);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=c?c.width:"";k.appendChild(z);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=
+document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";k.appendChild(A);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=
+1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(K);d.appendChild(g);d.appendChild(k);v.appendChild(d);n.appendChild(v);m.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var P=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var L=0;L<e.length;L++){var u=f.getCellGeometry(e[L]);null!=u&&(u=u.clone(),f.isCellMovable(e[L])&&(u.relative=l.checked,
+0<mxUtils.trim(p.value).length&&(u.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(u.y=Number(q.value)),0<mxUtils.trim(x.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.x=Number(x.value)),0<mxUtils.trim(y.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.y=Number(y.value))),f.isCellResizable(e[L])&&(0<mxUtils.trim(z.value).length&&(u.width=Number(z.value)),0<mxUtils.trim(A.value).length&&(u.height=Number(A.value))),f.getModel().setGeometry(e[L],u));0<mxUtils.trim(K.value).length&&
+f.setCellStyles(mxConstants.STYLE_ROTATION,Number(K.value),[e[L]])}}finally{f.getModel().endUpdate()}});P.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(L){13==L.keyCode&&P.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(P)):(n.appendChild(P),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(C){for(C=document.elementFromPoint(C.clientX,
+C.clientY);null!=C&&C.parentNode!=x;)C=C.parentNode;var G=null;if(null!=C){var N=x.firstChild;for(G=0;null!=N&&N!=C;)N=N.nextSibling,G++}return G}function d(C,G,N,I,F,H,R,W,J){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==C&&null!=R||null==z[C]){var V=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=S.title&&0<S.title.length?S.title:mxResources.get("untitled"));Q.style.color=null==S.title||0==
+S.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var U=F,X=H;if(F>b.maxImageSize||H>b.maxImageSize){var t=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,H));F*=t;H*=t}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display="inline-block";E.style.position="relative";E.style.padding="0 12px";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition",
+"transform .1s ease-in-out");if(null!=C){var M=document.createElement("img");M.setAttribute("src",L.convert(C));M.style.width=U+"px";M.style.height=X+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((100-X)/2)+"px";M.style.paddingLeft=Math.floor((100-U)/2)+"px";E.appendChild(M)}else if(null!=R){var T=b.stringToCells(Graph.decompress(R.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,E,null,!0,!1),E.firstChild.style.display="inline-block",E.firstChild.style.cursor="")}var O=document.createElement("img");
+O.setAttribute("src",Editor.closeBlackImage);O.setAttribute("border","0");O.setAttribute("title",mxResources.get("delete"));O.setAttribute("align","top");O.style.paddingTop="4px";O.style.position="absolute";O.style.marginLeft="-12px";O.style.zIndex="1";O.style.cursor="pointer";mxEvent.addListener(O,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,fa,aa){mxEvent.addListener(O,"click",function(va){z[fa]=null;for(var ja=0;ja<l.length;ja++)if(null!=l[ja].data&&l[ja].data==fa||null!=l[ja].xml&&
+null!=aa&&l[ja].xml==aa.xml){l.splice(ja,1);break}E.parentNode.removeChild(Z);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(va)});mxEvent.addListener(O,"dblclick",function(va){mxEvent.consume(va)})})(E,C,R);E.appendChild(O);E.style.marginBottom="30px";var Q=document.createElement("div");Q.style.position="absolute";Q.style.boxSizing="border-box";Q.style.bottom="-18px";Q.style.left="10px";Q.style.right="10px";Q.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";Q.style.overflow="hidden";Q.style.textAlign="center";var S=null;null!=C?(S={data:C,w:F,h:H,title:J},null!=W&&(S.aspect=W),z[C]=M,l.push(S)):null!=R&&(R.aspect="fixed",l.push(R),S=R);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=P&&(P(),P=null,mxEvent.consume(Z))});V();E.appendChild(Q);mxEvent.addListener(Q,"mousedown",function(Z){"true"!=Q.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
+!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(aa){null!=aa&&(S.title=aa,V())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=P&&(P(),P=null);if(null==S.title||0==S.title.length)Q.innerHTML="";Q.style.textOverflow="";Q.style.whiteSpace="";Q.style.cursor="text";Q.style.color="";Q.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(Q.style,"user-select","text");Q.focus();document.execCommand("selectAll",!1,null);P=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";S.title=Q.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(E,"dblclick",T);x.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==C&&null!=R&&(O.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
+R.xml);A=v(Z);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);O.style.visibility="";Q.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(Z){"hidden"==O.style.visibility&&(O.style.visibility="",Q.style.visibility="");A=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else u||(u=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
+!1;try{if(U=mxUtils.parseXml(C),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){X=mxUtils.getTextContent(ba[Y]);T=b.stringToCells(Graph.decompress(X));var ea=b.editor.graph.getBoundingBoxFromGeometry(T);
+d(null,null,0,0,0,0,{xml:X,w:ea.width,h:ea.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function g(C){C.dataTransfer.dropEffect=null!=A?"move":"copy";C.stopPropagation();C.preventDefault()}function k(C){C.stopPropagation();C.preventDefault();u=!1;K=v(C);if(null!=A)null!=K&&K<x.children.length?(l.splice(K>A?K-1:K,0,l.splice(A,1)[0]),x.insertBefore(x.children[A],x.children[K])):(l.push(l.splice(A,1)[0]),x.appendChild(x.children[A]));
+else if(0<C.dataTransfer.files.length)b.importFiles(C.dataTransfer.files,0,0,b.maxImageSize,D(C));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(C.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(N){d(G,null,0,0,N.width,N.height);x.scrollTop=x.scrollHeight})}C.stopPropagation();C.preventDefault()}var l=[];f=document.createElement("div");
f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",e);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==m||m.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==m||m.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);var x=document.createElement("div");x.style.borderWidth="1px 0px 1px 0px";x.style.borderColor="#d3d3d3";x.style.borderStyle="solid";x.style.marginTop="6px";x.style.overflow="auto";x.style.height="340px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var y=document.createElement("div");
-y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));f.appendChild(y);var A={},B=null,I=null,O=null;e=function(E){"true"!=mxEvent.getSource(E).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(E))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var t=new mxUrlConverter,z=
-!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(E){y.style.cursor="";for(var G=mxEvent.getSource(E);null!=G;){if(G==x||G==y){E.stopPropagation();E.preventDefault();break}G=G.parentNode}});var L=function(E){return function(G,P,J,F,H,S,V,M,W){null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W.name)||/(\.vs(x|sx?))($|\?)/i.test(W.name))?b.importVisio(W,mxUtils.bind(this,function(U){d(U,P,J,F,H,S,V,"fixed",mxEvent.isAltDown(E)?
-null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," "))})):null!=W&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,W.name)?b.isExternalDataComms()?b.parseFile(W,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(d(U.responseText,P,J,F,H,S,V,"fixed",mxEvent.isAltDown(E)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(d(G,P,J,F,H,S,V,"fixed",mxEvent.isAltDown(E)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&
-c.appendChild(e);"draw.io"!=b.getServiceName()||null==m||m.constructor!=DriveLibrary&&m.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&m.getPublicUrl(function(E){b.spinner.stop();if(null!=E){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(E);E=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(E.container,450,240,!0);E.init()}else m.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(m.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("export"),
-function(){var E=b.createLibraryDataFromImages(l),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(E,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(E))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";c.appendChild(p);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");
-C.setAttribute("type","file");mxEvent.addListener(C,"change",function(E){z=!1;b.importFiles(C.files,0,0,b.maxImageSize,function(G,P,J,F,H,S,V,M,W){null!=C.files&&(L(E)(G,P,J,F,H,S,V,M,W),C.type="",C.type="file",C.value="")});x.scrollTop=x.scrollHeight});C.style.display="none";document.body.appendChild(C);b.libDlgFileInputElt=C}p=mxUtils.button(mxResources.get("import"),function(){null!=O&&(O(),O=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
-mxUtils.button(mxResources.get("addImages"),function(){null!=O&&(O(),O=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(E,G,P){z=!1;if(null!=E){if("data:image/"==E.substring(0,11)){var J=E.indexOf(",");0<J&&(E=E.substring(0,J)+";base64,"+E.substring(J+1))}d(E,null,0,0,G,P);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(E,G,P,J){b.saveLibrary(E,G,P,J)};p=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=O&&(O(),O=null);this.saveBtnClickHandler(q.value,l,m,n)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";c.appendChild(p);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,m){c=null!=c?c:300;m=null!=m?m:120;var n=document.createElement("table"),v=document.createElement("tbody");n.style.cellPadding="4px";var d=document.createElement("tr");var g=document.createElement("td");g.setAttribute("colspan",
+y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));f.appendChild(y);var z={},A=null,K=null,P=null;e=function(C){"true"!=mxEvent.getSource(C).getAttribute("contentEditable")&&null!=P&&(P(),P=null,mxEvent.consume(C))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var L=new mxUrlConverter,u=
+!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(C){y.style.cursor="";for(var G=mxEvent.getSource(C);null!=G;){if(G==x||G==y){C.stopPropagation();C.preventDefault();break}G=G.parentNode}});var D=function(C){return function(G,N,I,F,H,R,W,J,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(U){d(U,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?
+null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(d(U.responseText,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(d(G,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&
+c.appendChild(e);"draw.io"!=b.getServiceName()||null==m||m.constructor!=DriveLibrary&&m.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&m.getPublicUrl(function(C){b.spinner.stop();if(null!=C){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(C);C=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(C.container,450,240,!0);C.init()}else m.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(m.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("export"),
+function(){var C=b.createLibraryDataFromImages(l),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(C,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(C))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";c.appendChild(p);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");
+B.setAttribute("type","file");mxEvent.addListener(B,"change",function(C){u=!1;b.importFiles(B.files,0,0,b.maxImageSize,function(G,N,I,F,H,R,W,J,V){null!=B.files&&(D(C)(G,N,I,F,H,R,W,J,V),B.type="",B.type="file",B.value="")});x.scrollTop=x.scrollHeight});B.style.display="none";document.body.appendChild(B);b.libDlgFileInputElt=B}p=mxUtils.button(mxResources.get("import"),function(){null!=P&&(P(),P=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
+mxUtils.button(mxResources.get("addImages"),function(){null!=P&&(P(),P=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(C,G,N){u=!1;if(null!=C){if("data:image/"==C.substring(0,11)){var I=C.indexOf(",");0<I&&(C=C.substring(0,I)+";base64,"+C.substring(I+1))}d(C,null,0,0,G,N);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(C,G,N,I){b.saveLibrary(C,G,N,I)};p=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=P&&(P(),P=null);this.saveBtnClickHandler(q.value,l,m,n)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";c.appendChild(p);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,m){c=null!=c?c:300;m=null!=m?m:120;var n=document.createElement("table"),v=document.createElement("tbody");n.style.cellPadding="4px";var d=document.createElement("tr");var g=document.createElement("td");g.setAttribute("colspan",
"2");g.style.fontSize="10pt";mxUtils.write(g,f);d.appendChild(g);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");var k=document.createElement("textarea");k.style.outline="none";k.style.resize="none";k.style.width=c-200+"px";k.style.height=m+"px";this.textarea=k;this.init=function(){k.focus();k.scrollTop=0};g.appendChild(k);d.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
"6px";f.style.width="200px";f.style.height=m+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var l=new Graph(f);l.setEnabled(!1);var p=b.editor.graph.cloneCell(e);l.addCells([p]);f=l.view.getState(p);var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(k,q||"");f=l.getGraphBounds();m=Math.min(160/f.width,(m-40)/f.height);l.view.scaleAndTranslate(m,20/m-f.x,20/m-f.y);d.appendChild(g);
v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),m.className="geBtn",g.appendChild(m));m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&g.appendChild(m);
-var x=function(y,A,B){var I=k.value,O=mxUtils.parseXml(I);I=mxUtils.getPrettyXml(O.documentElement);O=O.documentElement.getElementsByTagName("parsererror");if(null!=O&&0<O.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(B&&b.hideDialog(),O=!y.model.contains(A),!B||O||I!=q){I=Graph.compress(I);y.getModel().beginUpdate();try{if(O){var t=b.editor.graph.getFreeInsertPoint();A.geometry.x=t.x;A.geometry.y=t.y;y.addCell(A)}y.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+I+")",[A])}catch(z){throw z;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(A),y.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,
+var x=function(y,z,A){var K=k.value,P=mxUtils.parseXml(K);K=mxUtils.getPrettyXml(P.documentElement);P=P.documentElement.getElementsByTagName("parsererror");if(null!=P&&0<P.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),P=!y.model.contains(z),!A||P||K!=q){K=Graph.compress(K);y.getModel().beginUpdate();try{if(P){var L=b.editor.graph.getFreeInsertPoint();z.geometry.x=L.x;z.geometry.y=L.y;y.addCell(z)}y.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+K+")",[z])}catch(u){throw u;}finally{y.getModel().endUpdate()}P&&(y.setSelectionCell(z),y.scrollCellToVisible(z))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,
v,d,g,k,l){var p=document.createElement("div");p.appendChild(e);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=v&&q.appendChild(v);b.isOffline()||null==n||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),e.className="geBtn",q.appendChild(e));g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});g.className="geBtn";d&&(g.style.display="none");b.editor.cancelFirst&&q.appendChild(g);m=mxUtils.button(m||
-mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,A){x=mxUtils.button(x,function(B){y(B)});null!=A&&x.setAttribute("title",A);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);
-p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function A(ha){Ga.innerHTML=mxUtils.htmlEntities(ha);Ga.style.display="block";setTimeout(function(){Ga.style.display="none"},4E3)}function B(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",u=X,X=null)}function I(ha,da,ca,la,ia,ma,ra){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";M.querySelector(".geTempDlgRadioBtn[data-id="+
-la+"]").className="geTempDlgRadioBtn "+(ra?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");M.querySelector("."+da).src="/images/"+ca+"-sel.svg";M.querySelector("."+ia).src="/images/"+ma+".svg";return!0}function O(ha,da,ca,la){function ia(na,Ka){null==ra?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(ra=Ia.getText());Ka(ra)}))):Ka(ra)}
+mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,z){x=mxUtils.button(x,function(A){y(A)});null!=z&&x.setAttribute("title",z);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);
+p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function z(ha){Ga.innerHTML=mxUtils.htmlEntities(ha);Ga.style.display="block";setTimeout(function(){Ga.style.display="none"},4E3)}function A(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",t=X,X=null)}function K(ha,da,ca,la,ia,ma,ra){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";J.querySelector(".geTempDlgRadioBtn[data-id="+
+la+"]").className="geTempDlgRadioBtn "+(ra?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");J.querySelector("."+da).src="/images/"+ca+"-sel.svg";J.querySelector("."+ia).src="/images/"+ma+".svg";return!0}function P(ha,da,ca,la){function ia(na,Ka){null==ra?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(ra=Ia.getText());Ka(ra)}))):Ka(ra)}
function ma(na,Ka,Ia){if(null!=na&&mxUtils.isAncestorNode(document.body,da)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(da,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ka,Ia),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";M.appendChild(Ja);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(M.removeChild(Ja),Ja=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=Oa)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var ra=null;if(Ea||b.sidebar.currentElt==
-da)b.sidebar.hideTooltip();else{var pa=function(na){Ea&&b.sidebar.currentElt==da&&ma(na,mxEvent.getClientX(la),mxEvent.getClientY(la));Ea=!1;ca.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=da;Ea=!0;ca.src="/images/aui-wait.gif";ha.isExt?g(ha,pa,function(){A(mxResources.get("cantLoadPrev"));Ea=!1;ca.src="/images/icon-search.svg"}):ia(ha.url,pa)}}function t(ha,da,ca){if(null!=D){for(var la=D.className.split(" "),ia=0;ia<la.length;ia++)if(-1<la[ia].indexOf("Active")){la.splice(ia,
-1);break}D.className=la.join(" ")}null!=ha?(D=ha,D.className+=" "+da,K=ca,Aa.className="geTempDlgCreateBtn"):(K=D=null,Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=K){var ca=function(pa){ra.isExternal?g(ra,function(na){la(na,pa)},ia):ra.url?mxUtils.get(TEMPLATE_PATH+"/"+ra.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,ra,da)},ia=function(){A(mxResources.get("cannotLoad"));
-ma()},ma=function(){K=ra;Aa.className="geTempDlgCreateBtn";da&&(Ha.className="geTempDlgOpenBtn")},ra=K;K=null;"boolean"!==typeof da&&(da=ra.isExternal&&p);1==ha?k(ra.url,ra):da?(Ha.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ca()):(Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ca,ha,function(pa){var na=null!=pa&&0<pa.length;return na&&y?(ca(pa),!1):na},null,null,null,ma,x?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function L(ha){Aa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";p&&(Ha.style.display=ha);for(var da=M.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<da.length;ca++)da[ca].style.display=ha}function C(ha,da,ca,la,ia){ia||(aa.innerHTML="",t(),R=ha,Y=la);var ma=null;if(ca){ma=document.createElement("table");
+document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ka,Ia),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";J.appendChild(Ja);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(J.removeChild(Ja),Ja=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=Oa)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var ra=null;if(Ea||b.sidebar.currentElt==
+da)b.sidebar.hideTooltip();else{var pa=function(na){Ea&&b.sidebar.currentElt==da&&ma(na,mxEvent.getClientX(la),mxEvent.getClientY(la));Ea=!1;ca.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=da;Ea=!0;ca.src="/images/aui-wait.gif";ha.isExt?g(ha,pa,function(){z(mxResources.get("cantLoadPrev"));Ea=!1;ca.src="/images/icon-search.svg"}):ia(ha.url,pa)}}function L(ha,da,ca){if(null!=E){for(var la=E.className.split(" "),ia=0;ia<la.length;ia++)if(-1<la[ia].indexOf("Active")){la.splice(ia,
+1);break}E.className=la.join(" ")}null!=ha?(E=ha,E.className+=" "+da,M=ca,Aa.className="geTempDlgCreateBtn"):(M=E=null,Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ha,da){if(null!=M){var ca=function(pa){ra.isExternal?g(ra,function(na){la(na,pa)},ia):ra.url?mxUtils.get(TEMPLATE_PATH+"/"+ra.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,ra,da)},ia=function(){z(mxResources.get("cannotLoad"));
+ma()},ma=function(){M=ra;Aa.className="geTempDlgCreateBtn";da&&(Ha.className="geTempDlgOpenBtn")},ra=M;M=null;"boolean"!==typeof da&&(da=ra.isExternal&&p);1==ha?k(ra.url,ra):da?(Ha.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ca()):(Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),ca,ha,function(pa){var na=null!=pa&&0<pa.length;return na&&y?(ca(pa),!1):na},null,null,null,ma,x?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function D(ha){Aa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";p&&(Ha.style.display=ha);for(var da=J.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<da.length;ca++)da[ca].style.display=ha}function B(ha,da,ca,la,ia){ia||(aa.innerHTML="",L(),S=ha,Y=la);var ma=null;if(ca){ma=document.createElement("table");
ma.className="geTempDlgDiagramsListGrid";var ra=document.createElement("tr"),pa=document.createElement("th");pa.style.width="50%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));ra.appendChild(pa);pa=document.createElement("th");pa.style.width="25%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));ra.appendChild(pa);pa=document.createElement("th");pa.style.width="25%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));ra.appendChild(pa);ma.appendChild(ra);
aa.appendChild(ma)}for(ra=0;ra<ha.length;ra++){ha[ra].isExternal=!da;var na=ha[ra].url,Ka=(pa=mxUtils.htmlEntities(da?mxResources.get(ha[ra].title,null,ha[ra].title):ha[ra].title))||ha[ra].url,Ia=ha[ra].imgUrl,Ra=mxUtils.htmlEntities(ha[ra].changedBy||""),Sa="";ha[ra].lastModifiedOn&&(Sa=b.timeSince(new Date(ha[ra].lastModifiedOn)),null==Sa&&(Sa=mxResources.get("lessThanAMinute")),Sa=mxUtils.htmlEntities(mxResources.get("timeAgo",[Sa],"{1} ago")));Ia||(Ia=TEMPLATE_PATH+"/"+na.substring(0,na.length-
4)+".png");na=ca?50:15;null!=pa&&pa.length>na&&(pa=pa.substring(0,na)+"&hellip;");if(ca){var Ja=document.createElement("tr");Ia=document.createElement("td");var Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramListPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));ia||Ia.appendChild(Oa);Ka=document.createElement("span");Ka.className="geTempDlgDiagramTitle";Ka.innerHTML=pa;Ia.appendChild(Ka);Ja.appendChild(Ia);Ia=document.createElement("td");
-Ia.innerHTML=Ra;Ja.appendChild(Ia);Ia=document.createElement("td");Ia.innerHTML=Sa;Ja.appendChild(Ia);ma.appendChild(Ja);null==D&&(L(da),t(Ja,"geTempDlgDiagramsListGridActive",ha[ra]));(function(Ma,Ta,Ua){mxEvent.addListener(Ja,"click",function(){D!=Ta&&(L(da),t(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(Ja,"dblclick",z);mxEvent.addListener(Oa,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ha[ra],Ja,Oa)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
-Ka);null==D&&(L(da),t(Pa,"geTempDlgDiagramTileActive",ha[ra]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Ma,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ia?Ia.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml",""):"");Qa.src=Ia;Ra.appendChild(Qa);Pa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=pa?pa:"";Pa.appendChild(Ra);Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));ia||Pa.appendChild(Oa);(function(Ma,Ta,Ua){mxEvent.addListener(Pa,"click",function(){D!=Ta&&(L(da),t(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Pa,
-"dblclick",z);mxEvent.addListener(Oa,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ha[ra],Pa,Oa);aa.appendChild(Pa)}}for(var Ya in la)ha=la[Ya],0<ha.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),C(ha,da,ca,null,!0))}function E(ha,da){Ca.innerHTML="";t();var ca=Math.floor(Ca.offsetWidth/150)-1;da=!da&&ha.length>ca?ca:ha.length;for(var la=0;la<da;la++){var ia=ha[la];ia.isCategory=!0;var ma=document.createElement("div"),
-ra=mxResources.get(ia.title);null==ra&&(ra=ia.title.substring(0,1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",ra);ra=mxUtils.htmlEntities(ra);15<ra.length&&(ra=ra.substring(0,15)+"&hellip;");null==D&&(L(!0),t(ma,"geTempDlgNewDiagramCatItemActive",ia));var pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;pa.appendChild(na);ma.appendChild(pa);
-pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);(function(Ka,Ia){mxEvent.addListener(ma,"click",function(){D!=Ia&&(L(!0),t(Ia,"geTempDlgNewDiagramCatItemActive",Ka))});mxEvent.addListener(ma,"dblclick",z)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";ra=mxResources.get("showAllTemps");ma.setAttribute("title",ra);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";
-pa.innerHTML="...";pa.style.fontSize="32px";ma.appendChild(pa);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ka(){var Ra=Ia.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ka,200)}Z=!0;var Ia=M.querySelector(".geTemplatesList");Ia.style.display="block";Ba.style.width="";Na.style.display="";Na.value="";ba=null;Ka()});fa.style.display=ha.length<=
+Ia.innerHTML=Ra;Ja.appendChild(Ia);Ia=document.createElement("td");Ia.innerHTML=Sa;Ja.appendChild(Ia);ma.appendChild(Ja);null==E&&(D(da),L(Ja,"geTempDlgDiagramsListGridActive",ha[ra]));(function(Ma,Ta,Ua){mxEvent.addListener(Ja,"click",function(){E!=Ta&&(D(da),L(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(Ja,"dblclick",u);mxEvent.addListener(Oa,"click",function(Za){P(Ma,Ta,Ua,Za)})})(ha[ra],Ja,Oa)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
+Ka);null==E&&(D(da),L(Pa,"geTempDlgDiagramTileActive",ha[ra]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Ma,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ia?Ia.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml",""):"");Qa.src=Ia;Ra.appendChild(Qa);Pa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=pa?pa:"";Pa.appendChild(Ra);Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));ia||Pa.appendChild(Oa);(function(Ma,Ta,Ua){mxEvent.addListener(Pa,"click",function(){E!=Ta&&(D(da),L(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Pa,
+"dblclick",u);mxEvent.addListener(Oa,"click",function(Za){P(Ma,Ta,Ua,Za)})})(ha[ra],Pa,Oa);aa.appendChild(Pa)}}for(var Ya in la)ha=la[Ya],0<ha.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),B(ha,da,ca,null,!0))}function C(ha,da){Ca.innerHTML="";L();var ca=Math.floor(Ca.offsetWidth/150)-1;da=!da&&ha.length>ca?ca:ha.length;for(var la=0;la<da;la++){var ia=ha[la];ia.isCategory=!0;var ma=document.createElement("div"),
+ra=mxResources.get(ia.title);null==ra&&(ra=ia.title.substring(0,1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",ra);ra=mxUtils.htmlEntities(ra);15<ra.length&&(ra=ra.substring(0,15)+"&hellip;");null==E&&(D(!0),L(ma,"geTempDlgNewDiagramCatItemActive",ia));var pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;pa.appendChild(na);ma.appendChild(pa);
+pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);(function(Ka,Ia){mxEvent.addListener(ma,"click",function(){E!=Ia&&(D(!0),L(Ia,"geTempDlgNewDiagramCatItemActive",Ka))});mxEvent.addListener(ma,"dblclick",u)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";ra=mxResources.get("showAllTemps");ma.setAttribute("title",ra);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";
+pa.innerHTML="...";pa.style.fontSize="32px";ma.appendChild(pa);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ka(){var Ra=Ia.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ka,200)}Z=!0;var Ia=J.querySelector(".geTemplatesList");Ia.style.display="block";Ba.style.width="";Na.style.display="";Na.value="";ba=null;Ka()});fa.style.display=ha.length<=
ca?"none":""}function G(ha,da,ca){function la(Qa,Ya){var Ma=mxResources.get(Qa);null==Ma&&(Ma=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=Ma+" ("+Ya.length+")";var Ta=Ma=mxUtils.htmlEntities(Ma);15<Ma.length&&(Ma=Ma.substring(0,15)+"&hellip;");return{lbl:Ma+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function ia(Qa,Ya,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){X!=Ma&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(qa.style.display="none",Da.style.minHeight="100%"),
-X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",Ba.scrollTop=0,W&&(U=!0),va.innerHTML=Ya,ja.style.display="none",C(Ua?da[Qa]:Ta?ka[Qa][Ta]:ha[Qa],Ua?!1:!0))})}var ma=M.querySelector(".geTemplatesList");if(0<ca){ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var ra in da){ca=document.createElement("div");var pa=da[ra];
+X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",Ba.scrollTop=0,V&&(U=!0),va.innerHTML=Ya,ja.style.display="none",B(Ua?da[Qa]:Ta?ka[Qa][Ta]:ha[Qa],Ua?!1:!0))})}var ma=J.querySelector(".geTemplatesList");if(0<ca){ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var ra in da){ca=document.createElement("div");var pa=da[ra];
pa=la(ra,pa);ca.className="geTemplateCatLink";ca.setAttribute("title",pa.fullLbl);ca.innerHTML=pa.lbl;ma.appendChild(ca);ia(ra,pa.lblOnly,ca,null,!0)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,"draw.io");ma.appendChild(ca)}for(ra in ha){var na=ka[ra],Ka=ca=document.createElement(na?"ul":"div");pa=ha[ra];pa=la(ra,pa);if(null!=na){var Ia=document.createElement("li"),Ra=document.createElement("div");
Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",pa.fullLbl);Ra.innerHTML=pa.lbl;Ka=Ra;Ia.appendChild(Ra);var Sa=document.createElement("ul");Sa.className="geTempTreeNested";Sa.style.visibility="hidden";for(var Ja in na){var Oa=document.createElement("li"),Pa=la(Ja,na[Ja]);Oa.setAttribute("title",Pa.fullLbl);Oa.innerHTML=Pa.lbl;Oa.className="geTemplateCatLink";Oa.style.padding="0";Oa.style.margin="0";ia(ra,Pa.lblOnly,Oa,Ja);Sa.appendChild(Oa)}Ia.appendChild(Sa);
ca.className="geTempTree";ca.appendChild(Ia);(function(Qa,Ya){mxEvent.addListener(Ya,"click",function(){for(var Ma=Qa.querySelectorAll("li"),Ta=0;Ta<Ma.length;Ta++)Ma[Ta].style.margin="";Qa.style.visibility="visible";Qa.classList.toggle("geTempTreeActive");Qa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Ma.length;Ua++)Ma[Ua].style.margin="0";Qa.style.visibility="hidden"},250);Ya.classList.toggle("geTempTreeCaret-down")})})(Sa,Ra)}else ca.className="geTemplateCatLink geTemplateDrawioCatLink",
-ca.setAttribute("title",pa.fullLbl),ca.innerHTML=pa.lbl;ma.appendChild(ca);ia(ra,pa.lblOnly,Ka)}}function P(){mxUtils.get(c,function(ha){if(!La){La=!0;ha=ha.getXml().documentElement.firstChild;for(var da={};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("clibs"==ha.nodeName){for(var ca=ha.getAttribute("name"),la=ha.getElementsByTagName("add"),ia=[],ma=0;ma<la.length;ma++)ia.push(encodeURIComponent(mxUtils.getTextContent(la[ma])));null!=ca&&0<ia.length&&(da[ca]=ia.join(";"))}else if(ia=ha.getAttribute("url"),
+ca.setAttribute("title",pa.fullLbl),ca.innerHTML=pa.lbl;ma.appendChild(ca);ia(ra,pa.lblOnly,Ka)}}function N(){mxUtils.get(c,function(ha){if(!La){La=!0;ha=ha.getXml().documentElement.firstChild;for(var da={};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("clibs"==ha.nodeName){for(var ca=ha.getAttribute("name"),la=ha.getElementsByTagName("add"),ia=[],ma=0;ma<la.length;ma++)ia.push(encodeURIComponent(mxUtils.getTextContent(la[ma])));null!=ca&&0<ia.length&&(da[ca]=ia.join(";"))}else if(ia=ha.getAttribute("url"),
null!=ia){la=ha.getAttribute("section");ca=ha.getAttribute("subsection");if(null==la&&(ma=ia.indexOf("/"),la=ia.substring(0,ma),null==ca)){var ra=ia.indexOf("/",ma+1);-1<ra&&(ca=ia.substring(ma+1,ra))}ma=ta[la];null==ma&&(ya++,ma=[],ta[la]=ma);ia=ha.getAttribute("clibs");null!=da[ia]&&(ia=da[ia]);ia={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:ia,tags:ha.getAttribute("tags")};ma.push(ia);null!=
-ca&&(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function J(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Fa.spin(aa),U=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){A(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=u&&(u.click(),u=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia=
+ca&&(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function I(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Fa.spin(aa),U=!1,V=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=t&&(t.click(),t=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia=
ca[la];if(null!=ia.tags)for(var ma=ia.tags.toLowerCase().split(";"),ra=0;ra<ma.length;ra++)null==da[ma[ra]]&&(da[ma[ra]]=[]),da[ma[ra]].push(ia)}TemplatesDialog.tagsList[c]=da}var pa=ha.toLowerCase().split(" ");da=TemplatesDialog.tagsList[c];if(0<wa&&null==da.__tagsList__){for(Ka in oa)for(ca=oa[Ka],la=0;la<ca.length;la++)for(ia=ca[la],ma=ia.title.split(" "),ma.push(Ka),ra=0;ra<ma.length;ra++){var na=ma[ra].toLowerCase();null==da[na]&&(da[na]=[]);da[na].push(ia)}da.__tagsList__=!0}var Ka=[];ca={};
-for(la=ma=0;la<pa.length;la++)if(0<pa[la].length){na=da[pa[la]];var Ia={};Ka=[];if(null!=na)for(ra=0;ra<na.length;ra++)ia=na[ra],0==ma==(null==ca[ia.url])&&(Ia[ia.url]=!0,Ka.push(ia));ca=Ia;ma++}0==Ka.length?va.innerHTML=mxResources.get("noResultsFor",[ha]):C(Ka,!0)}}function H(ha){if(ba!=ha||N!=ea)B(),Ba.scrollTop=0,aa.innerHTML="",va.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ha)+'"',xa=null,Z?F(ha):d&&(ha?(Fa.spin(aa),U=!1,W=!0,d(ha,ua,function(){A(mxResources.get("searchFailed"));
-ua([])},N?null:n)):J(N)),ba=ha,ea=N}function S(ha){null!=xa&&clearTimeout(xa);13==ha.keyCode?H(Na.value):xa=setTimeout(function(){H(Na.value)},1E3)}var V='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+for(la=ma=0;la<pa.length;la++)if(0<pa[la].length){na=da[pa[la]];var Ia={};Ka=[];if(null!=na)for(ra=0;ra<na.length;ra++)ia=na[ra],0==ma==(null==ca[ia.url])&&(Ia[ia.url]=!0,Ka.push(ia));ca=Ia;ma++}0==Ka.length?va.innerHTML=mxResources.get("noResultsFor",[ha]):B(Ka,!0)}}function H(ha){if(ba!=ha||O!=ea)A(),Ba.scrollTop=0,aa.innerHTML="",va.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ha)+'"',xa=null,Z?F(ha):d&&(ha?(Fa.spin(aa),U=!1,V=!0,d(ha,ua,function(){z(mxResources.get("searchFailed"));
+ua([])},O?null:n)):I(O)),ba=ha,ea=O}function R(ha){null!=xa&&clearTimeout(xa);13==ha.keyCode?H(Na.value):xa=setTimeout(function(){H(Na.value)},1E3)}var W='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",M=document.createElement("div");M.innerHTML=V;M.className=
-"geTemplateDlg";this.container=M;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var W=!1,U=!1,X=null,u=null,D=null,K=null,T=!1,N=!0,Q=!1,R=[],Y=null,ba,ea,Z=!1,fa=M.querySelector(".geTempDlgShowAllBtn"),aa=M.querySelector(".geTempDlgDiagramsTiles"),va=M.querySelector(".geTempDlgDiagramsListTitle"),ja=M.querySelector(".geTempDlgDiagramsListBtns"),Ba=M.querySelector(".geTempDlgContent"),Da=M.querySelector(".geTempDlgDiagramsList"),qa=M.querySelector(".geTempDlgNewDiagramCat"),
-Ca=M.querySelector(".geTempDlgNewDiagramCatList"),Aa=M.querySelector(".geTempDlgCreateBtn"),Ha=M.querySelector(".geTempDlgOpenBtn"),Na=M.querySelector(".geTempDlgSearchBox"),Ga=M.querySelector(".geTempDlgErrMsg"),Fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(M.querySelector(".geTempDlgBack"),"click",function(){B();Z=!1;M.querySelector(".geTemplatesList").style.display="none";Ba.style.width=
-"100%";qa.style.display="";Da.style.minHeight="calc(100% - 280px)";Na.style.display=d?"":"none";Na.value="";ba=null;J(N)});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){I(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(N=!0,null==ba?J(N):H(ba))});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){I(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(N=!1,null==ba?J(N):H(ba))});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){I(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Q=!0,C(R,!1,Q,Y))});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){I(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Q=!1,C(R,!1,Q,Y))});
-var Ea=!1;mxEvent.addListener(fa,"click",function(){T?(qa.style.height="280px",Ca.style.height="190px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),E(sa)):(qa.style.height="440px",Ca.style.height="355px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),E(sa,!0));T=!T});var La=!1,za=!1,ta={},ka={},oa={},sa=[],ya=1,wa=0;null!=l?l(function(ha,da){oa=ha;wa=da;P()},P):P();mxUtils.get(m,function(ha){if(!za){za=!0;for(ha=ha.getXml().documentElement.firstChild;null!=ha;)"undefined"!==
-typeof ha.getAttribute&&null!=ha.getAttribute("title")&&sa.push({img:ha.getAttribute("img"),libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;E(sa)}});var ua=function(ha,da,ca){ja.style.display="";Fa.stop();W=!1;if(U)U=!1;else if(da)aa.innerHTML=da;else{ca=ca||{};da=0;for(var la in ca)da+=ca[la].length;0==ha.length&&0==da?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):C(ha,!1,Q,0==da?null:ca)}};J(N);var xa=null;mxEvent.addListener(Na,
-"keyup",S);mxEvent.addListener(Na,"search",S);mxEvent.addListener(Na,"input",S);mxEvent.addListener(Aa,"click",function(ha){z(!1,!1)});p&&mxEvent.addListener(Ha,"click",function(ha){z(!1,!0)});q&&mxEvent.addListener(M.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){z(!0)});mxEvent.addListener(M.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",J=document.createElement("div");J.innerHTML=W;J.className=
+"geTemplateDlg";this.container=J;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,U=!1,X=null,t=null,E=null,M=null,T=!1,O=!0,Q=!1,S=[],Y=null,ba,ea,Z=!1,fa=J.querySelector(".geTempDlgShowAllBtn"),aa=J.querySelector(".geTempDlgDiagramsTiles"),va=J.querySelector(".geTempDlgDiagramsListTitle"),ja=J.querySelector(".geTempDlgDiagramsListBtns"),Ba=J.querySelector(".geTempDlgContent"),Da=J.querySelector(".geTempDlgDiagramsList"),qa=J.querySelector(".geTempDlgNewDiagramCat"),
+Ca=J.querySelector(".geTempDlgNewDiagramCatList"),Aa=J.querySelector(".geTempDlgCreateBtn"),Ha=J.querySelector(".geTempDlgOpenBtn"),Na=J.querySelector(".geTempDlgSearchBox"),Ga=J.querySelector(".geTempDlgErrMsg"),Fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(J.querySelector(".geTempDlgBack"),"click",function(){A();Z=!1;J.querySelector(".geTemplatesList").style.display="none";Ba.style.width=
+"100%";qa.style.display="";Da.style.minHeight="calc(100% - 280px)";Na.style.display=d?"":"none";Na.value="";ba=null;I(O)});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){K(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(O=!0,null==ba?I(O):H(ba))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){K(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(O=!1,null==ba?I(O):H(ba))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){K(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Q=!0,B(S,!1,Q,Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){K(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Q=!1,B(S,!1,Q,Y))});
+var Ea=!1;mxEvent.addListener(fa,"click",function(){T?(qa.style.height="280px",Ca.style.height="190px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),C(sa)):(qa.style.height="440px",Ca.style.height="355px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),C(sa,!0));T=!T});var La=!1,za=!1,ta={},ka={},oa={},sa=[],ya=1,wa=0;null!=l?l(function(ha,da){oa=ha;wa=da;N()},N):N();mxUtils.get(m,function(ha){if(!za){za=!0;for(ha=ha.getXml().documentElement.firstChild;null!=ha;)"undefined"!==
+typeof ha.getAttribute&&null!=ha.getAttribute("title")&&sa.push({img:ha.getAttribute("img"),libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;C(sa)}});var ua=function(ha,da,ca){ja.style.display="";Fa.stop();V=!1;if(U)U=!1;else if(da)aa.innerHTML=da;else{ca=ca||{};da=0;for(var la in ca)da+=ca[la].length;0==ha.length&&0==da?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(ha,!1,Q,0==da?null:ca)}};I(O);var xa=null;mxEvent.addListener(Na,
+"keyup",R);mxEvent.addListener(Na,"search",R);mxEvent.addListener(Na,"input",R);mxEvent.addListener(Aa,"click",function(ha){u(!1,!1)});p&&mxEvent.addListener(Ha,"click",function(ha){u(!1,!0)});q&&mxEvent.addListener(J.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){u(!0)});mxEvent.addListener(J.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}"));
-f=mxUtils.button(f,c);f.insertBefore(d,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(f);this.container=m},FontDialog=function(b,e,f,c,m){function n(t){this.style.border="";13==t.keyCode&&O.click()}var v=document.createElement("table"),d=document.createElement("tbody");v.style.marginTop="8px";var g=document.createElement("tr");var k=document.createElement("td");k.colSpan=2;k.style.whiteSpace=
+f=mxUtils.button(f,c);f.insertBefore(d,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(f);this.container=m},FontDialog=function(b,e,f,c,m){function n(L){this.style.border="";13==L.keyCode&&P.click()}var v=document.createElement("table"),d=document.createElement("tbody");v.style.marginTop="8px";var g=document.createElement("tr");var k=document.createElement("td");k.colSpan=2;k.style.whiteSpace=
"nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","sysfonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-sysfonts");k.appendChild(l);var p=document.createElement("label");p.setAttribute("for","fontdialog-sysfonts");mxUtils.write(p,mxResources.get("sysFonts",null,"System Fonts"));k.appendChild(p);g.appendChild(k);
d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var q=document.createElement("input");"s"==c&&q.setAttribute("value",e);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";k=document.createElement("td");k.appendChild(q);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");
k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","googlefonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-googlefonts");k.appendChild(x);p=document.createElement("label");p.setAttribute("for","fontdialog-googlefonts");mxUtils.write(p,mxResources.get("googleFonts",
null,"Google Fonts"));k.appendChild(p);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(p=b.menus.createHelpLink("https://fonts.google.com/"),p.getElementsByTagName("img")[0].setAttribute("valign","middle"),k.appendChild(p));g.appendChild(k);d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");
-g.appendChild(k);var y=document.createElement("input");"g"==c&&y.setAttribute("value",e);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_g";k=document.createElement("td");k.appendChild(y);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value",
-"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");k.appendChild(A);p=document.createElement("label");p.setAttribute("for","fontdialog-webfonts");mxUtils.write(p,mxResources.get("webfonts",null,"Web Fonts"));k.appendChild(p);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft=
-"15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var B=document.createElement("input");"w"==c&&(Editor.enableWebFonts?B.setAttribute("value",e):q.setAttribute("value",e));B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontName_w";k=document.createElement("td");k.appendChild(B);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";
-k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontUrl",null,"Font URL")+":");g.appendChild(k);var I=document.createElement("input");I.setAttribute("value",f||"");I.style.marginLeft="4px";I.style.width="250px";I.className="dlg_fontUrl";k=document.createElement("td");k.appendChild(I);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);this.init=function(){var t=q;"g"==c?t=y:"w"==c&&Editor.enableWebFonts&&(t=B);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-t.select():document.execCommand("selectAll",!1,null)};g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",k.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();m()});e.className="geBtn";b.editor.cancelFirst&&k.appendChild(e);
-var O=mxUtils.button(mxResources.get("apply"),function(){if(l.checked){var t=q.value;var z="s"}else if(x.checked){t=y.value;var L=Editor.GOOGLE_FONTS+encodeURIComponent(t).replace(/%20/g,"+");z="g"}else A.checked&&(t=B.value,L=I.value,z="w");var C=L;var E=z,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==t||0==t.length?(v.querySelector(".dlg_fontName_"+E).style.border="1px solid red",C=!1):"w"!=E||G.test(C)?C=!0:(v.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",C=!1);C&&(m(t,L,z),b.hideDialog())});O.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",n);mxEvent.addListener(y,"keypress",n);mxEvent.addListener(B,"keypress",n);mxEvent.addListener(I,"keypress",n);mxEvent.addListener(q,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(y,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){A.setAttribute("checked","checked");A.checked=
-!0});mxEvent.addListener(I,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});k.appendChild(O);b.editor.cancelFirst||k.appendChild(e);g.appendChild(k);d.appendChild(g);v.appendChild(d);this.container=v};
+g.appendChild(k);var y=document.createElement("input");"g"==c&&y.setAttribute("value",e);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_g";k=document.createElement("td");k.appendChild(y);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
+"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");k.appendChild(z);p=document.createElement("label");p.setAttribute("for","fontdialog-webfonts");mxUtils.write(p,mxResources.get("webfonts",null,"Web Fonts"));k.appendChild(p);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft=
+"15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",e):q.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";k=document.createElement("td");k.appendChild(A);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";
+k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontUrl",null,"Font URL")+":");g.appendChild(k);var K=document.createElement("input");K.setAttribute("value",f||"");K.style.marginLeft="4px";K.style.width="250px";K.className="dlg_fontUrl";k=document.createElement("td");k.appendChild(K);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);this.init=function(){var L=q;"g"==c?L=y:"w"==c&&Editor.enableWebFonts&&(L=A);L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+L.select():document.execCommand("selectAll",!1,null)};g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",k.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();m()});e.className="geBtn";b.editor.cancelFirst&&k.appendChild(e);
+var P=mxUtils.button(mxResources.get("apply"),function(){if(l.checked){var L=q.value;var u="s"}else if(x.checked){L=y.value;var D=Editor.GOOGLE_FONTS+encodeURIComponent(L).replace(/%20/g,"+");u="g"}else z.checked&&(L=A.value,D=K.value,u="w");var B=D;var C=u,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==L||0==L.length?(v.querySelector(".dlg_fontName_"+C).style.border="1px solid red",B=!1):"w"!=C||G.test(B)?B=!0:(v.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",B=!1);B&&(m(L,D,u),b.hideDialog())});P.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",n);mxEvent.addListener(y,"keypress",n);mxEvent.addListener(A,"keypress",n);mxEvent.addListener(K,"keypress",n);mxEvent.addListener(q,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(y,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(A,"focus",function(){z.setAttribute("checked","checked");z.checked=
+!0});mxEvent.addListener(K,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});k.appendChild(P);b.editor.cancelFirst||k.appendChild(e);g.appendChild(k);d.appendChild(g);v.appendChild(d);this.container=v};
function AspectDialog(b,e,f,c,m){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("pages"));e.appendChild(n);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("layers"));e.appendChild(n);n=document.createElement("div");n.className="geAspectDlgList";
e.appendChild(n);this.pagesContainer=f;this.layersContainer=n;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m()});n.className="geBtn";b.editor.cancelFirst&&f.appendChild(n);var v=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(v);v.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||f.appendChild(n);v.setAttribute("disabled","disabled");this.okBtn=v;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -11400,22 +11401,22 @@ l&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);d=document.createEl
d.style.width="120px";mxUtils.write(d,mxResources.get("realtimeCollaboration")+":");m.appendChild(d);var q=document.createElement("input");q.setAttribute("type","checkbox");var x=c.isRealtimeEnabled();if(x="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=n;n=function(){prevApply();b.hideDialog();q.checked!=x&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(q.checked,mxUtils.bind(this,
function(y){b.spinner.stop()}),mxUtils.bind(this,function(y){b.spinner.stop();b.showError(mxResources.get("error"),null!=y&&null!=y.error?y.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(q);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));m.appendChild(d);f.appendChild(m)}this.init=null!=this.init?this.init:
function(){};n=mxUtils.button(mxResources.get("apply"),n);n.className="geBtn gePrimaryBtn";m=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","center");v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);d.appendChild(n);b.editor.cancelFirst||d.appendChild(v);m.appendChild(d);f.appendChild(m);e.appendChild(f);this.container=
-e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(E.value)||0;F=0>F?0:100<F?100:F;
-E.value=F;var H=parseInt(P.value)||0;H=0>H?0:100<H?100:H;P.value=H;var S=parseInt(G.value)||0,V=parseInt(J.value)||0;F=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(F/100,H/100),!1,null,S,V));H=p.getSelectionCell();if(null!=H){S=H.geometry.clone();V=p.view.scale;var M=p.view.translate;S.x=(F.x-3*V)/V-M.x;S.y=(F.y-3*V)/V-M.y;p.model.setGeometry(H,S)}}function g(F){var H=0,S=0,V=q.geometry,M=mxUtils.format((F.geometry.x+3-V.x)/V.width);F=mxUtils.format((F.geometry.y+3-V.y)/V.height);
-0>M?(H=M*V.width,M=0):1<M&&(H=(M-1)*V.width,M=1);0>F?(S=F*V.height,F=0):1<F&&(S=(F-1)*V.height,F=1);return{x:M,y:F,dx:parseInt(H),dy:parseInt(S)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);E.value=100*F.x;P.value=100*F.y;G.value=F.dx;J.value=F.dy;C.style.visibility=""}else C.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
+e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(C.value)||0;F=0>F?0:100<F?100:F;
+C.value=F;var H=parseInt(N.value)||0;H=0>H?0:100<H?100:H;N.value=H;var R=parseInt(G.value)||0,W=parseInt(I.value)||0;F=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(F/100,H/100),!1,null,R,W));H=p.getSelectionCell();if(null!=H){R=H.geometry.clone();W=p.view.scale;var J=p.view.translate;R.x=(F.x-3*W)/W-J.x;R.y=(F.y-3*W)/W-J.y;p.model.setGeometry(H,R)}}function g(F){var H=0,R=0,W=q.geometry,J=mxUtils.format((F.geometry.x+3-W.x)/W.width);F=mxUtils.format((F.geometry.y+3-W.y)/W.height);
+0>J?(H=J*W.width,J=0):1<J&&(H=(J-1)*W.width,J=1);0>F?(R=F*W.height,F=0):1<F&&(R=(F-1)*W.height,F=1);return{x:J,y:F,dx:parseInt(H),dy:parseInt(R)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);C.value=100*F.x;N.value=100*F.y;G.value=F.dx;I.value=F.dy;B.style.visibility=""}else B.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.autoExtend=!1;p.autoScroll=!1;p.setGridEnabled(!1);p.setEnabled(!0);p.setPanning(!0);p.setConnectable(!1);p.setTooltips(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;p.maxFitScale=2;l=e.geometry;var q=new mxCell(e.value,new mxGeometry(0,0,l.width,l.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;p.addCell(q);p.dblClick=function(F,H){if(null!=H&&H!=q)p.setSelectionCell(H);else{H=
-mxUtils.convertPoint(p.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=p.view.scale;var S=p.view.translate;p.setSelectionCell(n((H.x-3*F)/F-S.x,(H.y-3*F)/F-S.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==q)};p.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(F){return F==q?!1:
-x.apply(this,arguments)};p.getLinkForCell=function(){return null};var y=p.view.getState(q);l=p.getAllConnectionConstraints(y);for(var A=0;null!=l&&A<l.length;A++){var B=p.getConnectionPoint(y,l[A]);n(B.x-3,B.y-3)}p.fit(8);p.center();A=mxUtils.button("",function(){p.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(A,60);B=mxUtils.button("",function(){p.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B,60);var I=mxUtils.button("",function(){p.fit(8);p.center()});I.className="geSprite geSprite-fit";I.setAttribute("title",mxResources.get("fit"));I.style.position=
-"relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.cursor="pointer";I.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(I,60);var O=mxUtils.button("",function(){p.zoomActual();p.center()});O.className="geSprite geSprite-actualsize";O.setAttribute("title",mxResources.get("actualSize"));O.style.position="relative";O.style.outline="none";O.style.border="none";O.style.margin="2px";O.style.cursor="pointer";O.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(O,
-60);var t=mxUtils.button("",v);t.className="geSprite geSprite-delete";t.setAttribute("title",mxResources.get("delete"));t.style.position="relative";t.style.outline="none";t.style.border="none";t.style.margin="2px";t.style.float="right";t.style.cursor="pointer";mxUtils.setOpacity(t,10);l=document.createElement("div");l.appendChild(A);l.appendChild(B);l.appendChild(O);l.appendChild(I);l.appendChild(t);c.appendChild(l);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("min",
-"1");z.setAttribute("value","1");z.style.width="45px";z.style.position="relative";z.style.top=mxClient.IS_FF?"0px":"-4px";z.style.margin="0 4px 0 4px";l.appendChild(z);var L=document.createElement("select");L.style.position="relative";L.style.top=mxClient.IS_FF?"0px":"-4px";B=["left","right","top","bottom"];for(A=0;A<B.length;A++)I=B[A],O=document.createElement("option"),mxUtils.write(O,mxResources.get(I)),O.value=I,L.appendChild(O);l.appendChild(L);A=mxUtils.button(mxResources.get("add"),function(){var F=
-parseInt(z.value);F=1>F?1:100<F?100:F;z.value=F;for(var H=L.value,S=q.geometry,V=[],M=0;M<F;M++){switch(H){case "left":var W=S.x;var U=S.y+(M+1)*S.height/(F+1);break;case "right":W=S.x+S.width;U=S.y+(M+1)*S.height/(F+1);break;case "top":W=S.x+(M+1)*S.width/(F+1);U=S.y;break;case "bottom":W=S.x+(M+1)*S.width/(F+1),U=S.y+S.height}V.push(n(W-3,U-3))}p.setSelectionCells(V)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(A);var C=document.createElement("div");
-C.style.margin="4px 0px 8px 0px";C.style.whiteSpace="nowrap";C.style.height="24px";l=document.createElement("span");mxUtils.write(l,mxResources.get("dx"));C.appendChild(l);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("min","0");E.setAttribute("max","100");E.style.width="45px";E.style.margin="0 4px 0 4px";C.appendChild(E);mxUtils.write(C,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
-C.appendChild(G);mxUtils.write(C,"pt");l=document.createElement("span");mxUtils.write(l,mxResources.get("dy"));l.style.marginLeft="12px";C.appendChild(l);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";C.appendChild(P);mxUtils.write(C,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";C.appendChild(J);
-mxUtils.write(C,"pt");c.appendChild(C);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(t,60):mxUtils.setOpacity(t,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(E,"change",d);mxEvent.addListener(P,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(J,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var F=
-p.model.cells,H=[],S=[],V;for(V in F){var M=F[V];M.cp&&S.push(g(M))}S.sort(function(W,U){return W.x!=U.x?W.x-U.x:W.y!=U.y?W.y-U.y:W.dx!=U.dx?W.dx-U.dx:W.dy-U.dy});for(F=0;F<S.length;F++)0<F&&S[F].x==S[F-1].x&&S[F].y==S[F-1].y&&S[F].dx==S[F-1].dx&&S[F].dy==S[F-1].dy||H.push("["+S[F].x+","+S[F].y+",0,"+S[F].dx+","+S[F].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});A.className="geBtn gePrimaryBtn";B=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[e]);f();b.hideDialog()});B.className="geBtn";I=document.createElement("div");I.style.marginTop="10px";I.style.textAlign="right";b.editor.cancelFirst?(I.appendChild(l),I.appendChild(B),I.appendChild(A)):(I.appendChild(B),I.appendChild(A),I.appendChild(l));c.appendChild(I)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+mxUtils.convertPoint(p.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=p.view.scale;var R=p.view.translate;p.setSelectionCell(n((H.x-3*F)/F-R.x,(H.y-3*F)/F-R.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==q)};p.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(F){return F==q?!1:
+x.apply(this,arguments)};p.getLinkForCell=function(){return null};var y=p.view.getState(q);l=p.getAllConnectionConstraints(y);for(var z=0;null!=l&&z<l.length;z++){var A=p.getConnectionPoint(y,l[z]);n(A.x-3,A.y-3)}p.fit(8);p.center();z=mxUtils.button("",function(){p.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(z,60);A=mxUtils.button("",function(){p.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var K=mxUtils.button("",function(){p.fit(8);p.center()});K.className="geSprite geSprite-fit";K.setAttribute("title",mxResources.get("fit"));K.style.position=
+"relative";K.style.outline="none";K.style.border="none";K.style.margin="2px";K.style.cursor="pointer";K.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(K,60);var P=mxUtils.button("",function(){p.zoomActual();p.center()});P.className="geSprite geSprite-actualsize";P.setAttribute("title",mxResources.get("actualSize"));P.style.position="relative";P.style.outline="none";P.style.border="none";P.style.margin="2px";P.style.cursor="pointer";P.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(P,
+60);var L=mxUtils.button("",v);L.className="geSprite geSprite-delete";L.setAttribute("title",mxResources.get("delete"));L.style.position="relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.float="right";L.style.cursor="pointer";mxUtils.setOpacity(L,10);l=document.createElement("div");l.appendChild(z);l.appendChild(A);l.appendChild(P);l.appendChild(K);l.appendChild(L);c.appendChild(l);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min",
+"1");u.setAttribute("value","1");u.style.width="45px";u.style.position="relative";u.style.top=mxClient.IS_FF?"0px":"-4px";u.style.margin="0 4px 0 4px";l.appendChild(u);var D=document.createElement("select");D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(z=0;z<A.length;z++)K=A[z],P=document.createElement("option"),mxUtils.write(P,mxResources.get(K)),P.value=K,D.appendChild(P);l.appendChild(D);z=mxUtils.button(mxResources.get("add"),function(){var F=
+parseInt(u.value);F=1>F?1:100<F?100:F;u.value=F;for(var H=D.value,R=q.geometry,W=[],J=0;J<F;J++){switch(H){case "left":var V=R.x;var U=R.y+(J+1)*R.height/(F+1);break;case "right":V=R.x+R.width;U=R.y+(J+1)*R.height/(F+1);break;case "top":V=R.x+(J+1)*R.width/(F+1);U=R.y;break;case "bottom":V=R.x+(J+1)*R.width/(F+1),U=R.y+R.height}W.push(n(V-3,U-3))}p.setSelectionCells(W)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(z);var B=document.createElement("div");
+B.style.margin="4px 0px 8px 0px";B.style.whiteSpace="nowrap";B.style.height="24px";l=document.createElement("span");mxUtils.write(l,mxResources.get("dx"));B.appendChild(l);var C=document.createElement("input");C.setAttribute("type","number");C.setAttribute("min","0");C.setAttribute("max","100");C.style.width="45px";C.style.margin="0 4px 0 4px";B.appendChild(C);mxUtils.write(B,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
+B.appendChild(G);mxUtils.write(B,"pt");l=document.createElement("span");mxUtils.write(l,mxResources.get("dy"));l.style.marginLeft="12px";B.appendChild(l);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min","0");N.setAttribute("max","100");N.style.width="45px";N.style.margin="0 4px 0 4px";B.appendChild(N);mxUtils.write(B,"%");var I=document.createElement("input");I.setAttribute("type","number");I.style.width="45px";I.style.margin="0 4px 0 4px";B.appendChild(I);
+mxUtils.write(B,"pt");c.appendChild(B);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(L,60):mxUtils.setOpacity(L,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(C,"change",d);mxEvent.addListener(N,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(I,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
+p.model.cells,H=[],R=[],W;for(W in F){var J=F[W];J.cp&&R.push(g(J))}R.sort(function(V,U){return V.x!=U.x?V.x-U.x:V.y!=U.y?V.y-U.y:V.dx!=U.dx?V.dx-U.dx:V.dy-U.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||H.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});z.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[e]);f();b.hideDialog()});A.className="geBtn";K=document.createElement("div");K.style.marginTop="10px";K.style.textAlign="right";b.editor.cancelFirst?(K.appendChild(l),K.appendChild(A),K.appendChild(z)):(K.appendChild(A),K.appendChild(z),K.appendChild(l));c.appendChild(K)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11441,111 +11442,111 @@ IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2Z
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
-Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"enumerate","0")}},
-{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(u,D){return"1"!=mxUtils.getValue(u.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"comic","0")||"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},
-{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(u,
-D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
-type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,E){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},
+{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,
+E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
+type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
-dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(u){return"orthogonalEdgeStyle"==mxUtils.getValue(u.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
+dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(t){return"orthogonalEdgeStyle"==mxUtils.getValue(t.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",
dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);
-Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTableCell(u.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTableCell(u.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(u,
-D){u=D.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLastRow","0")},isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTable(u.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(u,D){u=D.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLast",
-"0")},isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTable(u.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,
+E){t=E.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,E){t=E.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast",
+"0")},isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTable(t.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,D){return D.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,D){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,E){return E.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,E){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
-dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,D){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;D=D.editorUi.editor.graph;return null!=u&&(D.isSwimlane(u)||0<D.model.getChildCount(u))},isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,D){var K=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;D=D.editorUi.editor.graph;return null!=K&&(D.isContainer(K)&&
-"0"!=u.style.collapsible||!D.isContainer(K)&&"1"==u.style.collapsible)},isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length&&!D.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
-isVisible:function(u,D){D=D.editorUi.editor.graph.model;return 0<u.vertices.length?D.isVertex(D.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,D){u=0<u.vertices.length?
-D.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
-type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,D){var K=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||null!=u.style.pointerEvents}},{name:"moveCells",
-dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,D){return 0<u.vertices.length&&D.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var D=rough.canvas({getContext:function(){return u}});D.draw=function(K){var T=K.sets||[];K=K.options||this.getDefaultOptions();for(var N=0;N<T.length;N++){var Q=T[N];switch(Q.type){case "path":null!=K.stroke&&this._drawToContext(u,Q,K);break;case "fillPath":this._drawToContext(u,Q,K);break;case "fillSketch":this.fillSketch(u,Q,K)}}};D.fillSketch=function(K,T,N){var Q=u.state.strokeColor,R=u.state.strokeWidth,Y=u.state.strokeAlpha,ba=u.state.dashed,ea=N.fillWeight;
-0>ea&&(ea=N.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(N.fill||"");u.setStrokeWidth(ea);u.setDashed(!1);this._drawToContext(K,T,N);u.setDashed(ba);u.setStrokeWidth(R);u.setStrokeColor(Q);u.setStrokeAlpha(Y)};D._drawToContext=function(K,T,N){K.begin();for(var Q=0;Q<T.ops.length;Q++){var R=T.ops[Q],Y=R.data;switch(R.op){case "move":K.moveTo(Y[0],Y[1]);break;case "bcurveTo":K.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":K.lineTo(Y[0],Y[1])}}K.end();"fillPath"===
-T.type&&N.filled?K.fill():K.stroke()};return D};(function(){function u(Q,R,Y){this.canvas=Q;this.rc=R;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,u.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(Q,R){var Y=1;if(null!=this.shape.state){var ba=this.shape.state.cell.id;if(null!=ba)for(var ea=0;ea<ba.length;ea++)Y=(Y<<5)-Y+ba.charCodeAt(ea)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ba=this.rc.getDefaultOptions();Y.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(Y.filled=R)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ba.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ba.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ba.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",ba.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ba.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ba.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ba.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==R?-1:R;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",R);Y.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",R);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==R&&(R=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),R=null!=Y.fill&&(null!=Q||null!=R&&Y.fill==R)?"solid":ba.fillStyle);Y.fillStyle=R;return Y};u.prototype.begin=function(){this.passThrough?
-this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=function(Q,R){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,Q,R),this.lastX=Q,this.lastY=R)};u.prototype.moveTo=function(Q,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,R),this.lastX=Q,this.lastY=R,this.firstX=Q,this.firstY=R)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,R,Y,ba){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
-R,Y,ba),this.lastX=Y,this.lastY=ba)};u.prototype.curveTo=function(Q,R,Y,ba,ea,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,R,Y,ba,ea,Z),this.lastX=ea,this.lastY=Z)};u.prototype.arcTo=function(Q,R,Y,ba,ea,Z,fa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,R,Y,ba,ea,Z,fa);if(null!=aa)for(var va=0;va<aa.length;va+=6)this.curveTo(aa[va],aa[va+1],aa[va+2],aa[va+3],aa[va+4],
-aa[va+5]);this.lastX=Z;this.lastY=fa}};u.prototype.rect=function(Q,R,Y,ba){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,R,Y,ba,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,R,Y,ba){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+Y/2,R+ba/2,Y,ba,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,R,Y,ba,ea,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(Q+ea,R),this.lineTo(Q+Y-ea,R),this.quadTo(Q+Y,R,Q+Y,R+Z),this.lineTo(Q+Y,R+ba-Z),this.quadTo(Q+Y,R+ba,Q+Y-ea,R+ba),this.lineTo(Q+ea,R+ba),this.quadTo(Q,R+ba,Q,R+ba-Z),this.lineTo(Q,R+Z),this.quadTo(Q,R,Q+ea,R))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in Q)this.nextShape.options[R]=Q[R];Q.stroke!=mxConstants.NONE&&null!=
-Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!0,!0))};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,R,Y,ba,ea){null!=Q.handJiggle&&Q.handJiggle.passThrough||K.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var R=Q.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,E){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;E=E.editorUi.editor.graph;return null!=t&&(E.isSwimlane(t)||0<E.model.getChildCount(t))},isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,E){var M=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;E=E.editorUi.editor.graph;return null!=M&&(E.isContainer(M)&&
+"0"!=t.style.collapsible||!E.isContainer(M)&&"1"==t.style.collapsible)},isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length&&!E.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
+isVisible:function(t,E){E=E.editorUi.editor.graph.model;return 0<t.vertices.length?E.isVertex(E.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,E){t=0<t.vertices.length?
+E.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
+type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,E){var M=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==M||M==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",
+dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,E){return 0<t.vertices.length&&E.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(t){var E=rough.canvas({getContext:function(){return t}});E.draw=function(M){var T=M.sets||[];M=M.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var Q=T[O];switch(Q.type){case "path":null!=M.stroke&&this._drawToContext(t,Q,M);break;case "fillPath":this._drawToContext(t,Q,M);break;case "fillSketch":this.fillSketch(t,Q,M)}}};E.fillSketch=function(M,T,O){var Q=t.state.strokeColor,S=t.state.strokeWidth,Y=t.state.strokeAlpha,ba=t.state.dashed,ea=O.fillWeight;
+0>ea&&(ea=O.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(O.fill||"");t.setStrokeWidth(ea);t.setDashed(!1);this._drawToContext(M,T,O);t.setDashed(ba);t.setStrokeWidth(S);t.setStrokeColor(Q);t.setStrokeAlpha(Y)};E._drawToContext=function(M,T,O){M.begin();for(var Q=0;Q<T.ops.length;Q++){var S=T.ops[Q],Y=S.data;switch(S.op){case "move":M.moveTo(Y[0],Y[1]);break;case "bcurveTo":M.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":M.lineTo(Y[0],Y[1])}}M.end();"fillPath"===
+T.type&&O.filled?M.fill():M.stroke()};return E};(function(){function t(Q,S,Y){this.canvas=Q;this.rc=S;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(Q,S){var Y=1;if(null!=this.shape.state){var ba=this.shape.state.cell.id;if(null!=ba)for(var ea=0;ea<ba.length;ea++)Y=(Y<<5)-Y+ba.charCodeAt(ea)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ba=this.rc.getDefaultOptions();Y.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(Y.filled=S)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ba.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ba.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ba.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",ba.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ba.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ba.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ba.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==S?-1:S;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);Y.dashOffset=mxUtils.getValue(this.shape.style,
+"dashOffset",S);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=Y.fill&&(null!=Q||null!=S&&Y.fill==S)?"solid":ba.fillStyle);Y.fillStyle=S;return Y};t.prototype.begin=function(){this.passThrough?
+this.originalBegin.apply(this.canvas,arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,
+arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};t.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(Q,S,Y,ba){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
+S,Y,ba),this.lastX=Y,this.lastY=ba)};t.prototype.curveTo=function(Q,S,Y,ba,ea,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,Y,ba,ea,Z),this.lastX=ea,this.lastY=Z)};t.prototype.arcTo=function(Q,S,Y,ba,ea,Z,fa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,Y,ba,ea,Z,fa);if(null!=aa)for(var va=0;va<aa.length;va+=6)this.curveTo(aa[va],aa[va+1],aa[va+2],aa[va+3],aa[va+4],
+aa[va+5]);this.lastX=Z;this.lastY=fa}};t.prototype.rect=function(Q,S,Y,ba){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,Y,ba,this.getStyle(!0,!0)))};t.prototype.ellipse=function(Q,S,Y,ba){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+Y/2,S+ba/2,Y,ba,this.getStyle(!0,!0)))};t.prototype.roundrect=function(Q,S,Y,ba,ea,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(Q+ea,S),this.lineTo(Q+Y-ea,S),this.quadTo(Q+Y,S,Q+Y,S+Z),this.lineTo(Q+Y,S+ba-Z),this.quadTo(Q+Y,S+ba,Q+Y-ea,S+ba),this.lineTo(Q+ea,S+ba),this.quadTo(Q,S+ba,Q,S+ba-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+ea,S))};t.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=Q[S];Q.stroke!=mxConstants.NONE&&null!=
+Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
+arguments):this.drawPath(this.getStyle(!0,!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new t(Q,Editor.createRoughCanvas(Q),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,Y,ba,ea){null!=Q.handJiggle&&Q.handJiggle.passThrough||M.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==t&&!this.outline){Q.save();
var ba=this.fill,ea=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,fa=Q.setStrokeColor;Q.setStrokeColor=function(){};var aa=Q.setFillColor;Q.setFillColor=function(){};Y||null==ba||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;T.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=aa;Q.setStrokeColor=fa;this.configurePointerEvents=Z;this.stroke=ea;this.fill=ba;Q.restore();Y&&null!=ba&&(Q.addTolerance=function(){})}T.apply(this,arguments);
-Q.addTolerance=R};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,R,Y,ba,ea,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,N.apply(this,arguments),Q.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?
-u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,D,K){if(null!=u&&"undefined"!==typeof pako){var T=u.ownerDocument.getElementsByTagName("div"),N=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){N.push(T[Q]);break}0<N.length&&(T=N[0].getAttribute("data-mxgraph"),null!=T?(N=JSON.parse(T),null!=N&&null!=N.xml&&(u=mxUtils.parseXml(N.xml),u=u.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&
-(T=mxUtils.getTextContent(N[0]),T=Graph.decompress(T,null,K),0<T.length&&(u=mxUtils.parseXml(T),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(T=u.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)u=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||D||(N=null,"diagram"==u.nodeName?N=u:"mxfile"==
-u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(N=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=N&&(u=Editor.parseDiagramNode(N,K)));null==u||"mxGraphModel"==u.nodeName||D&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,D){var K=mxUtils.trim(mxUtils.getTextContent(u)),T=null;0<K.length?(u=Graph.decompress(K,null,D),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(),
-T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var D=mxUtils.getTextContent(u),K=null;0<D.length?K=Graph.decompress(D):null!=u.firstChild&&(K=mxUtils.getXml(u.firstChild));return K};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var D=u.indexOf("EmbeddedFile");if(-1<D){var K=u.indexOf("stream",D)+9;if(0<u.substring(D,K).indexOf("application#2Fvnd.jgraph.mxfile"))return D=
-u.indexOf("endstream",K-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(K,D)),{to:"string"})}return null}K=null;D="";for(var T=0,N=0,Q=[],R=null;N<u.length;){var Y=u.charCodeAt(N);N+=1;10!=Y&&(D+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ba=u.indexOf("%3C%2Fmxfile%3E)",N)+15;N-=9;if(ba>N){K=u.substring(N,ba);break}}10==Y&&("endobj"==D?R=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(R=[],Q[D.split(" ")[0]]=R):null!=R&&R.push(D),
-D="")}null==K&&(K=Editor.extractGraphModelFromXref(Q));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(u){var D=u.trailer,K=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=u[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(u=u[D[1]],null!=u&&(u=u.join("\n"),K=u.substring(1,u.length-1))))));return K};Editor.extractParserError=function(u,D){var K=
-null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(K=D||mxResources.get("invalidChars"),D=u[0].getElementsByTagName("div"),0<D.length&&(K=mxUtils.getTextContent(D[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(u,D){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=D))};Editor.configure=function(u,D){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
-u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||DrawioFile.prototype.autosaveDelay;
-u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
-u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(u.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(K,T)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=
-u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=u.defaultCustomLibraries);null!=u.enableCustomLibraries&&(Editor.enableCustomLibraries=u.enableCustomLibraries);null!=u.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);
-null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=u.zoomFactor&&(K=parseFloat(u.zoomFactor),!isNaN(K)&&1<K?Graph.prototype.zoomFactor=K:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(K=parseInt(u.gridSteps),!isNaN(K)&&0<K?mxGraphView.prototype.gridSteps=K:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=u.pageFormat&&(K=parseInt(u.pageFormat.width),T=parseInt(u.pageFormat.height),!isNaN(K)&&0<K&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,K,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(K=parseInt(u.sidebarTitleSize),!isNaN(K)&&0<K?Sidebar.prototype.sidebarTitleSize=K:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=u.autosaveDelay&&(K=parseInt(u.autosaveDelay),!isNaN(K)&&0<K?DrawioFile.prototype.autosaveDelay=K:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!D)for(App.initPluginCallback(),D=0;D<u.plugins.length;D++)mxscript(u.plugins[D]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);
-null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(u));D.parentNode.insertBefore(K,D);u=u.split("url(");for(K=1;K<u.length;K++){var T=u[K].indexOf(")");T=Editor.trimCssUrl(u[K].substring(0,T));var N=
-document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",T);N.setAttribute("as","font");N.setAttribute("crossorigin","");D.parentNode.insertBefore(N,D)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=
-u?u:Editor.GUID_LENGTH;for(var D=[],K=0;K<u;K++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):
-null;if(null!=u){var D=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==u.nodeName){D=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=K&&(T=new mxCodec(K.ownerDocument),
-T.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var T=new mxCodec(K.ownerDocument);T.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");D=u.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(D=u.getAttribute("extFonts"))try{for(D=D.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),K=0;K<D.length;K++)this.graph.addExtFont(D[K].name,D[K].url)}catch(N){console.log("ExtFonts format error: "+
-N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,D){u=null!=u?u:!0;var K=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
-D);null!=T&&K.setAttribute("backgroundImage",JSON.stringify(T));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),K.setAttribute("extFonts",T.join("|")));return K};Editor.prototype.isDataSvg=function(u){try{var D=mxUtils.parseXml(u).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 K=mxUtils.parseXml(D).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(u,D,K){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+Q.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,Y,ba,ea,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==t?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?
+t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};Editor.extractGraphModel=function(t,E,M){if(null!=t&&"undefined"!==typeof pako){var T=t.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){O.push(T[Q]);break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(t=mxUtils.parseXml(O.xml),t=t.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
+(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,M),0<T.length&&(t=mxUtils.parseXml(T),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(T=t.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)t=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||E||(O=null,"diagram"==t.nodeName?O=t:"mxfile"==
+t.nodeName&&(T=t.getElementsByTagName("diagram"),0<T.length&&(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(t=Editor.parseDiagramNode(O,M)));null==t||"mxGraphModel"==t.nodeName||E&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,E){var M=mxUtils.trim(mxUtils.getTextContent(t)),T=null;0<M.length?(t=Graph.decompress(M,null,E),null!=t&&0<t.length&&(T=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(T=mxUtils.createXmlDocument(),
+T.appendChild(T.importNode(t[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(t){var E=mxUtils.getTextContent(t),M=null;0<E.length?M=Graph.decompress(E):null!=t.firstChild&&(M=mxUtils.getXml(t.firstChild));return M};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var E=t.indexOf("EmbeddedFile");if(-1<E){var M=t.indexOf("stream",E)+9;if(0<t.substring(E,M).indexOf("application#2Fvnd.jgraph.mxfile"))return E=
+t.indexOf("endstream",M-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(M,E)),{to:"string"})}return null}M=null;E="";for(var T=0,O=0,Q=[],S=null;O<t.length;){var Y=t.charCodeAt(O);O+=1;10!=Y&&(E+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ba=t.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(ba>O){M=t.substring(O,ba);break}}10==Y&&("endobj"==E?S=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(S=[],Q[E.split(" ")[0]]=S):null!=S&&S.push(E),
+E="")}null==M&&(M=Editor.extractGraphModelFromXref(Q));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(t){var E=t.trailer,M=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=t[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(t=t[E[1]],null!=t&&(t=t.join("\n"),M=t.substring(1,t.length-1))))));return M};Editor.extractParserError=function(t,E){var M=
+null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(M=E||mxResources.get("invalidChars"),E=t[0].getElementsByTagName("div"),0<E.length&&(M=mxUtils.getTextContent(E[0])));return null!=M?mxUtils.trim(M):M};Editor.addRetryToError=function(t,E){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=E))};Editor.configure=function(t,E){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay;
+t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
+t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(M,T)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=t.defaultLibraries&&(Sidebar.prototype.defaultEntries=t.defaultLibraries);null!=t.defaultCustomLibraries&&(Editor.defaultCustomLibraries=t.defaultCustomLibraries);null!=t.enableCustomLibraries&&(Editor.enableCustomLibraries=t.enableCustomLibraries);null!=t.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=t.defaultVertexStyle);null!=t.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=t.defaultEdgeStyle);
+null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(M=parseFloat(t.zoomFactor),!isNaN(M)&&1<M?Graph.prototype.zoomFactor=M:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(M=parseInt(t.gridSteps),!isNaN(M)&&0<M?mxGraphView.prototype.gridSteps=M:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=t.pageFormat&&(M=parseInt(t.pageFormat.width),T=parseInt(t.pageFormat.height),!isNaN(M)&&0<M&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,M,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(M=parseInt(t.sidebarTitleSize),!isNaN(M)&&0<M?Sidebar.prototype.sidebarTitleSize=M:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=t.autosaveDelay&&(M=parseInt(t.autosaveDelay),!isNaN(M)&&0<M?DrawioFile.prototype.autosaveDelay=M:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=t.plugins&&!E)for(App.initPluginCallback(),E=0;E<t.plugins.length;E++)mxscript(t.plugins[E]);null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);
+null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t));E.parentNode.insertBefore(M,E);t=t.split("url(");for(M=1;M<t.length;M++){var T=t[M].indexOf(")");T=Editor.trimCssUrl(t[M].substring(0,T));var O=
+document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);O.setAttribute("as","font");O.setAttribute("crossorigin","");E.parentNode.insertBefore(O,E)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=
+t?t:Editor.GUID_LENGTH;for(var E=[],M=0;M<t;M++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):
+null;if(null!=t){var E=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[t],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==t.nodeName){E=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=E)E!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=M&&(T=new mxCodec(M.ownerDocument),
+T.decode(M,this.graph.getStylesheet())));else{var M=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=M){var T=new mxCodec(M.ownerDocument);T.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");E=t.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);
+mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(E=t.getAttribute("extFonts"))try{for(E=E.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),M=0;M<E.length;M++)this.graph.addExtFont(E[M].name,E[M].url)}catch(O){console.log("ExtFonts format error: "+
+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,E){t=null!=t?t:!0;var M=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+E);null!=T&&M.setAttribute("backgroundImage",JSON.stringify(T));M.setAttribute("math",this.graph.mathEnabled?"1":"0");M.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),M.setAttribute("extFonts",T.join("|")));return M};Editor.prototype.isDataSvg=function(t){try{var E=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=
+E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var M=mxUtils.parseXml(E).documentElement;return"mxfile"==M.nodeName||"mxGraphModel"==M.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(t,E,M){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?
-!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(u,D){if("undefined"===typeof window.MathJax){u=(null!=u?u:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
-[];Editor.doMathJaxRender=function(R){window.setTimeout(function(){"hidden"!=R.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,R])},0)};var K=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";D=null!=D?D:{"HTML-CSS":{availableFonts:[K],imageFont:null},SVG:{font:K,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(D);
-MathJax.Hub.Register.StartupHook("Begin",function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])})}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,
-Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};K=document.getElementsByTagName("script");if(null!=K&&0<K.length){var N=document.createElement("script");N.setAttribute("type","text/javascript");N.setAttribute("src",u);K[0].parentNode.appendChild(N)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(R){}}};
-Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var D=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(K,T,N,Q){void 0!==T?D.push(T.replace(/\\'/g,"'")):void 0!==N?D.push(N.replace(/\\"/g,
-'"')):void 0!==Q&&D.push(Q);return""});/,\s*$/.test(u)&&D.push("");return D};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===
-u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var D=u.convert,K=this;u.convert=function(T){if(null!=T){var N="http://"==T.substring(0,7)||"https://"==T.substring(0,8);N&&!navigator.onLine?T=Editor.svgBrokenImage.src:!N||T.substring(0,u.baseUrl.length)==u.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=D.apply(this,
-arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,D){try{var K=!0,T=window.setTimeout(mxUtils.bind(this,function(){K=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(T);K&&D(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
-K&&D(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(K)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);D(Q.toDataURL())}catch(Y){D(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);K&&D(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,D,K,
-T){null==T&&(T=this.createImageUrlConverter());var N=0,Q=K||{};K=mxUtils.bind(this,function(R,Y){R=u.getElementsByTagName(R);for(var ba=0;ba<R.length;ba++)mxUtils.bind(this,function(ea){try{if(null!=ea){var Z=T.convert(ea.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var fa=Q[Z];null==fa?(N++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(Q[Z]=aa,ea.setAttribute(Y,aa));N--;0==N&&D(u)})):ea.setAttribute(Y,fa)}else null!=Z&&ea.setAttribute(Y,Z)}}catch(aa){}})(R[ba])});K("image","xlink:href");
-K("img","src");0==N&&D(u)};Editor.base64Encode=function(u){for(var D="",K=0,T=u.length,N,Q,R;K<T;){N=u.charCodeAt(K++)&255;if(K==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);D+="==";break}Q=u.charCodeAt(K++);if(K==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);D+="=";break}R=u.charCodeAt(K++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(R&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return D};
-Editor.prototype.loadUrl=function(u,D,K,T,N,Q,R,Y){try{var ba=!R&&(T||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));N=null!=N?N:!0;var ea=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=D){var fa=Z.getText();if(ba){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
-fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}Q=null!=Q?Q:"data:image/png;base64,";fa=Q+Editor.base64Encode(fa)}D(fa)}}else null!=K&&(0==Z.getStatus()?K({message:mxResources.get("accessDenied")},Z):K({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=K&&K({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){N&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:ea})},Y)});ea()}catch(Z){null!=K&&K(Z)}};
-Editor.prototype.absoluteCssFonts=function(u){var D=null;if(null!=u){var K=u.split("url(");if(0<K.length){D=[K[0]];u=window.location.pathname;var T=null!=u?u.lastIndexOf("/"):-1;0<=T&&(u=u.substring(0,T+1));T=document.getElementsByTagName("base");var N=null;null!=T&&0<T.length&&(N=T[0].getAttribute("href"));for(var Q=1;Q<K.length;Q++)if(T=K[Q].indexOf(")"),0<T){var R=Editor.trimCssUrl(K[Q].substring(0,T));this.graph.isRelativeUrl(R)&&(R=null!=N?N+R:window.location.protocol+"//"+window.location.hostname+
-("/"==R.charAt(0)?"":u)+R);D.push('url("'+R+'"'+K[Q].substring(T))}else D.push(K[Q])}else D=[u]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(u,D,K){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+encodeURIComponent(D));K(u,D)};Editor.prototype.embedCssFonts=function(u,D){var K=u.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==T){for(var ba=[K[0]],ea=1;ea<K.length;ea++){var Z=K[ea].indexOf(")");
-ba.push('url("');ba.push(this.cachedFonts[Editor.trimCssUrl(K[ea].substring(0,Z))]);ba.push('"'+K[ea].substring(Z))}D(ba.join(""))}});if(0<K.length){for(u=1;u<K.length;u++){var Q=K[u].indexOf(")"),R=null,Y=K[u].indexOf("format(",Q);0<Y&&(R=Editor.trimCssUrl(K[u].substring(Y+7,K[u].indexOf(")",Y))));mxUtils.bind(this,function(ba){if(null==this.cachedFonts[ba]){this.cachedFonts[ba]=ba;T++;var ea="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(ba))ea="image/svg+xml";else if("otf"==R||"embedded-opentype"==
-R||/(\.otf)($|\?)/i.test(ba))ea="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(ba))ea="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(ba))ea="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(ba))ea="application/vnd.ms-fontobject";else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(ba))ea="application/font-sfnt";this.mapFontUrl(ea,ba,mxUtils.bind(this,function(Z,fa){this.loadUrl(fa,mxUtils.bind(this,function(aa){this.cachedFonts[ba]=aa;T--;N()}),mxUtils.bind(this,
-function(aa){T--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[u].substring(0,Q)),R)}N()}else D(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=D;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(u[D]=Graph.fontMapping[D]);return u};Editor.prototype.embedExtFonts=
-function(u){var D=this.graph.getCustomFonts();if(0<D.length){var K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.join(""),u)}),Q=0;Q<D.length;Q++)mxUtils.bind(this,function(R,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[Y]=ba;K.push(ba+"\n");T--;N()}),mxUtils.bind(this,function(ba){T--;K.push("@import url("+
-Y+");\n");N()}))):K.push(this.cachedGoogleFonts[Y]+"\n"):K.push('@font-face {font-family: "'+R+'";src: url("'+Y+'")}\n')})(D[Q].name,D[Q].url);N()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var D=document.getElementsByTagName("style"),K=0;K<D.length;K++){var T=mxUtils.getTextContent(D[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(D[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,D){D=null!=
-D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var K=u.getElementsByTagName("defs"),T=u.ownerDocument;0==K.length?(K=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(K,u.firstChild):u.appendChild(K)):K=K[0];u=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,D);K.appendChild(u)}};Editor.prototype.isExportToCanvas=
-function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,D,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/u,T/D))};Editor.prototype.exportToCanvas=function(u,D,K,T,N,Q,R,Y,ba,ea,Z,fa,aa,va,ja,Ba,Da,qa){try{Q=null!=Q?Q:!0;R=null!=R?R:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Ca=ba?null:fa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ba&&(Ca=Ba?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(fa.getSvg(null,null,aa,va,null,R,null,null,null,ea,null,Ba,Da,qa),mxUtils.bind(this,function(Aa){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ga=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ha,0,0);u(Fa,Aa)},0):(za.drawImage(Ha,0,0),u(Fa,Aa))},Fa=document.createElement("canvas"),Ea=parseInt(Aa.getAttribute("width")),La=parseInt(Aa.getAttribute("height"));Y=null!=Y?Y:1;null!=D&&(Y=Q?Math.min(1,Math.min(3*D/(4*La),D/Ea)):D/Ea);Y=this.getMaxCanvasScale(Ea,
+!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(t,E){if("undefined"===typeof window.MathJax){t=(null!=t?t:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
+[];Editor.doMathJaxRender=function(S){window.setTimeout(function(){"hidden"!=S.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,S])},0)};var M=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";E=null!=E?E:{"HTML-CSS":{availableFonts:[M],imageFont:null},SVG:{font:M,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(E);
+MathJax.Hub.Register.StartupHook("Begin",function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])})}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(S,
+Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};M=document.getElementsByTagName("script");if(null!=M&&0<M.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",t);M[0].parentNode.appendChild(O)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(S){}}};
+Editor.prototype.csvToArray=function(t){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(t))return null;var E=[];t.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(M,T,O,Q){void 0!==T?E.push(T.replace(/\\'/g,"'")):void 0!==O?E.push(O.replace(/\\"/g,
+'"')):void 0!==Q&&E.push(Q);return""});/,\s*$/.test(t)&&E.push("");return E};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===
+t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var E=t.convert,M=this;t.convert=function(T){if(null!=T){var O="http://"==T.substring(0,7)||"https://"==T.substring(0,8);O&&!navigator.onLine?T=Editor.svgBrokenImage.src:!O||T.substring(0,t.baseUrl.length)==t.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=E.apply(this,
+arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=function(t,E){try{var M=!0,T=window.setTimeout(mxUtils.bind(this,function(){M=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(Q){window.clearTimeout(T);M&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
+M&&E(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(T);if(M)try{var Q=document.createElement("canvas"),S=Q.getContext("2d");Q.height=O.height;Q.width=O.width;S.drawImage(O,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(T);M&&E(Editor.svgBrokenImage.src)};O.src=t}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,E,M,
+T){null==T&&(T=this.createImageUrlConverter());var O=0,Q=M||{};M=mxUtils.bind(this,function(S,Y){S=t.getElementsByTagName(S);for(var ba=0;ba<S.length;ba++)mxUtils.bind(this,function(ea){try{if(null!=ea){var Z=T.convert(ea.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var fa=Q[Z];null==fa?(O++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(Q[Z]=aa,ea.setAttribute(Y,aa));O--;0==O&&E(t)})):ea.setAttribute(Y,fa)}else null!=Z&&ea.setAttribute(Y,Z)}}catch(aa){}})(S[ba])});M("image","xlink:href");
+M("img","src");0==O&&E(t)};Editor.base64Encode=function(t){for(var E="",M=0,T=t.length,O,Q,S;M<T;){O=t.charCodeAt(M++)&255;if(M==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);E+="==";break}Q=t.charCodeAt(M++);if(M==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(Q&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);E+="=";break}S=t.charCodeAt(M++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return E};
+Editor.prototype.loadUrl=function(t,E,M,T,O,Q,S,Y){try{var ba=!S&&(T||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));O=null!=O?O:!0;var ea=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=E){var fa=Z.getText();if(ba){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}Q=null!=Q?Q:"data:image/png;base64,";fa=Q+Editor.base64Encode(fa)}E(fa)}}else null!=M&&(0==Z.getStatus()?M({message:mxResources.get("accessDenied")},Z):M({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=M&&M({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){O&&null!=M&&M({code:App.ERROR_TIMEOUT,retry:ea})},Y)});ea()}catch(Z){null!=M&&M(Z)}};
+Editor.prototype.absoluteCssFonts=function(t){var E=null;if(null!=t){var M=t.split("url(");if(0<M.length){E=[M[0]];t=window.location.pathname;var T=null!=t?t.lastIndexOf("/"):-1;0<=T&&(t=t.substring(0,T+1));T=document.getElementsByTagName("base");var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var Q=1;Q<M.length;Q++)if(T=M[Q].indexOf(")"),0<T){var S=Editor.trimCssUrl(M[Q].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+
+("/"==S.charAt(0)?"":t)+S);E.push('url("'+S+'"'+M[Q].substring(T))}else E.push(M[Q])}else E=[t]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(t,E,M){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));M(t,E)};Editor.prototype.embedCssFonts=function(t,E){var M=t.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==T){for(var ba=[M[0]],ea=1;ea<M.length;ea++){var Z=M[ea].indexOf(")");
+ba.push('url("');ba.push(this.cachedFonts[Editor.trimCssUrl(M[ea].substring(0,Z))]);ba.push('"'+M[ea].substring(Z))}E(ba.join(""))}});if(0<M.length){for(t=1;t<M.length;t++){var Q=M[t].indexOf(")"),S=null,Y=M[t].indexOf("format(",Q);0<Y&&(S=Editor.trimCssUrl(M[t].substring(Y+7,M[t].indexOf(")",Y))));mxUtils.bind(this,function(ba){if(null==this.cachedFonts[ba]){this.cachedFonts[ba]=ba;T++;var ea="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(ba))ea="image/svg+xml";else if("otf"==S||"embedded-opentype"==
+S||/(\.otf)($|\?)/i.test(ba))ea="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(ba))ea="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(ba))ea="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(ba))ea="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(ba))ea="application/font-sfnt";this.mapFontUrl(ea,ba,mxUtils.bind(this,function(Z,fa){this.loadUrl(fa,mxUtils.bind(this,function(aa){this.cachedFonts[ba]=aa;T--;O()}),mxUtils.bind(this,
+function(aa){T--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[t].substring(0,Q)),S)}O()}else E(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(t[E]=Graph.fontMapping[E]);return t};Editor.prototype.embedExtFonts=
+function(t){var E=this.graph.getCustomFonts();if(0<E.length){var M=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(M.join(""),t)}),Q=0;Q<E.length;Q++)mxUtils.bind(this,function(S,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[Y]=ba;M.push(ba+"\n");T--;O()}),mxUtils.bind(this,function(ba){T--;M.push("@import url("+
+Y+");\n");O()}))):M.push(this.cachedGoogleFonts[Y]+"\n"):M.push('@font-face {font-family: "'+S+'";src: url("'+Y+'")}\n')})(E[Q].name,E[Q].url);O()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var E=document.getElementsByTagName("style"),M=0;M<E.length;M++){var T=mxUtils.getTextContent(E[M]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&t[0].appendChild(E[M].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,E){E=null!=
+E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var M=t.getElementsByTagName("defs"),T=t.ownerDocument;0==M.length?(M=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=t.firstChild?t.insertBefore(M,t.firstChild):t.appendChild(M)):M=M[0];t=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,E);M.appendChild(t)}};Editor.prototype.isExportToCanvas=
+function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,E,M){var T=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(T/t,T/E))};Editor.prototype.exportToCanvas=function(t,E,M,T,O,Q,S,Y,ba,ea,Z,fa,aa,va,ja,Ba,Da,qa){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Ca=ba?null:fa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ba&&(Ca=Ba?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(fa.getSvg(null,null,aa,va,null,S,null,null,null,ea,null,Ba,Da,qa),mxUtils.bind(this,function(Aa){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ga=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ha,0,0);t(Fa,Aa)},0):(za.drawImage(Ha,0,0),t(Fa,Aa))},Fa=document.createElement("canvas"),Ea=parseInt(Aa.getAttribute("width")),La=parseInt(Aa.getAttribute("height"));Y=null!=Y?Y:1;null!=E&&(Y=Q?Math.min(1,Math.min(3*E/(4*La),E/Ea)):E/Ea);Y=this.getMaxCanvasScale(Ea,
La,Y);Ea=Math.ceil(Y*Ea);La=Math.ceil(Y*La);Fa.setAttribute("width",Ea);Fa.setAttribute("height",La);var za=Fa.getContext("2d");null!=Ca&&(za.beginPath(),za.rect(0,0,Ea,La),za.fillStyle=Ca,za.fill());1!=Y&&za.scale(Y,Y);if(ja){var ta=fa.view,ka=ta.scale;ta.scale=1;var oa=btoa(unescape(encodeURIComponent(ta.createSvgGrid(ta.gridColor))));ta.scale=ka;oa="data:image/svg+xml;base64,"+oa;var sa=fa.gridSize*ta.gridSteps*Y,ya=fa.getGraphBounds(),wa=ta.translate.x*ka,ua=ta.translate.y*ka,xa=wa+(ya.x-wa)/
-ka-aa,ha=ua+(ya.y-ua)/ka-aa,da=new Image;da.onload=function(){try{for(var ca=-Math.round(sa-mxUtils.mod((wa-xa)*Y,sa)),la=-Math.round(sa-mxUtils.mod((ua-ha)*Y,sa));ca<Ea;ca+=sa)for(var ia=la;ia<La;ia+=sa)za.drawImage(da,ca/Y,ia/Y);Ga()}catch(ma){null!=N&&N(ma)}};da.onerror=function(ca){null!=N&&N(ca)};da.src=oa}else Ga()}catch(ca){null!=N&&N(ca)}});Ha.onerror=function(Ga){null!=N&&N(Ga)};ea&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var Na=mxUtils.bind(this,function(){try{null!=
-this.resolvedFontCss&&this.addFontCss(Aa,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Ga){null!=N&&N(Ga)}});this.embedExtFonts(mxUtils.bind(this,function(Ga){try{null!=Ga&&this.addFontCss(Aa,Ga),this.loadFonts(Na)}catch(Fa){null!=N&&N(Fa)}}))}catch(Ga){null!=N&&N(Ga)}}),K,Z)}catch(Aa){null!=N&&N(Aa)}};Editor.crcTable=[];for(var m=0;256>m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(u,D,K,T){for(var N=
-0;N<T;N++)u=Editor.crcTable[(u^D.charCodeAt(K+N))&255]^u>>>8;return u};Editor.crc32=function(u){for(var D=-1,K=0;K<u.length;K++)D=D>>>8^Editor.crcTable[(D^u.charCodeAt(K))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(u,D,K,T,N){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}u=u.substring(u.indexOf(",")+
-1);u=window.atob?atob(u):Base64.decode(u,!0);var ba=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(Q(u,4),"IHDR"!=Q(u,4))null!=N&&N();else{Q(u,17);N=u.substring(0,ba);do{var ea=R(u);if("IDAT"==Q(u,4)){N=u.substring(0,ba-8);"pHYs"==D&&"dpi"==K?(K=Math.round(T/.0254),K=Y(K)+Y(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,D,0,4);T=Editor.updateCRC(T,K,0,K.length);N+=Y(K.length)+
-D+K+Y(T^4294967295);N+=u.substring(ba-8,u.length);break}N+=u.substring(ba-8,ba-4+ea);Q(u,ea);Q(u,4)}while(ea);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,D){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,D){var K=null;null!=u.editor.graph.getModel().getParent(D)?K=D.getId():null!=u.currentPage&&(K=u.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;
-Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=p.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,K=D.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(N){var Q=new ChangePageSetup(D);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=N;K.model.execute(Q)},{install:function(N){this.listener=function(){N(K.shadowVisible)};D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||
-(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));u.appendChild(T)}return u};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=q.apply(this,arguments);var D=this.editorUi,K=D.editor.graph;if(K.isEnabled()){var T=D.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var N=this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(R){D.editor.setAutosave(R);D.editor.autosave&&
-T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});u.appendChild(N)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(R){D.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=
-function(){R(K.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});N.style.paddingTop="5px";u.appendChild(N);var Q=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";N.appendChild(Q)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+ka-aa,ha=ua+(ya.y-ua)/ka-aa,da=new Image;da.onload=function(){try{for(var ca=-Math.round(sa-mxUtils.mod((wa-xa)*Y,sa)),la=-Math.round(sa-mxUtils.mod((ua-ha)*Y,sa));ca<Ea;ca+=sa)for(var ia=la;ia<La;ia+=sa)za.drawImage(da,ca/Y,ia/Y);Ga()}catch(ma){null!=O&&O(ma)}};da.onerror=function(ca){null!=O&&O(ca)};da.src=oa}else Ga()}catch(ca){null!=O&&O(ca)}});Ha.onerror=function(Ga){null!=O&&O(Ga)};ea&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var Na=mxUtils.bind(this,function(){try{null!=
+this.resolvedFontCss&&this.addFontCss(Aa,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Ga){null!=O&&O(Ga)}});this.embedExtFonts(mxUtils.bind(this,function(Ga){try{null!=Ga&&this.addFontCss(Aa,Ga),this.loadFonts(Na)}catch(Fa){null!=O&&O(Fa)}}))}catch(Ga){null!=O&&O(Ga)}}),M,Z)}catch(Aa){null!=O&&O(Aa)}};Editor.crcTable=[];for(var m=0;256>m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(t,E,M,T){for(var O=
+0;O<T;O++)t=Editor.crcTable[(t^E.charCodeAt(M+O))&255]^t>>>8;return t};Editor.crc32=function(t){for(var E=-1,M=0;M<t.length;M++)E=E>>>8^Editor.crcTable[(E^t.charCodeAt(M))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(t,E,M,T,O){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+
+1);t=window.atob?atob(t):Base64.decode(t,!0);var ba=0;if(Q(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(Q(t,4),"IHDR"!=Q(t,4))null!=O&&O();else{Q(t,17);O=t.substring(0,ba);do{var ea=S(t);if("IDAT"==Q(t,4)){O=t.substring(0,ba-8);"pHYs"==E&&"dpi"==M?(M=Math.round(T/.0254),M=Y(M)+Y(M)+String.fromCharCode(1)):M=M+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,E,0,4);T=Editor.updateCRC(T,M,0,M.length);O+=Y(M.length)+
+E+M+Y(T^4294967295);O+=t.substring(ba-8,t.length);break}O+=t.substring(ba-8,ba-4+ea);Q(t,ea);Q(t,4)}while(ea);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(t,E){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,E){var M=null;null!=t.editor.graph.getModel().getParent(E)?M=E.getId():null!=t.currentPage&&(M=t.currentPage.getId());return M});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;
+Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(t){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=p.apply(this,arguments);
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,M=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(O){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=O;M.model.execute(Q)},{install:function(O){this.listener=function(){O(M.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||
+(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));t.appendChild(T)}return t};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=q.apply(this,arguments);var E=this.editorUi,M=E.editor.graph;if(M.isEnabled()){var T=E.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var O=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(S){E.editor.setAutosave(S);E.editor.autosave&&
+T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});t.appendChild(O)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return M.mathEnabled},function(S){E.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
+function(){S(M.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});O.style.paddingTop="5px";t.appendChild(O);var Q=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";O.appendChild(Q)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
@@ -11568,93 +11569,93 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(u,D,K){if(null!=D){var T=function(Q){if(null!=Q)if(K)for(var R=0;R<Q.length;R++)D[Q[R].name]=Q[R];else for(var Y in D){var ba=!1;for(R=0;R<Q.length;R++)if(Q[R].name==Y&&Q[R].type==D[Y].type){ba=!0;break}ba||delete D[Y]}},N=this.editorUi.editor.graph.view.getState(u);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),T(N.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{T(JSON.parse(u))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
-{},K=u.vertices,T=u.edges,N=0;N<K.length;N++)this.findCommonProperties(K[N],D,0==N);for(N=0;N<T.length;N++)this.findCommonProperties(T[N],D,0==K.length&&0==N);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,u))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(u,D,K){function T(za,ta,ka,oa){fa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ka.index){for(var wa=[],ua=ka.parentRow.nextSibling;ua&&ua.getAttribute("data-pName")==za;)wa.push(ua.getAttribute("data-pValue")),ua=ua.nextSibling;ka.index<wa.length?null!=oa?wa.splice(oa,1):wa[ka.index]=ta:wa.push(ta);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ta=wa.join(",");null!=ka.countProperty&&(fa.setCellStyles(ka.countProperty,wa.length,
+function(t,E,M){if(null!=E){var T=function(Q){if(null!=Q)if(M)for(var S=0;S<Q.length;S++)E[Q[S].name]=Q[S];else for(var Y in E){var ba=!1;for(S=0;S<Q.length;S++)if(Q[S].name==Y&&Q[S].type==E[Y].type){ba=!0;break}ba||delete E[Y]}},O=this.editorUi.editor.graph.view.getState(t);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),T(O.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{T(JSON.parse(t))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
+{},M=t.vertices,T=t.edges,O=0;O<M.length;O++)this.findCommonProperties(M[O],E,0==O);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],E,0==M.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,t))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(t,E,M){function T(za,ta,ka,oa){fa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ka.index){for(var wa=[],ua=ka.parentRow.nextSibling;ua&&ua.getAttribute("data-pName")==za;)wa.push(ua.getAttribute("data-pValue")),ua=ua.nextSibling;ka.index<wa.length?null!=oa?wa.splice(oa,1):wa[ka.index]=ta:wa.push(ta);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ta=wa.join(",");null!=ka.countProperty&&(fa.setCellStyles(ka.countProperty,wa.length,
fa.getSelectionCells()),sa.push(ka.countProperty),ya.push(wa.length))}fa.setCellStyles(za,ta,fa.getSelectionCells());sa.push(za);ya.push(ta);if(null!=ka.dependentProps)for(za=0;za<ka.dependentProps.length;za++){var xa=ka.dependentPropsDefVal[za],ha=ka.dependentPropsVals[za];if(ha.length>ta)ha=ha.slice(0,ta);else for(var da=ha.length;da<ta;da++)ha.push(xa);ha=ha.join(",");fa.setCellStyles(ka.dependentProps[za],ha,fa.getSelectionCells());sa.push(ka.dependentProps[za]);ya.push(ha)}if("function"==typeof ka.onChange)ka.onChange(fa,
-ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function N(za,ta,ka){var oa=mxUtils.getOffset(u,!0),sa=mxUtils.getOffset(za,!0);ta.style.position="absolute";ta.style.left=sa.x-oa.x+"px";ta.style.top=sa.y-oa.y+"px";ta.style.width=za.offsetWidth+"px";ta.style.height=za.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function Q(za,ta,ka){var oa=document.createElement("div");oa.style.width="32px";oa.style.height=
-"4px";oa.style.margin="2px";oa.style.border="1px solid black";oa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){oa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function R(za,ta,ka,oa,sa,ya,wa){null!=ta&&(ta=ta.split(","),
+ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function O(za,ta,ka){var oa=mxUtils.getOffset(t,!0),sa=mxUtils.getOffset(za,!0);ta.style.position="absolute";ta.style.left=sa.x-oa.x+"px";ta.style.top=sa.y-oa.y+"px";ta.style.width=za.offsetWidth+"px";ta.style.height=za.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function Q(za,ta,ka){var oa=document.createElement("div");oa.style.width="32px";oa.style.height=
+"4px";oa.style.margin="2px";oa.style.border="1px solid black";oa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){oa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function S(za,ta,ka,oa,sa,ya,wa){null!=ta&&(ta=ta.split(","),
aa.push({name:za,values:ta,type:ka,defVal:oa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ua){for(var xa=ya,ha=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==za)xa=xa.nextSibling,ha++;else break;var da={type:ka,parentRow:ya,index:ha,isDeletable:!0,defVal:oa,countProperty:sa};ha=ea(za,"",da,0==ha%2,wa);T(za,oa,da);xa.parentNode.insertBefore(ha,xa.nextSibling);mxEvent.consume(ua)}));btn.style.height="16px";btn.style.width=
"25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,oa,sa,ya,wa){if(0<sa){var ua=Array(sa);ta=null!=ta?ta.split(","):[];for(var xa=0;xa<sa;xa++)ua[xa]=null!=ta[xa]?ta[xa]:null!=oa?oa:"";aa.push({name:za,values:ua,type:ka,defVal:oa,parentRow:ya,flipBkg:wa,size:sa})}return document.createElement("div")}function ba(za,ta,ka){var oa=document.createElement("input");oa.type="checkbox";oa.checked="1"==ta;mxEvent.addListener(oa,"change",function(){T(za,oa.checked?"1":"0",ka)});return oa}function ea(za,
ta,ka,oa,sa){var ya=ka.dispName,wa=ka.type,ua=document.createElement("tr");ua.className="gePropRow"+(sa?"Dark":"")+(oa?"Alt":"")+" gePropNonHeaderRow";ua.setAttribute("data-pName",za);ua.setAttribute("data-pValue",ta);oa=!1;null!=ka.index&&(ua.setAttribute("data-index",ka.index),ya=(null!=ya?ya:"")+"["+ka.index+"]",oa=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(xa,ya);xa.setAttribute("title",ya);oa&&(xa.style.textAlign="right");
-ua.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";if("color"==wa)xa.appendChild(Q(za,ta,ka));else if("bool"==wa||"boolean"==wa)xa.appendChild(ba(za,ta,ka));else if("enum"==wa){var ha=ka.enumList;for(sa=0;sa<ha.length;sa++)if(ya=ha[sa],ya.val==ta){mxUtils.write(xa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");N(xa,da);for(var ca=0;ca<ha.length;ca++){var la=ha[ca],ia=
-document.createElement("option");ia.value=mxUtils.htmlEntities(la.val);mxUtils.write(ia,mxResources.get(la.dispName,null,la.dispName));da.appendChild(ia)}da.value=ta;u.appendChild(da);mxEvent.addListener(da,"change",function(){var ma=mxUtils.htmlEntities(da.value);T(za,ma,ka)});da.focus();mxEvent.addListener(da,"blur",function(){u.removeChild(da)})}))}else"dynamicArr"==wa?xa.appendChild(R(za,ta,ka.subType,ka.subDefVal,ka.countProperty,ua,sa)):"staticArr"==wa?xa.appendChild(Y(za,ta,ka.subType,ka.subDefVal,
+ua.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";if("color"==wa)xa.appendChild(Q(za,ta,ka));else if("bool"==wa||"boolean"==wa)xa.appendChild(ba(za,ta,ka));else if("enum"==wa){var ha=ka.enumList;for(sa=0;sa<ha.length;sa++)if(ya=ha[sa],ya.val==ta){mxUtils.write(xa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");O(xa,da);for(var ca=0;ca<ha.length;ca++){var la=ha[ca],ia=
+document.createElement("option");ia.value=mxUtils.htmlEntities(la.val);mxUtils.write(ia,mxResources.get(la.dispName,null,la.dispName));da.appendChild(ia)}da.value=ta;t.appendChild(da);mxEvent.addListener(da,"change",function(){var ma=mxUtils.htmlEntities(da.value);T(za,ma,ka)});da.focus();mxEvent.addListener(da,"blur",function(){t.removeChild(da)})}))}else"dynamicArr"==wa?xa.appendChild(S(za,ta,ka.subType,ka.subDefVal,ka.countProperty,ua,sa)):"staticArr"==wa?xa.appendChild(Y(za,ta,ka.subType,ka.subDefVal,
ka.size,ua,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ta,sa.style.width="96px",sa.style.borderWidth="0px",xa.appendChild(sa)):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ta)),mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){function da(){var la=ca.value;la=0==la.length&&"string"!=wa?0:la;ka.allowAuto&&(null!=la.trim&&"auto"==la.trim().toLowerCase()?(la="auto",wa="string"):(la=parseFloat(la),la=isNaN(la)?0:la));null!=ka.min&&la<
-ka.min?la=ka.min:null!=ka.max&&la>ka.max&&(la=ka.max);la=encodeURIComponent(("int"==wa?parseInt(la):la)+"");T(za,la,ka)}var ca=document.createElement("input");N(xa,ca,!0);ca.value=decodeURIComponent(ta);ca.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(ca.type="number",ca.step="int"==wa?"1":"any",null!=ka.min&&(ca.min=parseFloat(ka.min)),null!=ka.max&&(ca.max=parseFloat(ka.max)));u.appendChild(ca);mxEvent.addListener(ca,"keypress",function(la){13==la.keyCode&&da()});ca.focus();mxEvent.addListener(ca,
-"blur",function(){da()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Z,function(da){T(za,"",ka,ka.index);mxEvent.consume(da)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",xa.appendChild(sa));ua.appendChild(xa);return ua}var Z=this,fa=this.editorUi.editor.graph,aa=[];u.style.position="relative";u.style.padding="0";var va=document.createElement("table");va.className="geProperties";va.style.whiteSpace="nowrap";va.style.width="100%";var ja=
-document.createElement("tr");ja.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ba.appendChild(Da);mxUtils.write(Ba,mxResources.get("property"));ja.style.cursor="pointer";var qa=function(){var za=va.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=u.childNodes.length-
-1;0<=ka;ka--)try{var oa=u.childNodes[ka],sa=oa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||u.removeChild(oa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<za.length;ka++)za[ka].style.display=ta};mxEvent.addListener(ja,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;qa()});ja.appendChild(Ba);Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.innerHTML=mxResources.get("value");ja.appendChild(Ba);va.appendChild(ja);var Ca=
-!1,Aa=!1;ja=null;1==K.vertices.length&&0==K.edges.length?ja=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(ja=K.edges[0].id);null!=ja&&va.appendChild(ea("id",mxUtils.htmlEntities(ja),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ha in D)if(ja=D[Ha],"function"!=typeof ja.isVisible||ja.isVisible(K,this)){var Na=null!=K.style[Ha]?mxUtils.htmlEntities(K.style[Ha]+""):null!=ja.getDefaultValue?ja.getDefaultValue(K,this):ja.defVal;if("separator"==ja.type)Aa=!Aa;else{if("staticArr"==ja.type)ja.size=
-parseInt(K.style[ja.sizeProperty]||D[ja.sizeProperty].defVal)||0;else if(null!=ja.dependentProps){var Ga=ja.dependentProps,Fa=[],Ea=[];for(Ba=0;Ba<Ga.length;Ba++){var La=K.style[Ga[Ba]];Ea.push(D[Ga[Ba]].subDefVal);Fa.push(null!=La?La.split(","):[])}ja.dependentPropsDefVal=Ea;ja.dependentPropsVals=Fa}va.appendChild(ea(Ha,Na,ja,Ca,Aa));Ca=!Ca}}for(Ba=0;Ba<aa.length;Ba++)for(ja=aa[Ba],D=ja.parentRow,K=0;K<ja.values.length;K++)Ha=ea(ja.name,ja.values[K],{type:ja.type,parentRow:ja.parentRow,isDeletable:ja.isDeletable,
-index:K,defVal:ja.defVal,countProperty:ja.countProperty,size:ja.size},0==K%2,ja.flipBkg),D.parentNode.insertBefore(Ha,D.nextSibling),D=Ha;u.appendChild(va);qa();return u};StyleFormatPanel.prototype.addStyles=function(u){function D(ja){mxEvent.addListener(ja,"mouseenter",function(){ja.style.opacity="1"});mxEvent.addListener(ja,"mouseleave",function(){ja.style.opacity="0.5"})}var K=this.editorUi,T=K.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";
-N.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(N);var Q="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(" "),R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.position="relative";R.style.textAlign="center";R.style.width="210px";for(var Y=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var ea=
-document.createElement("div");ea.style.display="inline-block";ea.style.width="6px";ea.style.height="6px";ea.style.marginLeft="4px";ea.style.marginRight="3px";ea.style.borderRadius="3px";ea.style.cursor="pointer";ea.style.background="transparent";ea.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ja){mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){Z(ja)}))})(ba);Y.push(ea);R.appendChild(ea)}var Z=mxUtils.bind(this,function(ja){null!=Y[ja]&&(null!=this.format.currentScheme&&
-null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ja,fa(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),fa=mxUtils.bind(this,function(ja){var Ba=mxUtils.bind(this,function(qa){var Ca=mxUtils.button("",mxUtils.bind(this,function(Na){T.getModel().beginUpdate();try{for(var Ga=K.getSelectionState().cells,Fa=0;Fa<Ga.length;Fa++){for(var Ea=T.getModel().getStyle(Ga[Fa]),
+ka.min?la=ka.min:null!=ka.max&&la>ka.max&&(la=ka.max);la=encodeURIComponent(("int"==wa?parseInt(la):la)+"");T(za,la,ka)}var ca=document.createElement("input");O(xa,ca,!0);ca.value=decodeURIComponent(ta);ca.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(ca.type="number",ca.step="int"==wa?"1":"any",null!=ka.min&&(ca.min=parseFloat(ka.min)),null!=ka.max&&(ca.max=parseFloat(ka.max)));t.appendChild(ca);mxEvent.addListener(ca,"keypress",function(la){13==la.keyCode&&da()});ca.focus();mxEvent.addListener(ca,
+"blur",function(){da()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Z,function(da){T(za,"",ka,ka.index);mxEvent.consume(da)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",xa.appendChild(sa));ua.appendChild(xa);return ua}var Z=this,fa=this.editorUi.editor.graph,aa=[];t.style.position="relative";t.style.padding="0";var va=document.createElement("table");va.className="geProperties";va.style.whiteSpace="nowrap";va.style.width="100%";var ja=
+document.createElement("tr");ja.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ba.appendChild(Da);mxUtils.write(Ba,mxResources.get("property"));ja.style.cursor="pointer";var qa=function(){var za=va.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=t.childNodes.length-
+1;0<=ka;ka--)try{var oa=t.childNodes[ka],sa=oa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||t.removeChild(oa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<za.length;ka++)za[ka].style.display=ta};mxEvent.addListener(ja,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;qa()});ja.appendChild(Ba);Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.innerHTML=mxResources.get("value");ja.appendChild(Ba);va.appendChild(ja);var Ca=
+!1,Aa=!1;ja=null;1==M.vertices.length&&0==M.edges.length?ja=M.vertices[0].id:0==M.vertices.length&&1==M.edges.length&&(ja=M.edges[0].id);null!=ja&&va.appendChild(ea("id",mxUtils.htmlEntities(ja),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ha in E)if(ja=E[Ha],"function"!=typeof ja.isVisible||ja.isVisible(M,this)){var Na=null!=M.style[Ha]?mxUtils.htmlEntities(M.style[Ha]+""):null!=ja.getDefaultValue?ja.getDefaultValue(M,this):ja.defVal;if("separator"==ja.type)Aa=!Aa;else{if("staticArr"==ja.type)ja.size=
+parseInt(M.style[ja.sizeProperty]||E[ja.sizeProperty].defVal)||0;else if(null!=ja.dependentProps){var Ga=ja.dependentProps,Fa=[],Ea=[];for(Ba=0;Ba<Ga.length;Ba++){var La=M.style[Ga[Ba]];Ea.push(E[Ga[Ba]].subDefVal);Fa.push(null!=La?La.split(","):[])}ja.dependentPropsDefVal=Ea;ja.dependentPropsVals=Fa}va.appendChild(ea(Ha,Na,ja,Ca,Aa));Ca=!Ca}}for(Ba=0;Ba<aa.length;Ba++)for(ja=aa[Ba],E=ja.parentRow,M=0;M<ja.values.length;M++)Ha=ea(ja.name,ja.values[M],{type:ja.type,parentRow:ja.parentRow,isDeletable:ja.isDeletable,
+index:M,defVal:ja.defVal,countProperty:ja.countProperty,size:ja.size},0==M%2,ja.flipBkg),E.parentNode.insertBefore(Ha,E.nextSibling),E=Ha;t.appendChild(va);qa();return t};StyleFormatPanel.prototype.addStyles=function(t){function E(ja){mxEvent.addListener(ja,"mouseenter",function(){ja.style.opacity="1"});mxEvent.addListener(ja,"mouseleave",function(){ja.style.opacity="0.5"})}var M=this.editorUi,T=M.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
+O.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(O);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var Y=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var ea=
+document.createElement("div");ea.style.display="inline-block";ea.style.width="6px";ea.style.height="6px";ea.style.marginLeft="4px";ea.style.marginRight="3px";ea.style.borderRadius="3px";ea.style.cursor="pointer";ea.style.background="transparent";ea.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ja){mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){Z(ja)}))})(ba);Y.push(ea);S.appendChild(ea)}var Z=mxUtils.bind(this,function(ja){null!=Y[ja]&&(null!=this.format.currentScheme&&
+null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ja,fa(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),fa=mxUtils.bind(this,function(ja){var Ba=mxUtils.bind(this,function(qa){var Ca=mxUtils.button("",mxUtils.bind(this,function(Na){T.getModel().beginUpdate();try{for(var Ga=M.getSelectionState().cells,Fa=0;Fa<Ga.length;Fa++){for(var Ea=T.getModel().getStyle(Ga[Fa]),
La=0;La<Q.length;La++)Ea=mxUtils.removeStylename(Ea,Q[La]);var za=T.getModel().isVertex(Ga[Fa])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=qa?(mxEvent.isShiftDown(Na)||(Ea=""==qa.fill?mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,qa.fill||mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,null)),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,qa.gradient||mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||
mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!T.getModel().isVertex(Ga[Fa])||(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FONTCOLOR,qa.font||mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(Ea=""==qa.stroke?mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,qa.stroke||mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,null)))):(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,
"#ffffff")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Ga[Fa])&&(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Ga[Fa],Ea)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";
Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=qa){var Aa="1"==urlParams.sketch?"2px solid":"1px solid";null!=qa.gradient?mxClient.IS_IE&&10>document.documentMode?Ca.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+qa.fill+"', EndColorStr='"+qa.gradient+"', GradientType=0)":Ca.style.backgroundImage="linear-gradient("+qa.fill+" 0px,"+qa.gradient+" 100%)":qa.fill==mxConstants.NONE?Ca.style.background="url('"+Dialog.prototype.noColorImage+
"')":Ca.style.backgroundColor=""==qa.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):qa.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ca.style.border=qa.stroke==mxConstants.NONE?Aa+" transparent":""==qa.stroke?Aa+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Aa+" "+(qa.stroke||mxUtils.getValue(T.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=qa.title&&Ca.setAttribute("title",qa.title)}else{Aa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ha=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ca.style.backgroundColor=Aa;Ca.style.border="1px solid "+Ha}Ca.style.borderRadius="0";N.appendChild(Ca)});N.innerHTML="";for(var Da=0;Da<ja.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(N),Ba(ja[Da])});
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=qa.title&&Ca.setAttribute("title",qa.title)}else{Aa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ha=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ca.style.backgroundColor=Aa;Ca.style.border="1px solid "+Ha}Ca.style.borderRadius="0";O.appendChild(Ca)});O.innerHTML="";for(var Da=0;Da<ja.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(O),Ba(ja[Da])});
null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var aa=document.createElement("div");aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var va=document.createElement("div");va.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(u.appendChild(aa),u.appendChild(va));mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(aa);D(va);fa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(R);return u};StyleFormatPanel.prototype.addEditOps=function(u){var D=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,T=null;1==D.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(N){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",u.appendChild(T));K=1==D.cells.length?K.view.getState(D.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(N){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
-mxResources.get("editShape")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),u.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(N){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
-u.appendChild(D));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-D){var K=Graph.fontMapping[D];null==K&&Graph.isCssFontUrl(D)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",D)):(null==K&&(K='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+D+'");\n}'),u=document.createElement("style"),mxUtils.write(u,K));return u};Graph.addFont=function(u,D,K){if(null!=u&&0<u.length&&null!=D&&0<D.length){var T=u.toLowerCase();if("helvetica"!=T&&"arial"!=u&&"sans-serif"!=
-T){var N=Graph.customFontElements[T];null!=N&&N.url!=D&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=D,"http:"==D.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(D)),N={name:u,url:D,elt:Graph.createFontElement(u,N)},Graph.customFontElements[T]=N,Graph.recentCustomFonts[T]=N,D=document.getElementsByTagName("head")[0],null!=K&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=K,N.elt.onerror=K):K()),null!=D&&D.appendChild(N.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
-return u};Graph.getFontUrl=function(u,D){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(D=u.url);return D};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var D=0;D<u.length;D++){var K=u[D].getAttribute("data-font-src");if(null!=K){var T="FONT"==u[D].nodeName?u[D].getAttribute("face"):u[D].style.fontFamily;null!=T&&Graph.addFont(T,K)}}};Graph.processFontStyle=function(u){if(null!=u){var D=mxUtils.getValue(u,"fontSource",null);if(null!=D){var K=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
-null);null!=K&&Graph.addFont(K,decodeURIComponent(D))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function u(N){D=N}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(N){D=null});this.isMouseInsertPoint=function(){return null!=D};var K=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):K.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=Q.marginLeft||0;R.marginRight=Q.marginRight||0;R.marginTop=Q.marginTop||0;R.marginBottom=
-Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,D){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,D,K,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
-var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,D,K){function T(){for(var ja=R.getSelectionCells(),Ba=[],Da=0;Da<ja.length;Da++)R.isCellVisible(ja[Da])&&Ba.push(ja[Da]);R.setSelectionCells(Ba)}function N(ja){R.hiddenTags=ja?[]:Y.slice();T();R.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Da=document.createElement("table");
-Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var qa=document.createElement("tbody");if(null!=ja&&0<ja.length)for(var Ca=0;Ca<ja.length;Ca++)(function(Aa){var Ha=0>mxUtils.indexOf(R.hiddenTags,Aa),Na=document.createElement("tr"),Ga=document.createElement("td");Ga.style.align="center";Ga.style.width="16px";var Fa=document.createElement("img");Fa.setAttribute("src",Ha?Editor.visibleImage:Editor.hiddenImage);Fa.setAttribute("title",
-mxResources.get(Ha?"hideIt":"show",[Aa]));mxUtils.setOpacity(Fa,Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(D||Editor.isDarkMode())Fa.style.filter="invert(100%)";Ga.appendChild(Fa);mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(R.hiddenTags,Aa);mxEvent.isShiftDown(La)?N(0<=mxUtils.indexOf(R.hiddenTags,Aa)):(0>za?R.hiddenTags.push(Aa):0<=za&&R.hiddenTags.splice(za,1),T(),R.refresh());mxEvent.consume(La)});Na.appendChild(Ga);Ga=document.createElement("td");
-Ga.style.overflow="hidden";Ga.style.whiteSpace="nowrap";Ga.style.textOverflow="ellipsis";Ga.style.verticalAlign="middle";Ga.style.cursor="pointer";Ga.setAttribute("title",Aa);a=document.createElement("a");mxUtils.write(a,Aa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ha?100:40);Ga.appendChild(a);mxEvent.addListener(Ga,"click",function(La){if(mxEvent.isShiftDown(La)){N(!0);var za=R.getCellsForTags([Aa],null,null,!0);R.isEnabled()?R.setSelectionCells(za):R.highlightCells(za)}else if(Ha&&
-0<R.hiddenTags.length)N(!0);else{za=Y.slice();var ta=mxUtils.indexOf(za,Aa);za.splice(ta,1);R.hiddenTags=za;T();R.refresh()}mxEvent.consume(La)});Na.appendChild(Ga);if(R.isEnabled()){Ga=document.createElement("td");Ga.style.verticalAlign="middle";Ga.style.textAlign="center";Ga.style.width="18px";if(null==Ba){Ga.style.align="center";Ga.style.width="16px";Fa=document.createElement("img");Fa.setAttribute("src",Editor.crossImage);Fa.setAttribute("title",mxResources.get("removeIt",[Aa]));mxUtils.setOpacity(Fa,
-Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(D||Editor.isDarkMode())Fa.style.filter="invert(100%)";mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(Y,Aa);0<=za&&Y.splice(za,1);R.removeTagsForCells(R.model.getDescendants(R.model.getRoot()),[Aa]);R.refresh();mxEvent.consume(La)});Ga.appendChild(Fa)}else{var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,
-Aa);Ea.checked=Ea.defaultChecked;Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[Aa]));mxEvent.addListener(Ea,"change",function(La){Ea.checked?R.addTagsForCells(R.getSelectionCells(),[Aa]):R.removeTagsForCells(R.getSelectionCells(),[Aa]);mxEvent.consume(La)});Ga.appendChild(Ea)}Na.appendChild(Ga)}qa.appendChild(Na)})(ja[Ca]);Da.appendChild(qa);ea.appendChild(Da)}}var R=this,Y=R.hiddenTags.slice(),ba=document.createElement("div");ba.style.userSelect=
-"none";ba.style.overflow="hidden";ba.style.padding="10px";ba.style.height="100%";var ea=document.createElement("div");ea.style.boxSizing="border-box";ea.style.borderRadius="4px";ea.style.userSelect="none";ea.style.overflow="auto";ea.style.position="absolute";ea.style.left="10px";ea.style.right="10px";ea.style.top="10px";ea.style.border=R.isEnabled()?"1px solid #808080":"none";ea.style.bottom=R.isEnabled()?"48px":"10px";ba.appendChild(ea);var Z=mxUtils.button(mxResources.get("reset"),function(ja){R.hiddenTags=
-[];mxEvent.isShiftDown(ja)||(Y=R.hiddenTags.slice());T();R.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var fa=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(Y,function(ja){Y=ja;aa()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";R.addListener(mxEvent.ROOT,function(){Y=R.hiddenTags.slice()});var aa=mxUtils.bind(this,function(ja,Ba){if(u()){ja=R.getAllTags();for(Ba=0;Ba<ja.length;Ba++)0>
-mxUtils.indexOf(Y,ja[Ba])&&Y.push(ja[Ba]);Y.sort();R.isSelectionEmpty()?Q(Y):Q(Y,R.getCommonTagsForCells(R.getSelectionCells()))}});R.selectionModel.addListener(mxEvent.CHANGE,aa);R.model.addListener(mxEvent.CHANGE,aa);R.addListener(mxEvent.REFRESH,aa);var va=document.createElement("div");va.style.boxSizing="border-box";va.style.whiteSpace="nowrap";va.style.position="absolute";va.style.overflow="hidden";va.style.bottom="0px";va.style.height="42px";va.style.right="10px";va.style.left="10px";R.isEnabled()&&
-(va.appendChild(Z),va.appendChild(fa),ba.appendChild(va));return{div:ba,refresh:aa}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var D in Graph.customFontElements){var K=Graph.customFontElements[D];u.push({name:K.name,url:K.url})}return u};Graph.prototype.setFont=function(u,D){Graph.addFont(u,D);document.execCommand("fontname",!1,u);if(null!=D){var K=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(u,D);for(var T=0;T<K.length;T++)K[T].getAttribute("face")==
-u&&K[T].getAttribute("data-font-src")!=D&&K[T].setAttribute("data-font-src",D)}};var t=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return t.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var D in u)this.globalVars[D]=
-u[D]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var D=z.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[u]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,D,K,T,N,Q,R,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Da=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var qa=L.apply(this,arguments),Ca=this.getCustomFonts();if(Z&&0<Ca.length){var Aa=qa.ownerDocument,Ha=null!=Aa.createElementNS?Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?Ha.setAttributeNS("type","text/css"):Ha.setAttribute("type","text/css");for(var Na="",Ga="",Fa=0;Fa<Ca.length;Fa++){var Ea=Ca[Fa].name,La=Ca[Fa].url;Graph.isCssFontUrl(La)?
-Na+="@import url("+La+");\n":Ga+='@font-face {\nfont-family: "'+Ea+'";\nsrc: url("'+La+'");\n}\n'}Ha.appendChild(Aa.createTextNode(Na+Ga));qa.getElementsByTagName("defs")[0].appendChild(Ha)}null!=ja&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ba,this.stylesheet=ja,this.refresh());return qa};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=C.apply(this,arguments);if(this.mathEnabled){var D=u.drawText;u.drawText=function(K,T){if(null!=K.text&&
-null!=K.text.value&&K.text.checkBounds()&&(mxUtils.isNode(K.text.value)||K.text.dialect==mxConstants.DIALECT_STRICTHTML)){var N=K.text.getContentNode();if(null!=N){N=N.cloneNode(!0);if(N.getElementsByTagNameNS)for(var Q=N.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=N.innerHTML&&(Q=K.text.value,K.text.value=N.innerHTML,D.apply(this,arguments),K.text.value=Q)}}else D.apply(this,arguments)}}return u};var E=mxCellRenderer.prototype.destroy;
-mxCellRenderer.prototype.destroy=function(u){E.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var P=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);
-return P.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var D="1"==mxUtils.getValue(u.style,"enumerate",0);D&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM),u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):D||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);D=u.secondLabel;if(null!=D){var K=u.view.scale,T=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*K,u.y+4*K,0,0):mxRectangle.fromPoint(u.view.getPoint(u));D.bounds.equals(u)&&D.value==T&&D.scale==K||(D.bounds=
-u,D.value=T,D.scale=K,D.redraw())}};var J=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){J.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
-u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var K=!1,T=0,N=0,Q=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),R=mxUtils.bind(this,
-function(){K&&(K=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&ba()}),ba=mxUtils.bind(this,function(){if(N<u.length){var ea=this.stoppingCustomActions,Z=u[N++],fa=[];if(null!=Z.open)if(R(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ea||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),R());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ea?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ea?0:Z.fadeOut.delay));null!=Z.wipeIn&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+1<this.defaultColorSchemes.length&&(t.appendChild(aa),t.appendChild(va));mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(aa);E(va);fa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var E=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,T=null;1==E.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",t.appendChild(T));M=1==E.cells.length?M.view.getState(E.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
+mxResources.get("editShape")),E.style.marginBottom="2px",null==T?E.style.width="210px":(T.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),t.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==T?E.style.width="210px":(T.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
+t.appendChild(E));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
+E){var M=Graph.fontMapping[E];null==M&&Graph.isCssFontUrl(E)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",E)):(null==M&&(M='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+E+'");\n}'),t=document.createElement("style"),mxUtils.write(t,M));return t};Graph.addFont=function(t,E,M){if(null!=t&&0<t.length&&null!=E&&0<E.length){var T=t.toLowerCase();if("helvetica"!=T&&"arial"!=t&&"sans-serif"!=
+T){var O=Graph.customFontElements[T];null!=O&&O.url!=E&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=E,"http:"==E.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(E)),O={name:t,url:E,elt:Graph.createFontElement(t,O)},Graph.customFontElements[T]=O,Graph.recentCustomFonts[T]=O,E=document.getElementsByTagName("head")[0],null!=M&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=M,O.elt.onerror=M):M()),null!=E&&E.appendChild(O.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M();
+return t};Graph.getFontUrl=function(t,E){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(E=t.url);return E};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var E=0;E<t.length;E++){var M=t[E].getAttribute("data-font-src");if(null!=M){var T="FONT"==t[E].nodeName?t[E].getAttribute("face"):t[E].style.fontFamily;null!=T&&Graph.addFont(T,M)}}};Graph.processFontStyle=function(t){if(null!=t){var E=mxUtils.getValue(t,"fontSource",null);if(null!=E){var M=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
+null);null!=M&&Graph.addFont(M,decodeURIComponent(E))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function t(O){E=O}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(O){E=null});this.isMouseInsertPoint=function(){return null!=E};var M=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):M.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var Q=this.graph.getCellStyle(O);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=
+Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,E){return Graph.processFontStyle(A.apply(this,arguments))};var K=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,E,M,T,O,Q,S,Y,ba,ea,Z){K.apply(this,arguments);Graph.processFontAttributes(Z)};
+var P=mxText.prototype.redraw;mxText.prototype.redraw=function(){P.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,E,M){function T(){for(var ja=S.getSelectionCells(),Ba=[],Da=0;Da<ja.length;Da++)S.isCellVisible(ja[Da])&&Ba.push(ja[Da]);S.setSelectionCells(Ba)}function O(ja){S.hiddenTags=ja?[]:Y.slice();T();S.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Da=document.createElement("table");
+Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var qa=document.createElement("tbody");if(null!=ja&&0<ja.length)for(var Ca=0;Ca<ja.length;Ca++)(function(Aa){var Ha=0>mxUtils.indexOf(S.hiddenTags,Aa),Na=document.createElement("tr"),Ga=document.createElement("td");Ga.style.align="center";Ga.style.width="16px";var Fa=document.createElement("img");Fa.setAttribute("src",Ha?Editor.visibleImage:Editor.hiddenImage);Fa.setAttribute("title",
+mxResources.get(Ha?"hideIt":"show",[Aa]));mxUtils.setOpacity(Fa,Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(E||Editor.isDarkMode())Fa.style.filter="invert(100%)";Ga.appendChild(Fa);mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(S.hiddenTags,Aa);mxEvent.isShiftDown(La)?O(0<=mxUtils.indexOf(S.hiddenTags,Aa)):(0>za?S.hiddenTags.push(Aa):0<=za&&S.hiddenTags.splice(za,1),T(),S.refresh());mxEvent.consume(La)});Na.appendChild(Ga);Ga=document.createElement("td");
+Ga.style.overflow="hidden";Ga.style.whiteSpace="nowrap";Ga.style.textOverflow="ellipsis";Ga.style.verticalAlign="middle";Ga.style.cursor="pointer";Ga.setAttribute("title",Aa);a=document.createElement("a");mxUtils.write(a,Aa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ha?100:40);Ga.appendChild(a);mxEvent.addListener(Ga,"click",function(La){if(mxEvent.isShiftDown(La)){O(!0);var za=S.getCellsForTags([Aa],null,null,!0);S.isEnabled()?S.setSelectionCells(za):S.highlightCells(za)}else if(Ha&&
+0<S.hiddenTags.length)O(!0);else{za=Y.slice();var ta=mxUtils.indexOf(za,Aa);za.splice(ta,1);S.hiddenTags=za;T();S.refresh()}mxEvent.consume(La)});Na.appendChild(Ga);if(S.isEnabled()){Ga=document.createElement("td");Ga.style.verticalAlign="middle";Ga.style.textAlign="center";Ga.style.width="18px";if(null==Ba){Ga.style.align="center";Ga.style.width="16px";Fa=document.createElement("img");Fa.setAttribute("src",Editor.crossImage);Fa.setAttribute("title",mxResources.get("removeIt",[Aa]));mxUtils.setOpacity(Fa,
+Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(E||Editor.isDarkMode())Fa.style.filter="invert(100%)";mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(Y,Aa);0<=za&&Y.splice(za,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[Aa]);S.refresh();mxEvent.consume(La)});Ga.appendChild(Fa)}else{var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,
+Aa);Ea.checked=Ea.defaultChecked;Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[Aa]));mxEvent.addListener(Ea,"change",function(La){Ea.checked?S.addTagsForCells(S.getSelectionCells(),[Aa]):S.removeTagsForCells(S.getSelectionCells(),[Aa]);mxEvent.consume(La)});Ga.appendChild(Ea)}Na.appendChild(Ga)}qa.appendChild(Na)})(ja[Ca]);Da.appendChild(qa);ea.appendChild(Da)}}var S=this,Y=S.hiddenTags.slice(),ba=document.createElement("div");ba.style.userSelect=
+"none";ba.style.overflow="hidden";ba.style.padding="10px";ba.style.height="100%";var ea=document.createElement("div");ea.style.boxSizing="border-box";ea.style.borderRadius="4px";ea.style.userSelect="none";ea.style.overflow="auto";ea.style.position="absolute";ea.style.left="10px";ea.style.right="10px";ea.style.top="10px";ea.style.border=S.isEnabled()?"1px solid #808080":"none";ea.style.bottom=S.isEnabled()?"48px":"10px";ba.appendChild(ea);var Z=mxUtils.button(mxResources.get("reset"),function(ja){S.hiddenTags=
+[];mxEvent.isShiftDown(ja)||(Y=S.hiddenTags.slice());T();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var fa=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(Y,function(ja){Y=ja;aa()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";S.addListener(mxEvent.ROOT,function(){Y=S.hiddenTags.slice()});var aa=mxUtils.bind(this,function(ja,Ba){if(t()){ja=S.getAllTags();for(Ba=0;Ba<ja.length;Ba++)0>
+mxUtils.indexOf(Y,ja[Ba])&&Y.push(ja[Ba]);Y.sort();S.isSelectionEmpty()?Q(Y):Q(Y,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,aa);S.model.addListener(mxEvent.CHANGE,aa);S.addListener(mxEvent.REFRESH,aa);var va=document.createElement("div");va.style.boxSizing="border-box";va.style.whiteSpace="nowrap";va.style.position="absolute";va.style.overflow="hidden";va.style.bottom="0px";va.style.height="42px";va.style.right="10px";va.style.left="10px";S.isEnabled()&&
+(va.appendChild(Z),va.appendChild(fa),ba.appendChild(va));return{div:ba,refresh:aa}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var E in Graph.customFontElements){var M=Graph.customFontElements[E];t.push({name:M.name,url:M.url})}return t};Graph.prototype.setFont=function(t,E){Graph.addFont(t,E);document.execCommand("fontname",!1,t);if(null!=E){var M=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(t,E);for(var T=0;T<M.length;T++)M[T].getAttribute("face")==
+t&&M[T].getAttribute("data-font-src")!=E&&M[T].setAttribute("data-font-src",E)}};var L=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return L.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var E in t)this.globalVars[E]=
+t[E]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var E=u.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[t]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,E,M,T,O,Q,S,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Da=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var qa=D.apply(this,arguments),Ca=this.getCustomFonts();if(Z&&0<Ca.length){var Aa=qa.ownerDocument,Ha=null!=Aa.createElementNS?Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?Ha.setAttributeNS("type","text/css"):Ha.setAttribute("type","text/css");for(var Na="",Ga="",Fa=0;Fa<Ca.length;Fa++){var Ea=Ca[Fa].name,La=Ca[Fa].url;Graph.isCssFontUrl(La)?
+Na+="@import url("+La+");\n":Ga+='@font-face {\nfont-family: "'+Ea+'";\nsrc: url("'+La+'");\n}\n'}Ha.appendChild(Aa.createTextNode(Na+Ga));qa.getElementsByTagName("defs")[0].appendChild(Ha)}null!=ja&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ba,this.stylesheet=ja,this.refresh());return qa};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var t=B.apply(this,arguments);if(this.mathEnabled){var E=t.drawText;t.drawText=function(M,T){if(null!=M.text&&
+null!=M.text.value&&M.text.checkBounds()&&(mxUtils.isNode(M.text.value)||M.text.dialect==mxConstants.DIALECT_STRICTHTML)){var O=M.text.getContentNode();if(null!=O){O=O.cloneNode(!0);if(O.getElementsByTagNameNS)for(var Q=O.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=O.innerHTML&&(Q=M.text.value,M.text.value=O.innerHTML,E.apply(this,arguments),M.text.value=Q)}}else E.apply(this,arguments)}}return t};var C=mxCellRenderer.prototype.destroy;
+mxCellRenderer.prototype.destroy=function(t){C.apply(this,arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var N=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);
+return N.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var E="1"==mxUtils.getValue(t.style,"enumerate",0);E&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
+mxConstants.ALIGN_BOTTOM),t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):E||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);E=t.secondLabel;if(null!=E){var M=t.view.scale,T=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*M,t.y+4*M,0,0):mxRectangle.fromPoint(t.view.getPoint(t));E.bounds.equals(t)&&E.value==T&&E.scale==M||(E.bounds=
+t,E.value=T,E.scale=M,E.redraw())}};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){I.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!=
+t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,T=0,O=0,Q=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){M&&(M=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&ba()}),ba=mxUtils.bind(this,function(){if(O<t.length){var ea=this.stoppingCustomActions,Z=t[O++],fa=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ea||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ea?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ea?0:Z.fadeOut.delay));null!=Z.wipeIn&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
!0),!0)));null!=Z.wipeOut&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){Q();var aa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Z.hide&&(Q(),aa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
(Q(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(Q(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));aa=[];null!=Z.select&&this.isEnabled()&&(aa=this.getCellsForAction(Z.select),this.setSelectionCells(aa));null!=Z.highlight&&(aa=this.getCellsForAction(Z.highlight),this.highlightCells(aa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
null!=Z.scroll&&(aa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);if(null!=Z.tags){aa=[];null!=Z.tags.hidden&&(aa=aa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var va=this.getAllTags(),ja=0;ja<va.length;ja++)0>mxUtils.indexOf(Z.tags.visible,va[ja])&&0>mxUtils.indexOf(aa,va[ja])&&aa.push(va[ja]);this.hiddenTags=aa;this.refresh()}0<fa.length&&(T++,this.executeAnimations(fa,Y,ea?1:Z.steps,ea?0:Z.delay));
-0==T?ba():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=D&&D()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,D){var K=this.getLinkForCell(D);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(u,K));if(this.isHtmlLabel(D)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var N=T.getElementsByTagName("a"),Q=!1,R=0;R<N.length;R++)K=N[R].getAttribute("href"),null!=K&&"data:action/json,"==
-K.substring(0,17)&&(N[R].setAttribute("href",this.updateCustomLink(u,K)),Q=!0);Q&&this.labelChanged(D,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,D){if("data:action/json,"==D.substring(0,17))try{var K=JSON.parse(D.substring(17));null!=K.actions&&(this.updateCustomLinkActions(u,K.actions),D="data:action/json,"+JSON.stringify(K))}catch(T){}return D};Graph.prototype.updateCustomLinkActions=function(u,D){for(var K=0;K<D.length;K++){var T=D[K],N;for(N in T)this.updateCustomLinkAction(u,
-T[N],"cells"),this.updateCustomLinkAction(u,T[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,D,K){if(null!=D&&null!=D[K]){for(var T=[],N=0;N<D[K].length;N++)if("*"==D[K][N])T.push(D[K][N]);else{var Q=u[D[K][N]];null!=Q?""!=Q&&T.push(Q):T.push(D[K][N])}D[K]=T}};Graph.prototype.getCellsForAction=function(u,D){D=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,D));if(null!=u.excludeCells){for(var K=[],T=0;T<D.length;T++)0>u.excludeCells.indexOf(D[T].id)&&K.push(D[T]);
-D=K}return D};Graph.prototype.getCellsById=function(u){var D=[];if(null!=u)for(var K=0;K<u.length;K++)if("*"==u[K]){var T=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[K]);null!=N&&D.push(N)}return D};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||
-0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var D=0;D<u.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,u[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,D,K,T){var N=[];if(null!=u){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var Q=0,R={},Y=0;Y<u.length;Y++)0<u[Y].length&&(R[u[Y]]=!0,Q++);for(Y=0;Y<D.length;Y++)if(K&&this.model.getParent(D[Y])==this.model.root||this.model.isVertex(D[Y])||this.model.isEdge(D[Y])){var ba=
-this.getTagsForCell(D[Y]),ea=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=u.length)){for(var Z=ea=0;Z<ba.length&&ea<Q;Z++)null!=R[ba[Z]]&&ea++;ea=ea==Q}ea&&(1!=T||this.isCellVisible(D[Y]))&&N.push(D[Y])}}return N};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var D=null,K=[],T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);K=[];if(0<N.length){N=N.split(" ");for(var Q={},
-R=0;R<N.length;R++)if(null==D||null!=D[N[R]])Q[N[R]]=!0,K.push(N[R]);D=Q}else return[]}return K};Graph.prototype.getTagsForCells=function(u){for(var D=[],K={},T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==K[N[Q]]&&(K[N[Q]]=!0,D.push(N[Q]))}}return D};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,D){if(0<u.length&&0<D.length){this.model.beginUpdate();
-try{for(var K=0;K<u.length;K++){for(var T=this.getTagsForCell(u[K]),N=T.split(" "),Q=!1,R=0;R<D.length;R++){var Y=mxUtils.trim(D[R]);""!=Y&&0>mxUtils.indexOf(N,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(u[K],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,D){if(0<u.length&&0<D.length){this.model.beginUpdate();try{for(var K=0;K<u.length;K++){var T=this.getTagsForCell(u[K]);if(0<T.length){for(var N=T.split(" "),Q=!1,R=0;R<D.length;R++){var Y=
-mxUtils.indexOf(N,D[R]);0<=Y&&(N.splice(Y,1),Q=!0)}Q&&this.setAttributeForCell(u[K],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var D=0;D<u.length;D++)this.model.setVisible(u[D],!this.model.isVisible(u[D]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,D){this.model.beginUpdate();try{for(var K=0;K<u.length;K++)this.model.setVisible(u[K],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
-function(u,D,K,T){for(var N=0;N<u.length;N++)this.highlightCell(u[N],D,K,T)};Graph.prototype.highlightCell=function(u,D,K,T,N){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;u=this.view.getState(u);var Q=null;null!=u&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+N),Q=new mxCellHighlight(this,D,N,!1),null!=T&&(Q.opacity=T),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),
-Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},K));return Q};Graph.prototype.addSvgShadow=function(u,D,K,T){K=null!=K?K:!1;T=null!=T?T:!0;var N=u.ownerDocument,Q=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");Q.setAttribute("id",this.shadowId);var R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation",
-this.svgShadowBlur);R.setAttribute("result","blur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");R.setAttribute("in","blur");R.setAttribute("dx",this.svgShadowSize);R.setAttribute("dy",this.svgShadowSize);R.setAttribute("result","offsetBlur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");R.setAttribute("flood-color",this.svgShadowColor);R.setAttribute("flood-opacity",
-this.svgShadowOpacity);R.setAttribute("result","offsetColor");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");R.setAttribute("in","offsetColor");R.setAttribute("in2","offsetBlur");R.setAttribute("operator","in");R.setAttribute("result","offsetBlur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");R.setAttribute("in","SourceGraphic");R.setAttribute("in2",
-"offsetBlur");Q.appendChild(R);R=u.getElementsByTagName("defs");0==R.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=u.firstChild?u.insertBefore(N,u.firstChild):u.appendChild(N)):N=R[0];N.appendChild(Q);K||(D=null!=D?D:u.getElementsByTagName("g")[0],null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&T&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",
-parseInt(u.getAttribute("height"))+6),D=u.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,u.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=null!=D?D:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
-Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),D=0;do var K=this.model.getChildAt(this.model.root,D);while(D++<u&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
+0==T?ba():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=E&&E()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,E){var M=this.getLinkForCell(E);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(t,M));if(this.isHtmlLabel(E)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var O=T.getElementsByTagName("a"),Q=!1,S=0;S<O.length;S++)M=O[S].getAttribute("href"),null!=M&&"data:action/json,"==
+M.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(t,M)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(t,E){if("data:action/json,"==E.substring(0,17))try{var M=JSON.parse(E.substring(17));null!=M.actions&&(this.updateCustomLinkActions(t,M.actions),E="data:action/json,"+JSON.stringify(M))}catch(T){}return E};Graph.prototype.updateCustomLinkActions=function(t,E){for(var M=0;M<E.length;M++){var T=E[M],O;for(O in T)this.updateCustomLinkAction(t,
+T[O],"cells"),this.updateCustomLinkAction(t,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,E,M){if(null!=E&&null!=E[M]){for(var T=[],O=0;O<E[M].length;O++)if("*"==E[M][O])T.push(E[M][O]);else{var Q=t[E[M][O]];null!=Q?""!=Q&&T.push(Q):T.push(E[M][O])}E[M]=T}};Graph.prototype.getCellsForAction=function(t,E){E=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,E));if(null!=t.excludeCells){for(var M=[],T=0;T<E.length;T++)0>t.excludeCells.indexOf(E[T].id)&&M.push(E[T]);
+E=M}return E};Graph.prototype.getCellsById=function(t){var E=[];if(null!=t)for(var M=0;M<t.length;M++)if("*"==t[M]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var O=this.model.getCell(t[M]);null!=O&&E.push(O)}return E};var R=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return R.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||
+0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var E=0;E<t.length;E++)if(0>mxUtils.indexOf(this.hiddenTags,t[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,E,M,T){var O=[];if(null!=t){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},Y=0;Y<t.length;Y++)0<t[Y].length&&(S[t[Y]]=!0,Q++);for(Y=0;Y<E.length;Y++)if(M&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ba=
+this.getTagsForCell(E[Y]),ea=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=t.length)){for(var Z=ea=0;Z<ba.length&&ea<Q;Z++)null!=S[ba[Z]]&&ea++;ea=ea==Q}ea&&(1!=T||this.isCellVisible(E[Y]))&&O.push(E[Y])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var E=null,M=[],T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);M=[];if(0<O.length){O=O.split(" ");for(var Q={},
+S=0;S<O.length;S++)if(null==E||null!=E[O[S]])Q[O[S]]=!0,M.push(O[S]);E=Q}else return[]}return M};Graph.prototype.getTagsForCells=function(t){for(var E=[],M={},T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);if(0<O.length){O=O.split(" ");for(var Q=0;Q<O.length;Q++)null==M[O[Q]]&&(M[O[Q]]=!0,E.push(O[Q]))}}return E};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,E){if(0<t.length&&0<E.length){this.model.beginUpdate();
+try{for(var M=0;M<t.length;M++){for(var T=this.getTagsForCell(t[M]),O=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=mxUtils.trim(E[S]);""!=Y&&0>mxUtils.indexOf(O,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(t[M],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(t,E){if(0<t.length&&0<E.length){this.model.beginUpdate();try{for(var M=0;M<t.length;M++){var T=this.getTagsForCell(t[M]);if(0<T.length){for(var O=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=
+mxUtils.indexOf(O,E[S]);0<=Y&&(O.splice(Y,1),Q=!0)}Q&&this.setAttributeForCell(t[M],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!this.model.isVisible(t[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(t,E){this.model.beginUpdate();try{for(var M=0;M<t.length;M++)this.model.setVisible(t[M],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(t,E,M,T){for(var O=0;O<t.length;O++)this.highlightCell(t[O],E,M,T)};Graph.prototype.highlightCell=function(t,E,M,T,O){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;t=this.view.getState(t);var Q=null;null!=t&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,1)+O),Q=new mxCellHighlight(this,E,O,!1),null!=T&&(Q.opacity=T),Q.highlight(t),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),
+Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},M));return Q};Graph.prototype.addSvgShadow=function(t,E,M,T){M=null!=M?M:!1;T=null!=T?T:!0;var O=t.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id",this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",
+this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",
+this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2",
+"offsetBlur");Q.appendChild(S);S=t.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=t.firstChild?t.insertBefore(O,t.firstChild):t.appendChild(O)):O=S[0];O.appendChild(Q);M||(E=null!=E?E:t.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&T&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",
+parseInt(t.getAttribute("height"))+6),E=t.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,t.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(t,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
+Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),E=0;do var M=this.model.getChildAt(this.model.root,E);while(E++<t&&"1"==mxUtils.getValue(this.getCellStyle(M),"locked","0"));null!=M&&this.setDefaultParent(M)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",
STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=
[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[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"];
@@ -11665,41 +11666,41 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var D=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?D="mxgraph.er":"sysML"==u.substring(0,5)&&(D="mxgraph.sysml"));return D};var V=mxMarker.createMarker;mxMarker.createMarker=
-function(u,D,K,T,N,Q,R,Y,ba,ea){if(null!=K&&null==mxMarker.markers[K]){var Z=this.getPackageForType(K);null!=Z&&mxStencilRegistry.getStencil(Z)}return V.apply(this,arguments)};var M=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,D,K,T,N,Q){"1"==mxUtils.getValue(D.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return M.apply(this,arguments)};PrintDialog.prototype.create=function(u,D){function K(){aa.value=Math.max(1,
+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var E=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?E="mxgraph.er":"sysML"==t.substring(0,5)&&(E="mxgraph.sysml"));return E};var W=mxMarker.createMarker;mxMarker.createMarker=
+function(t,E,M,T,O,Q,S,Y,ba,ea){if(null!=M&&null==mxMarker.markers[M]){var Z=this.getPackageForType(M);null!=Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,E,M,T,O,Q){"1"==mxUtils.getValue(E.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(t,E){function M(){aa.value=Math.max(1,
Math.min(Y,Math.max(parseInt(aa.value),parseInt(fa.value))));fa.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),parseInt(fa.value))))}function T(ya){function wa(Ja,Oa,Pa){var Qa=Ja.useCssTransforms,Ya=Ja.currentTranslate,Ma=Ja.currentScale,Ta=Ja.view.translate,Ua=Ja.view.scale;Ja.useCssTransforms&&(Ja.useCssTransforms=!1,Ja.currentTranslate=new mxPoint(0,0),Ja.currentScale=1,Ja.view.translate=new mxPoint(0,0),Ja.view.scale=1);var Za=Ja.getGraphBounds(),Wa=0,bb=0,Va=oa.get(),ab=1/Ja.pageScale,
$a=qa.checked;if($a){ab=parseInt(ta.value);var hb=parseInt(ka.value);ab=Math.min(Va.height*hb/(Za.height/Ja.view.scale),Va.width*ab/(Za.width/Ja.view.scale))}else ab=parseInt(Da.value)/(100*Ja.pageScale),isNaN(ab)&&(ua=1/Ja.pageScale,Da.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*ua);Va.height=Math.ceil(Va.height*ua);ab*=ua;!$a&&Ja.pageVisible?(Za=Ja.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Oa){Oa=PrintDialog.createPrintPreview(Ja,ab,Va,
-0,Wa,bb,$a);Oa.pageSelector=!1;Oa.mathEnabled=!1;va.checked&&(Oa.isCellVisible=function(Xa){return Ja.isCellSelected(Xa)});Wa=u.getCurrentFile();null!=Wa&&(Oa.title=Wa.getTitle());var ib=Oa.writeHead;Oa.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
-Xa.writeln("}"),Xa.writeln("</style>"));null!=u.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(u.editor.fontCss),Xa.writeln("</style>"));for(var db=Ja.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+
-'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Oa.renderPage;Oa.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=N.shapeForegroundColor;$a=N.shapeBackgroundColor;Va=N.enableFlowAnimation;
-N.enableFlowAnimation=!1;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(Wa=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());Oa.open(null,null,Pa,!0);N.enableFlowAnimation=Va;null!=Wa&&(N.shapeForegroundColor=bb,N.shapeBackgroundColor=$a,N.stylesheet=Wa,N.refresh())}else{Va=Ja.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Oa.backgroundColor=Va;Oa.autoOrigin=$a;Oa.appendGraph(Ja,ab,Wa,bb,Pa,!0);Pa=
+0,Wa,bb,$a);Oa.pageSelector=!1;Oa.mathEnabled=!1;va.checked&&(Oa.isCellVisible=function(Xa){return Ja.isCellSelected(Xa)});Wa=t.getCurrentFile();null!=Wa&&(Oa.title=Wa.getTitle());var ib=Oa.writeHead;Oa.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
+Xa.writeln("}"),Xa.writeln("</style>"));null!=t.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(t.editor.fontCss),Xa.writeln("</style>"));for(var db=Ja.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+
+'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Oa.renderPage;Oa.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!t.editor.useForeignObjectForMath?!0:t.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=O.shapeForegroundColor;$a=O.shapeBackgroundColor;Va=O.enableFlowAnimation;
+O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Oa.open(null,null,Pa,!0);O.enableFlowAnimation=Va;null!=Wa&&(O.shapeForegroundColor=bb,O.shapeBackgroundColor=$a,O.stylesheet=Wa,O.refresh())}else{Va=Ja.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Oa.backgroundColor=Va;Oa.autoOrigin=$a;Oa.appendGraph(Ja,ab,Wa,bb,Pa,!0);Pa=
Ja.getCustomFonts();if(null!=Oa.wnd)for(Wa=0;Wa<Pa.length;Wa++)bb=Pa[Wa].name,$a=Pa[Wa].url,Graph.isCssFontUrl($a)?Oa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities($a)+'" charset="UTF-8" type="text/css">'):(Oa.wnd.document.writeln('<style type="text/css">'),Oa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(bb)+'";\nsrc: url("'+mxUtils.htmlEntities($a)+'");\n}'),Oa.wnd.document.writeln("</style>"))}Qa&&(Ja.useCssTransforms=Qa,Ja.currentTranslate=
-Ya,Ja.currentScale=Ma,Ja.view.translate=Ta,Ja.view.scale=Ua);return Oa}var ua=parseInt(sa.value)/100;isNaN(ua)&&(ua=1,sa.value="100 %");ua*=.75;var xa=null,ha=N.shapeForegroundColor,da=N.shapeBackgroundColor;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(xa=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());var ca=fa.value,la=aa.value,ia=!ea.checked,ma=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,ea.checked,
-ca,la,qa.checked,ta.value,ka.value,parseInt(Da.value)/100,parseInt(sa.value)/100,oa.get());else{ia&&(ia=va.checked||ca==ba&&la==ba);if(!ia&&null!=u.pages&&u.pages.length){var ra=0;ia=u.pages.length-1;ea.checked||(ra=parseInt(ca)-1,ia=parseInt(la)-1);for(var pa=ra;pa<=ia;pa++){var na=u.pages[pa];ca=na==u.currentPage?N:null;if(null==ca){ca=u.createTemporaryGraph(N.stylesheet);ca.shapeForegroundColor=N.shapeForegroundColor;ca.shapeBackgroundColor=N.shapeBackgroundColor;la=!0;ra=!1;var Ka=null,Ia=null;
-null==na.viewState&&null==na.root&&u.updatePageRoot(na);null!=na.viewState&&(la=na.viewState.pageVisible,ra=na.viewState.mathEnabled,Ka=na.viewState.background,Ia=na.viewState.backgroundImage,ca.extFonts=na.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=u.createImageForPageLink(Ia.originalSrc,na));ca.background=Ka;ca.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;ca.pageVisible=la;ca.mathEnabled=ra;var Ra=ca.getGraphBounds;ca.getGraphBounds=function(){var Ja=
-Ra.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Pa=this.view.translate,Qa=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Pa.x+Oa.x)*Qa,(Pa.y+Oa.y)*Qa,Oa.width*Qa,Oa.height*Qa))}return Ja};var Sa=ca.getGlobalVariable;ca.getGlobalVariable=function(Ja){return"page"==Ja?na.getName():"pagenumber"==Ja?pa+1:"pagecount"==Ja?null!=u.pages?u.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ca.container);u.updatePageRoot(na);
-ca.model.setRoot(na.root)}ma=wa(ca,ma,pa!=ia);ca!=N&&ca.container.parentNode.removeChild(ca.container)}}else ma=wa(N);null==ma?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(N.shapeForegroundColor=ha,N.shapeBackgroundColor=da,N.stylesheet=
-xa,N.refresh())}}var N=u.editor.graph,Q=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,D||mxResources.get("print"));Q.appendChild(R);var Y=1,ba=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ea=document.createElement("input");ea.style.cssText="margin-right:8px;margin-bottom:8px;";ea.setAttribute("value","all");ea.setAttribute("type",
-"radio");ea.setAttribute("name","pages-printdialog");R.appendChild(ea);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));R.appendChild(D);mxUtils.br(R);var Z=ea.cloneNode(!0);ea.setAttribute("checked","checked");Z.setAttribute("value","range");R.appendChild(Z);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");R.appendChild(D);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("type",
-"number");fa.setAttribute("min","1");fa.style.width="50px";R.appendChild(fa);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));R.appendChild(D);var aa=fa.cloneNode(!0);R.appendChild(aa);mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"change",K);mxEvent.addListener(aa,"change",K);if(null!=u.pages&&(Y=u.pages.length,null!=u.currentPage))for(D=0;D<u.pages.length;D++)if(u.currentPage==u.pages[D]){ba=
-D+1;fa.value=ba;aa.value=ba;break}fa.setAttribute("max",Y);aa.setAttribute("max",Y);u.isPagesEnabled()?1<Y&&(Q.appendChild(R),Z.checked=!0):Z.checked=!0;mxUtils.br(R);var va=document.createElement("input");va.setAttribute("value","all");va.setAttribute("type","radio");va.style.marginRight="8px";N.isSelectionEmpty()&&va.setAttribute("disabled","disabled");var ja=document.createElement("div");ja.style.marginBottom="10px";1==Y?(va.setAttribute("type","checkbox"),va.style.marginBottom="12px",ja.appendChild(va)):
-(va.setAttribute("name","pages-printdialog"),va.style.marginBottom="8px",R.appendChild(va));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));va.parentNode.appendChild(D);1==Y&&mxUtils.br(va.parentNode);var Ba=document.createElement("input");Ba.style.marginRight="8px";Ba.setAttribute("value","adjust");Ba.setAttribute("type","radio");Ba.setAttribute("name","printZoom");ja.appendChild(Ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));
-ja.appendChild(D);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width="50px";ja.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ba.checked=!0});Q.appendChild(ja);R=R.cloneNode(!1);var qa=Ba.cloneNode(!0);qa.setAttribute("value","fit");Ba.setAttribute("checked","checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(qa);R.appendChild(D);ja=
+Ya,Ja.currentScale=Ma,Ja.view.translate=Ta,Ja.view.scale=Ua);return Oa}var ua=parseInt(sa.value)/100;isNaN(ua)&&(ua=1,sa.value="100 %");ua*=.75;var xa=null,ha=O.shapeForegroundColor,da=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(xa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ca=fa.value,la=aa.value,ia=!ea.checked,ma=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,ea.checked,
+ca,la,qa.checked,ta.value,ka.value,parseInt(Da.value)/100,parseInt(sa.value)/100,oa.get());else{ia&&(ia=va.checked||ca==ba&&la==ba);if(!ia&&null!=t.pages&&t.pages.length){var ra=0;ia=t.pages.length-1;ea.checked||(ra=parseInt(ca)-1,ia=parseInt(la)-1);for(var pa=ra;pa<=ia;pa++){var na=t.pages[pa];ca=na==t.currentPage?O:null;if(null==ca){ca=t.createTemporaryGraph(O.stylesheet);ca.shapeForegroundColor=O.shapeForegroundColor;ca.shapeBackgroundColor=O.shapeBackgroundColor;la=!0;ra=!1;var Ka=null,Ia=null;
+null==na.viewState&&null==na.root&&t.updatePageRoot(na);null!=na.viewState&&(la=na.viewState.pageVisible,ra=na.viewState.mathEnabled,Ka=na.viewState.background,Ia=na.viewState.backgroundImage,ca.extFonts=na.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=t.createImageForPageLink(Ia.originalSrc,na));ca.background=Ka;ca.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;ca.pageVisible=la;ca.mathEnabled=ra;var Ra=ca.getGraphBounds;ca.getGraphBounds=function(){var Ja=
+Ra.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Pa=this.view.translate,Qa=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Pa.x+Oa.x)*Qa,(Pa.y+Oa.y)*Qa,Oa.width*Qa,Oa.height*Qa))}return Ja};var Sa=ca.getGlobalVariable;ca.getGlobalVariable=function(Ja){return"page"==Ja?na.getName():"pagenumber"==Ja?pa+1:"pagecount"==Ja?null!=t.pages?t.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ca.container);t.updatePageRoot(na);
+ca.model.setRoot(na.root)}ma=wa(ca,ma,pa!=ia);ca!=O&&ca.container.parentNode.removeChild(ca.container)}}else ma=wa(O);null==ma?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(O.shapeForegroundColor=ha,O.shapeBackgroundColor=da,O.stylesheet=
+xa,O.refresh())}}var O=t.editor.graph,Q=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,E||mxResources.get("print"));Q.appendChild(S);var Y=1,ba=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ea=document.createElement("input");ea.style.cssText="margin-right:8px;margin-bottom:8px;";ea.setAttribute("value","all");ea.setAttribute("type",
+"radio");ea.setAttribute("name","pages-printdialog");S.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));S.appendChild(E);mxUtils.br(S);var Z=ea.cloneNode(!0);ea.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");S.appendChild(E);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("type",
+"number");fa.setAttribute("min","1");fa.style.width="50px";S.appendChild(fa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));S.appendChild(E);var aa=fa.cloneNode(!0);S.appendChild(aa);mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"change",M);mxEvent.addListener(aa,"change",M);if(null!=t.pages&&(Y=t.pages.length,null!=t.currentPage))for(E=0;E<t.pages.length;E++)if(t.currentPage==t.pages[E]){ba=
+E+1;fa.value=ba;aa.value=ba;break}fa.setAttribute("max",Y);aa.setAttribute("max",Y);t.isPagesEnabled()?1<Y&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var va=document.createElement("input");va.setAttribute("value","all");va.setAttribute("type","radio");va.style.marginRight="8px";O.isSelectionEmpty()&&va.setAttribute("disabled","disabled");var ja=document.createElement("div");ja.style.marginBottom="10px";1==Y?(va.setAttribute("type","checkbox"),va.style.marginBottom="12px",ja.appendChild(va)):
+(va.setAttribute("name","pages-printdialog"),va.style.marginBottom="8px",S.appendChild(va));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));va.parentNode.appendChild(E);1==Y&&mxUtils.br(va.parentNode);var Ba=document.createElement("input");Ba.style.marginRight="8px";Ba.setAttribute("value","adjust");Ba.setAttribute("type","radio");Ba.setAttribute("name","printZoom");ja.appendChild(Ba);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));
+ja.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width="50px";ja.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ba.checked=!0});Q.appendChild(ja);S=S.cloneNode(!1);var qa=Ba.cloneNode(!0);qa.setAttribute("value","fit");Ba.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(qa);S.appendChild(E);ja=
document.createElement("table");ja.style.display="inline-block";var Ca=document.createElement("tbody"),Aa=document.createElement("tr"),Ha=Aa.cloneNode(!0),Na=document.createElement("td"),Ga=Na.cloneNode(!0),Fa=Na.cloneNode(!0),Ea=Na.cloneNode(!0),La=Na.cloneNode(!0),za=Na.cloneNode(!0);Na.style.textAlign="right";Ea.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","1");ta.setAttribute("min",
-"1");ta.setAttribute("type","number");ta.style.width="40px";Ga.appendChild(ta);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));Fa.appendChild(D);mxUtils.write(Ea,mxResources.get("fitToBy"));var ka=ta.cloneNode(!0);La.appendChild(ka);mxEvent.addListener(ta,"focus",function(){qa.checked=!0});mxEvent.addListener(ka,"focus",function(){qa.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));za.appendChild(D);Aa.appendChild(Na);
-Aa.appendChild(Ga);Aa.appendChild(Fa);Ha.appendChild(Ea);Ha.appendChild(La);Ha.appendChild(za);Ca.appendChild(Aa);Ca.appendChild(Ha);ja.appendChild(Ca);R.appendChild(ja);Q.appendChild(R);R=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));R.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var oa=PageSetupDialog.addPageFormatPanel(D,"printdialog",u.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);R.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));R.appendChild(D);var sa=document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";R.appendChild(sa);Q.appendChild(R);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";R=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});R.className="geBtn";u.editor.cancelFirst&&
-D.appendChild(R);u.isOffline()||(ja=mxUtils.button(mxResources.get("help"),function(){N.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ja.className="geBtn",D.appendChild(ja));PrintDialog.previewEnabled&&(ja=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();T(!1)}),ja.className="geBtn",D.appendChild(ja));ja=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();T(!0)});ja.className="geBtn gePrimaryBtn";D.appendChild(ja);u.editor.cancelFirst||
-D.appendChild(R);Q.appendChild(D);this.container=Q};var W=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=
-this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else 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)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var u=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(D){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
+"1");ta.setAttribute("type","number");ta.style.width="40px";Ga.appendChild(ta);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));Fa.appendChild(E);mxUtils.write(Ea,mxResources.get("fitToBy"));var ka=ta.cloneNode(!0);La.appendChild(ka);mxEvent.addListener(ta,"focus",function(){qa.checked=!0});mxEvent.addListener(ka,"focus",function(){qa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));za.appendChild(E);Aa.appendChild(Na);
+Aa.appendChild(Ga);Aa.appendChild(Fa);Ha.appendChild(Ea);Ha.appendChild(La);Ha.appendChild(za);Ca.appendChild(Aa);Ca.appendChild(Ha);ja.appendChild(Ca);S.appendChild(ja);Q.appendChild(S);S=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));S.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var oa=PageSetupDialog.addPageFormatPanel(E,"printdialog",t.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));S.appendChild(E);var sa=document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";S.appendChild(sa);Q.appendChild(S);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});S.className="geBtn";t.editor.cancelFirst&&
+E.appendChild(S);t.isOffline()||(ja=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ja.className="geBtn",E.appendChild(ja));PrintDialog.previewEnabled&&(ja=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();T(!1)}),ja.className="geBtn",E.appendChild(ja));ja=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();T(!0)});ja.className="geBtn gePrimaryBtn";E.appendChild(ja);t.editor.cancelFirst||
+E.appendChild(S);Q.appendChild(E);this.container=Q};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}null!=this.format&&(this.page.viewState.pageFormat=
+this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
+!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var t=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(E){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,l,p,q,x){q=null!=q?q:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==g||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var y=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(d);(new Image).src=y+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=l?":colno:"+
-encodeURIComponent(l):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(A){}try{x||null==window.console||console.error(q,d,g,k,l,p)}catch(A){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=
+encodeURIComponent(l):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(z){}try{x||null==window.console||console.error(q,d,g,k,l,p)}catch(z){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=
function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,
d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
@@ -11708,9 +11709,9 @@ g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=p&&6<p.leng
EditorUi.prototype.jpgSupported=null!==l.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,g,k){var l=null==d||null==g;k=null!=k?k:24;var p=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=p.spin;p.spin=function(y,A){var B=!1;this.active||(q.call(this,y),this.active=!0,null!=A&&(l&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),B=document.createElement("div"),
-B.style.position="absolute",B.style.whiteSpace="nowrap",B.style.background="#4B4243",B.style.color="white",B.style.fontFamily=Editor.defaultHtmlFont,B.style.fontSize="9pt",B.style.padding="6px",B.style.paddingLeft="10px",B.style.paddingRight="10px",B.style.zIndex=2E9,B.style.left=Math.max(0,d)+"px",B.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),B.innerHTML=A,y.appendChild(B),p.status=B),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(y,A)}));this.stop();return I}),B=!0);return B};var x=p.stop;p.stop=function(){x.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(d,g,k){var l=null==d||null==g;k=null!=k?k:24;var p=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=p.spin;p.spin=function(y,z){var A=!1;this.active||(q.call(this,y),this.active=!0,null!=z&&(l&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),A=document.createElement("div"),
+A.style.position="absolute",A.style.whiteSpace="nowrap",A.style.background="#4B4243",A.style.color="white",A.style.fontFamily=Editor.defaultHtmlFont,A.style.fontSize="9pt",A.style.padding="6px",A.style.paddingLeft="10px",A.style.paddingRight="10px",A.style.zIndex=2E9,A.style.left=Math.max(0,d)+"px",A.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(A.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(A.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(A.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),A.innerHTML=z,y.appendChild(A),p.status=A),this.pause=mxUtils.bind(this,function(){var K=function(){};this.active&&(K=mxUtils.bind(this,function(){this.spin(y,z)}));this.stop();return K}),A=!0);return A};var x=p.stop;p.stop=function(){x.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
return p};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,l=this.editor.graph,p=this;g.getFunction=function(q){if(l.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var x=p.getSelectedPageIndex();if(mxEvent.isShiftDown(q)){if(37==q.keyCode)return function(){0<x&&p.movePage(x,x-1)};if(38==q.keyCode)return function(){0<x&&p.movePage(x,0)};if(39==q.keyCode)return function(){x<p.pages.length-1&&p.movePage(x,
@@ -11719,11 +11720,11 @@ var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
q?mxUtils.getXml(q):""}}catch(x){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var g=null!=d?this.editor.extractGraphModel(d,!0):null;null!=g&&(d=g);if(null!=d){g=this.editor.graph;
g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,l=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var p=l.length-1;0<=p;p--){var q=this.updatePageRoot(new DiagramPage(l[p]));null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[p+1]));g.model.execute(new ChangePage(this,q,0==p?q:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=k)for(p=0;p<k.length;p++)g.model.execute(new ChangePage(this,k[p],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,g,k,l,p,q,x,y,A,B,I){g=null!=g?g:this.editor.graph;p=null!=p?p:!1;A=null!=A?A:!0;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var t="_blank";else O=t=l;if(null==d)return"";var z=d;if("mxfile"!=z.nodeName.toLowerCase()){if(I){var L=d.ownerDocument.createElement("diagram");L.setAttribute("id",Editor.guid());L.appendChild(d)}else{L=Graph.zapGremlins(mxUtils.getXml(d));z=Graph.compress(L);if(Graph.decompress(z)!=L)return L;L=d.ownerDocument.createElement("diagram");
-L.setAttribute("id",Editor.guid());mxUtils.setTextContent(L,z)}z=d.ownerDocument.createElement("mxfile");z.appendChild(L)}B?(z=z.cloneNode(!0),z.removeAttribute("modified"),z.removeAttribute("host"),z.removeAttribute("agent"),z.removeAttribute("etag"),z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("type")):(z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("pages"),z.removeAttribute("type"),
-mxClient.IS_CHROMEAPP?z.setAttribute("host","Chrome"):EditorUi.isElectronApp?z.setAttribute("host","Electron"):z.setAttribute("host",window.location.hostname),z.setAttribute("modified",(new Date).toISOString()),z.setAttribute("agent",navigator.appVersion),z.setAttribute("version",EditorUi.VERSION),z.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,null!=d&&z.setAttribute("type",d),1<z.getElementsByTagName("diagram").length&&null!=this.pages&&z.setAttribute("pages",this.pages.length));
-I=I?mxUtils.getPrettyXml(z):mxUtils.getXml(z);if(!q&&!p&&(x||null!=k&&/(\.html)$/i.test(k.getTitle())))I=this.getHtml2(mxUtils.getXml(z),g,null!=k?k.getTitle():null,t,O);else if(q||!p&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(l=null),I=this.getEmbeddedSvg(I,g,l,null,y,A,O);return I};EditorUi.prototype.getXmlFileData=function(d,g,k,l){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var p=this.editor.getGraphXml(d,l);
-if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(A){var B=A.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(A)),A=A.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&A.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?A=A.cloneNode(!0):(A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(B)));p.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+function(d,g,k,l,p,q,x,y,z,A,K){g=null!=g?g:this.editor.graph;p=null!=p?p:!1;z=null!=z?z:!0;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var L="_blank";else P=L=l;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(K){var D=d.ownerDocument.createElement("diagram");D.setAttribute("id",Editor.guid());D.appendChild(d)}else{D=Graph.zapGremlins(mxUtils.getXml(d));u=Graph.compress(D);if(Graph.decompress(u)!=D)return D;D=d.ownerDocument.createElement("diagram");
+D.setAttribute("id",Editor.guid());mxUtils.setTextContent(D,u)}u=d.ownerDocument.createElement("mxfile");u.appendChild(D)}A?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),
+mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("modified",(new Date).toISOString()),u.setAttribute("agent",navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),u.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,null!=d&&u.setAttribute("type",d),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));
+K=K?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!q&&!p&&(x||null!=k&&/(\.html)$/i.test(k.getTitle())))K=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,L,P);else if(q||!p&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(l=null),K=this.getEmbeddedSvg(K,g,l,null,y,z,P);return K};EditorUi.prototype.getXmlFileData=function(d,g,k,l){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var p=this.editor.getGraphXml(d,l);
+if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(z){var A=z.getElementsByTagName("mxGraphModel");A=0<A.length?A[0]:null;null==A&&k?(A=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<A.length&&(A=Graph.decompress(A),null!=A&&0<A.length&&z.appendChild(mxUtils.parseXml(A).documentElement))):null==A||k?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(A)));p.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(p)),p=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var q=this.pages[g],x=q.node;if(q!=this.currentPage)if(q.needsUpdate){var y=new mxCodec(mxUtils.createXmlDocument());y=y.encode(new mxGraphModel(q.root));this.editor.graph.saveViewState(q.viewState,y,null,l);EditorUi.removeChildNodes(x);mxUtils.setTextContent(x,Graph.compressNode(y));delete q.needsUpdate}else l&&(this.updatePageRoot(q),null!=q.viewState.backgroundImage&&(null!=q.viewState.backgroundImage.originalSrc?
q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.originalSrc,q):Graph.isPageLink(q.viewState.backgroundImage.src)&&(q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.src,q))),null!=q.viewState.backgroundImage&&null!=q.viewState.backgroundImage.originalSrc&&(y=new mxCodec(mxUtils.createXmlDocument()),y=y.encode(new mxGraphModel(q.root)),this.editor.graph.saveViewState(q.viewState,y,null,l),x=x.cloneNode(!1),mxUtils.setTextContent(x,
Graph.compressNode(y))));d(x)}return p};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],l=0;l<d.length;l++){var p=d.charAt(l);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?k.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(p)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=
@@ -11732,10 +11733,10 @@ function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSER
delete d[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");
for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],
g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,
-function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,l,p,q,x,y,A,B,I){p=null!=p?p:!0;q=null!=q?q:!1;var O=this.editor.graph;if(g||!d&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var t=null!=O.themes&&"darkTheme"==O.defaultThemeName;B=!1;if(t||null!=this.pages&&this.currentPage!=this.pages[0]){var z=O.getGlobalVariable;O=this.createTemporaryGraph(t?O.getDefaultStylesheet():O.getStylesheet());
-O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var L=this.pages[0];this.currentPage==L?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&O.setBackgroundImage(L.viewState.backgroundImage);O.getGlobalVariable=function(C){return"page"==C?L.getName():"pagenumber"==C?1:z.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(L.root)}}x=null!=x?x:this.getXmlFileData(p,q,B,I);A=null!=A?
-A:this.getCurrentFile();d=this.createFileData(x,O,A,window.location.href,d,g,k,l,p,y,B);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return d};EditorUi.prototype.getHtml=function(d,g,k,l,p,q){q=null!=q?q:!0;var x=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){x=q?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var A=g.view.scale;q=Math.floor(x.x/A-g.view.translate.x);A=Math.floor(x.y/A-g.view.translate.y);x=g.background;null==p&&(g=this.getBasenames().join(";"),
-0<g.length&&(y=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",q);d.setAttribute("y0",A)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=l&&d.setAttribute("edit",l));null!=p&&(p=p.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,l,p,q,x,y,z,A,K){p=null!=p?p:!0;q=null!=q?q:!1;var P=this.editor.graph;if(g||!d&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var L=null!=P.themes&&"darkTheme"==P.defaultThemeName;A=!1;if(L||null!=this.pages&&this.currentPage!=this.pages[0]){var u=P.getGlobalVariable;P=this.createTemporaryGraph(L?P.getDefaultStylesheet():P.getStylesheet());
+P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var D=this.pages[0];this.currentPage==D?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&P.setBackgroundImage(D.viewState.backgroundImage);P.getGlobalVariable=function(B){return"page"==B?D.getName():"pagenumber"==B?1:u.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(D.root)}}x=null!=x?x:this.getXmlFileData(p,q,A,K);z=null!=z?
+z:this.getCurrentFile();d=this.createFileData(x,P,z,window.location.href,d,g,k,l,p,y,A);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,k,l,p,q){q=null!=q?q:!0;var x=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){x=q?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var z=g.view.scale;q=Math.floor(x.x/z-g.view.translate.x);z=Math.floor(x.y/z-g.view.translate.y);x=g.background;null==p&&(g=this.getBasenames().join(";"),
+0<g.length&&(y=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",q);d.setAttribute("y0",z)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=l&&d.setAttribute("edit",l));null!=p&&(p=p.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=x&&x!=mxConstants.NONE?' style="background-color:'+x+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+l+"</div>\n</div>\n"+
(null==p?'<script type="text/javascript" src="'+y+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,l,p){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+
@@ -11743,20 +11744,20 @@ p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph"
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),
"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var l=0;l<d.length;l++)null==d[l].getAttribute("id")&&d[l].setAttribute("id",l),g=new DiagramPage(d[l]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[l+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(k=g);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var p=urlParams["layer-ids"].split(" ");g={};for(l=0;l<p.length;l++)g[p[l]]=!0;var q=this.editor.graph.getModel(),
-x=q.getChildren(q.root);for(l=0;l<x.length;l++){var y=x[l];q.setVisible(y,g[y.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,l,p,q,x,y,A,B,I,O){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename("remoteSvg"==d?!1:!p),z=t+("xml"==d||"pdf"==d&&I?".drawio":"")+"."+d;if("xml"==d){var L=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,g);this.saveData(z,d,L,"text/xml")}else if("html"==d)L=this.getHtml2(this.getFileData(!0),this.editor.graph,
-t),this.saveData(z,d,L,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)z=t+".png";else if("jpeg"==d)z=t+".jpg";else if("remoteSvg"==d){z=t+".svg";d="svg";var C=parseInt(A);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<C){var E=this.editor.graph,G=E.getGraphBounds();var P=Math.ceil(G.width*y/E.view.scale+2*C);var J=Math.ceil(G.height*y/E.view.scale+2*C)}}this.saveRequest(z,d,mxUtils.bind(this,function(M,W){try{var U=
-this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var X=this.createDownloadRequest(M,d,l,W,x,p,y,A,B,I,O,P,J);this.editor.graph.pageVisible=U;return X}catch(u){this.handleError(u)}}))}else{var F=null,H=mxUtils.bind(this,function(M){M.length<=MAX_REQUEST_SIZE?this.saveData(z,"svg",M,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==d){var S=this.editor.graph.background;
-if(x||S==mxConstants.NONE)S=null;var V=this.editor.graph.getSvg(S,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(M){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(M))})))}else z=t+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(M){this.spinner.stop();H(M)}),l)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,A,
-B,I,O,t){var z=this.editor.graph,L=z.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==q?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var C="",E="";if(L.width*L.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==g&&(null!=I?E="&from="+I.from+"&to="+I.to:0==q&&(E="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){C=
-"&from="+q;break}q=z.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:z.getExportVariables()};A&&(p.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+C+E+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
-"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);q.getHash=function(){return l};this.fileLoaded(q);"csv"==d.format&&this.importCsv(x,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y=null!=d.interval?parseInt(d.interval):6E4,A=null,B=mxUtils.bind(this,function(){var O=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(t){O===this.currentPage&&(200<=
-t.getStatus()&&300>=t.getStatus()?(this.updateDiagram(t.getText()),I()):this.handleError({message:mxResources.get("error")+" "+t.getStatus()}))}),mxUtils.bind(this,function(t){this.handleError(t)}))}),I=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(B,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){I();B()}));I();B()}null!=g&&g()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(q){p(q)}),mxUtils.bind(this,function(q){null!=
-k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(J){var F=new mxCellOverlay(J.image||p.warningImage,J.tooltip,J.align,J.valign,J.offset);F.addListener(mxEvent.CLICK,function(H,S){l.alert(J.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
-if(null!=y){try{var A=d.getAttribute("value");if(null!=A){var B=mxUtils.parseXml(A).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))q.setValue(y,B);else for(var I=B.attributes,O=0;O<I.length;O++)p.setAttributeForCell(y,I[O].nodeName,0<I[O].nodeValue.length?I[O].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+y.id+": "+J)}try{var t=d.getAttribute("style");null!=t&&p.model.setStyle(y,t)}catch(J){null!=window.console&&console.log("Error in style for "+
-y.id+": "+J)}try{var z=d.getAttribute("icon");if(null!=z){var L=0<z.length?JSON.parse(z):null;null!=L&&L.append||p.removeCellOverlays(y);null!=L&&p.addCellOverlay(y,g(L))}}catch(J){null!=window.console&&console.log("Error in icon for "+y.id+": "+J)}try{var C=d.getAttribute("geometry");if(null!=C){C=JSON.parse(C);var E=p.getCellGeometry(y);if(null!=E){E=E.clone();for(key in C){var G=parseFloat(C[key]);"dx"==key?E.x+=G:"dy"==key?E.y+=G:"dw"==key?E.width+=G:"dh"==key?E.height+=G:E[key]=parseFloat(C[key])}p.model.setGeometry(y,
-E)}}}catch(J){null!=window.console&&console.log("Error in icon for "+y.id+": "+J)}}}else if("model"==d.nodeName){for(var P=d.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(new mxCodec(d.firstChild)).decode(P,q)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(p.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==
+x=q.getChildren(q.root);for(l=0;l<x.length;l++){var y=x[l];q.setVisible(y,g[y.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
+0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,l,p,q,x,y,z,A,K,P){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var L=this.getBaseFilename("remoteSvg"==d?!1:!p),u=L+("xml"==d||"pdf"==d&&K?".drawio":"")+"."+d;if("xml"==d){var D=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,g);this.saveData(u,d,D,"text/xml")}else if("html"==d)D=this.getHtml2(this.getFileData(!0),this.editor.graph,
+L),this.saveData(u,d,D,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=L+".png";else if("jpeg"==d)u=L+".jpg";else if("remoteSvg"==d){u=L+".svg";d="svg";var B=parseInt(z);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<B){var C=this.editor.graph,G=C.getGraphBounds();var N=Math.ceil(G.width*y/C.view.scale+2*B);var I=Math.ceil(G.height*y/C.view.scale+2*B)}}this.saveRequest(u,d,mxUtils.bind(this,function(J,V){try{var U=
+this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var X=this.createDownloadRequest(J,d,l,V,x,p,y,z,A,K,P,N,I);this.editor.graph.pageVisible=U;return X}catch(t){this.handleError(t)}}))}else{var F=null,H=mxUtils.bind(this,function(J){J.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==d){var R=this.editor.graph.background;
+if(x||R==mxConstants.NONE)R=null;var W=this.editor.graph.getSvg(R,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(W);this.editor.convertImages(W,mxUtils.bind(this,mxUtils.bind(this,function(J){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(J))})))}else u=L+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}),l)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,z,
+A,K,P,L){var u=this.editor.graph,D=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==q?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var B="",C="";if(D.width*D.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==g&&(null!=K?C="&from="+K.from+"&to="+K.to:0==q&&(C="&allPages=1"));"xmlpng"==g&&(A="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){B=
+"&from="+q;break}q=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:u.getExportVariables()};z&&(p.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+B+C+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+A+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(P&&isFinite(P)?"&w="+P:"")+(L&&isFinite(L)?"&h="+L:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);q.getHash=function(){return l};this.fileLoaded(q);"csv"==d.format&&this.importCsv(x,mxUtils.bind(this,function(P){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y=null!=d.interval?parseInt(d.interval):6E4,z=null,A=mxUtils.bind(this,function(){var P=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(L){P===this.currentPage&&(200<=
+L.getStatus()&&300>=L.getStatus()?(this.updateDiagram(L.getText()),K()):this.handleError({message:mxResources.get("error")+" "+L.getStatus()}))}),mxUtils.bind(this,function(L){this.handleError(L)}))}),K=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(A,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){K();A()}));K();A()}null!=g&&g()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(q){p(q)}),mxUtils.bind(this,function(q){null!=
+k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(I){var F=new mxCellOverlay(I.image||p.warningImage,I.tooltip,I.align,I.valign,I.offset);F.addListener(mxEvent.CLICK,function(H,R){l.alert(I.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
+if(null!=y){try{var z=d.getAttribute("value");if(null!=z){var A=mxUtils.parseXml(z).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))q.setValue(y,A);else for(var K=A.attributes,P=0;P<K.length;P++)p.setAttributeForCell(y,K[P].nodeName,0<K[P].nodeValue.length?K[P].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+y.id+": "+I)}try{var L=d.getAttribute("style");null!=L&&p.model.setStyle(y,L)}catch(I){null!=window.console&&console.log("Error in style for "+
+y.id+": "+I)}try{var u=d.getAttribute("icon");if(null!=u){var D=0<u.length?JSON.parse(u):null;null!=D&&D.append||p.removeCellOverlays(y);null!=D&&p.addCellOverlay(y,g(D))}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}try{var B=d.getAttribute("geometry");if(null!=B){B=JSON.parse(B);var C=p.getCellGeometry(y);if(null!=C){C=C.clone();for(key in B){var G=parseFloat(B[key]);"dx"==key?C.x+=G:"dy"==key?C.y+=G:"dw"==key?C.width+=G:"dh"==key?C.height+=G:C[key]=parseFloat(B[key])}p.model.setGeometry(y,
+C)}}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}}}else if("model"==d.nodeName){for(var N=d.firstChild;null!=N&&N.nodeType!=mxConstants.NODETYPE_ELEMENT;)N=N.nextSibling;null!=N&&(new mxCodec(d.firstChild)).decode(N,q)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(p.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==
d.nodeName&&(x=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{q.endUpdate()}null!=x&&this.chromelessResize&&this.chromelessResize(!0,x)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var l=k.lastIndexOf(".");0<=l&&(d=k.substring(l),k=k.substring(0,l));if(g){g=k;var p=new Date;k=p.getFullYear();l=p.getMonth()+1;var q=p.getDate(),x=p.getHours(),y=p.getMinutes();p=p.getSeconds();
k=g+(" "+(k+"-"+l+"-"+q+"-"+x+"-"+y+"-"+p))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var l=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var p=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
@@ -11765,29 +11766,29 @@ this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxReso
"1"==urlParams.sketch?"sketch":uiTheme;if(null==q)q="default";else if("sketch"==q||"min"==q)q+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+q})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=
d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(null!=d)try{d.close()}catch(y){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(y){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||p():p()});g?d():this.handleError(x,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else p();return l};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,l=new mxGraphModel,p=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var q=0;q<d.length;q++){this.updatePageRoot(d[q]);var x=d[q].node.cloneNode(!1);x.removeAttribute("name");l.root=d[q].root;
-var y=p.encode(l);this.editor.graph.saveViewState(d[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");x.appendChild(y);null!=g&&(g.eltCount+=x.getElementsByTagName("*").length,g.nodeCount+=x.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(x,function(A,B,I,O){return!O||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?O&&"mxCell"==A.nodeName&&"previous"==B?null:I:Math.round(I)},g)<<0}return k};EditorUi.prototype.hashValue=
+var y=p.encode(l);this.editor.graph.saveViewState(d[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");x.appendChild(y);null!=g&&(g.eltCount+=x.getElementsByTagName("*").length,g.nodeCount+=x.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(x,function(z,A,K,P){return!P||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?P&&"mxCell"==z.nodeName&&"previous"==A?null:K:Math.round(K)},g)<<0}return k};EditorUi.prototype.hashValue=
function(d,g,k){var l=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(l^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var p=0;p<d.attributes.length;p++){var q=d.attributes[p].name,x=null!=g?g(d,q,d.attributes[p].value,!0):d.attributes[p].value;null!=x&&(l^=this.hashValue(q,g,k)+this.hashValue(x,g,k))}}if(null!=d.childNodes)for(p=0;p<d.childNodes.length;p++)l=
(l<<5)-l+this.hashValue(d.childNodes[p],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(p=0;p<d.length;p++)g=(g<<5)-g+d.charCodeAt(p)<<0;l^=g}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,l,p,q,x){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),
d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var g=this.sidebar.container;if(null==d){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(d=k[k.length-
1].nextSibling)}d=null!=d?d:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var l=k.previousSibling;g.insertBefore(k,d);g.insertBefore(l,k)};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,l,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};
-EditorUi.prototype.libraryLoaded=function(d,g,k,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var p=this.sidebar.palettes[d.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var q=null,x=mxUtils.bind(this,function(P,J){0==P.length&&d.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),
-J.appendChild(q)):this.addLibraryEntries(P,J)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var y=this.sidebar.addPalette(d.getHash(),k,null!=l?l:!0,mxUtils.bind(this,function(P){x(g,P)}));this.repositionLibrary(p);var A=y.parentNode.previousSibling;l=A.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&A.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var B=document.createElement("div");
-B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";A.style.position="relative";var I=document.createElement("img");I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";Editor.isDarkMode()&&(I.style.filter="invert(100%)");
-var O=null;if(".scratchpad"!=d.title||this.closableScratchpad)B.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(P){if(!mxEvent.isConsumed(P)){var J=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=O?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J();mxEvent.consume(P)}}));if(d.isEditable()){var t=this.editor.graph,z=null,L=mxUtils.bind(this,function(P){this.showLibraryDialog(d.getTitle(),y,g,d,d.getMode());
-mxEvent.consume(P)}),C=mxUtils.bind(this,function(P){d.setModified(!0);d.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=I.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",B.insertBefore(z,B.firstChild),A.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),
-A.style.paddingRight=18*B.childNodes.length+"px")})):null==O&&(O=I.cloneNode(!1),O.setAttribute("src",Editor.saveImage),O.setAttribute("title",mxResources.get("save")),B.insertBefore(O,B.firstChild),mxEvent.addListener(O,"click",mxUtils.bind(this,function(J){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==O||d.isModified()||(A.style.paddingRight=18*B.childNodes.length+"px",O.parentNode.removeChild(O),O=null)});mxEvent.consume(J)})),A.style.paddingRight=
-18*B.childNodes.length+"px")}),E=mxUtils.bind(this,function(P,J,F,H){P=t.cloneCells(mxUtils.sortCells(t.model.getTopmostCells(P)));for(var S=0;S<P.length;S++){var V=t.getCellGeometry(P[S]);null!=V&&V.translate(-J.x,-J.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(P,J.width,J.height,H||"",!0,null,!1));P={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(P))),w:J.width,h:J.height};null!=H&&(P.title=H);g.push(P);C(F);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
-q=null)}),G=mxUtils.bind(this,function(P){if(t.isSelectionEmpty())t.getRubberband().isActive()?(t.getRubberband().execute(P),t.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var J=t.getSelectionCells(),F=t.view.getBounds(J),H=t.view.scale;F.x/=H;F.y/=H;F.width/=H;F.height/=H;F.x-=t.view.translate.x;F.y-=t.view.translate.y;E(J,F)}mxEvent.consume(P)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(P){t.isMouseDown&&
-null!=t.panningManager&&null!=t.graphHandler.first&&(t.graphHandler.suspend(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",t.panningManager.stop(),t.autoScroll=!1,mxEvent.consume(P))}),mxUtils.bind(this,function(P){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,t.panningManager.stop(),t.graphHandler.reset(),t.isMouseDown=
-!1,t.autoScroll=!0,G(P),mxEvent.consume(P))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(P){t.isMouseDown&&null!=t.graphHandler.first&&(t.graphHandler.resume(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",t.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(P){y.style.backgroundColor="#f1f3f4";P.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
-P.stopPropagation();P.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(P){y.style.cursor="";y.style.backgroundColor="";0<P.dataTransfer.files.length&&this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,F,H,S,V,M,W,U,X){if(null!=J&&"image/"==F.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(J),J=[new mxCell("",new mxGeometry(0,0,V,M),J)],J[0].vertex=!0,
-E(J,new mxRectangle(0,0,V,M),P,mxEvent.isAltDown(P)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var u=!1,D=mxUtils.bind(this,function(K,T){null!=K&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(K),null!=T&&0<T.length&&(K=T));if(null!=K)if(K=mxUtils.parseXml(K),"mxlibrary"==K.documentElement.nodeName)try{var N=JSON.parse(mxUtils.getTextContent(K.documentElement));x(N,y);g=g.concat(N);C(P);this.spinner.stop();
-u=!0}catch(ba){}else if("mxfile"==K.documentElement.nodeName)try{var Q=K.documentElement.getElementsByTagName("diagram");for(N=0;N<Q.length;N++){var R=this.stringToCells(Editor.getDiagramNodeXml(Q[N])),Y=this.editor.graph.getBoundingBoxFromGeometry(R);E(R,new mxRectangle(0,0,Y.width,Y.height),P)}u=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
-(q.parentNode.removeChild(q),q=null)});null!=X&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(X,function(K){D(K,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,W)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?D(K.responseText,"text/xml"):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):D(J,F)}}));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(y,"dragleave",function(P){y.style.cursor="";y.style.backgroundColor="";P.stopPropagation();P.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));B.insertBefore(I,B.firstChild);mxEvent.addListener(I,"click",L);mxEvent.addListener(y,
-"dblclick",function(P){mxEvent.getSource(P)==y&&L(P)});l=I.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));B.insertBefore(l,B.firstChild);mxEvent.addListener(l,"click",G);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,
-mxUtils.bind(this,function(P){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(P)})),B.insertBefore(l,B.firstChild))}A.appendChild(B);A.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var l=d[k],p=l.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(q+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(q+
+EditorUi.prototype.libraryLoaded=function(d,g,k,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var p=this.sidebar.palettes[d.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var q=null,x=mxUtils.bind(this,function(N,I){0==N.length&&d.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),
+I.appendChild(q)):this.addLibraryEntries(N,I)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var y=this.sidebar.addPalette(d.getHash(),k,null!=l?l:!0,mxUtils.bind(this,function(N){x(g,N)}));this.repositionLibrary(p);var z=y.parentNode.previousSibling;l=z.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&z.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var A=document.createElement("div");
+A.style.position="absolute";A.style.right="0px";A.style.top="0px";A.style.padding="8px";A.style.backgroundColor="inherit";z.style.position="relative";var K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("close"));K.setAttribute("valign","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.top="2px";K.style.width="14px";K.style.cursor="pointer";K.style.margin="0 3px";Editor.isDarkMode()&&(K.style.filter="invert(100%)");
+var P=null;if(".scratchpad"!=d.title||this.closableScratchpad)A.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(N){if(!mxEvent.isConsumed(N)){var I=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=P?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I();mxEvent.consume(N)}}));if(d.isEditable()){var L=this.editor.graph,u=null,D=mxUtils.bind(this,function(N){this.showLibraryDialog(d.getTitle(),y,g,d,d.getMode());
+mxEvent.consume(N)}),B=mxUtils.bind(this,function(N){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=K.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",A.insertBefore(u,A.firstChild),z.style.paddingRight=18*A.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),
+z.style.paddingRight=18*A.childNodes.length+"px")})):null==P&&(P=K.cloneNode(!1),P.setAttribute("src",Editor.saveImage),P.setAttribute("title",mxResources.get("save")),A.insertBefore(P,A.firstChild),mxEvent.addListener(P,"click",mxUtils.bind(this,function(I){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==P||d.isModified()||(z.style.paddingRight=18*A.childNodes.length+"px",P.parentNode.removeChild(P),P=null)});mxEvent.consume(I)})),z.style.paddingRight=
+18*A.childNodes.length+"px")}),C=mxUtils.bind(this,function(N,I,F,H){N=L.cloneCells(mxUtils.sortCells(L.model.getTopmostCells(N)));for(var R=0;R<N.length;R++){var W=L.getCellGeometry(N[R]);null!=W&&W.translate(-I.x,-I.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(N,I.width,I.height,H||"",!0,null,!1));N={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(N))),w:I.width,h:I.height};null!=H&&(N.title=H);g.push(N);B(F);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
+q=null)}),G=mxUtils.bind(this,function(N){if(L.isSelectionEmpty())L.getRubberband().isActive()?(L.getRubberband().execute(N),L.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var I=L.getSelectionCells(),F=L.view.getBounds(I),H=L.view.scale;F.x/=H;F.y/=H;F.width/=H;F.height/=H;F.x-=L.view.translate.x;F.y-=L.view.translate.y;C(I,F)}mxEvent.consume(N)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(N){L.isMouseDown&&
+null!=L.panningManager&&null!=L.graphHandler.first&&(L.graphHandler.suspend(),null!=L.graphHandler.hint&&(L.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",L.panningManager.stop(),L.autoScroll=!1,mxEvent.consume(N))}),mxUtils.bind(this,function(N){L.isMouseDown&&null!=L.panningManager&&null!=L.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,L.panningManager.stop(),L.graphHandler.reset(),L.isMouseDown=
+!1,L.autoScroll=!0,G(N),mxEvent.consume(N))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(N){L.isMouseDown&&null!=L.graphHandler.first&&(L.graphHandler.resume(),null!=L.graphHandler.hint&&(L.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",L.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(N){y.style.backgroundColor="#f1f3f4";N.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
+N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(N){y.style.cursor="";y.style.backgroundColor="";0<N.dataTransfer.files.length&&this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(I,F,H,R,W,J,V,U,X){if(null!=I&&"image/"==F.substring(0,6))I="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(I),I=[new mxCell("",new mxGeometry(0,0,W,J),I)],I[0].vertex=!0,
+C(I,new mxRectangle(0,0,W,J),N,mxEvent.isAltDown(N)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var t=!1,E=mxUtils.bind(this,function(M,T){null!=M&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(M),null!=T&&0<T.length&&(M=T));if(null!=M)if(M=mxUtils.parseXml(M),"mxlibrary"==M.documentElement.nodeName)try{var O=JSON.parse(mxUtils.getTextContent(M.documentElement));x(O,y);g=g.concat(O);B(N);this.spinner.stop();
+t=!0}catch(ba){}else if("mxfile"==M.documentElement.nodeName)try{var Q=M.documentElement.getElementsByTagName("diagram");for(O=0;O<Q.length;O++){var S=this.stringToCells(Editor.getDiagramNodeXml(Q[O])),Y=this.editor.graph.getBoundingBoxFromGeometry(S);C(S,new mxRectangle(0,0,Y.width,Y.height),N)}t=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
+(q.parentNode.removeChild(q),q=null)});null!=X&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(X,function(M){E(M,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(M){4==M.readyState&&(this.spinner.stop(),200<=M.status&&299>=M.status?E(M.responseText,"text/xml"):this.handleError({message:mxResources.get(413==M.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):E(I,F)}}));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"dragleave",function(N){y.style.cursor="";y.style.backgroundColor="";N.stopPropagation();N.preventDefault()}));K=K.cloneNode(!1);K.setAttribute("src",Editor.editImage);K.setAttribute("title",mxResources.get("edit"));A.insertBefore(K,A.firstChild);mxEvent.addListener(K,"click",D);mxEvent.addListener(y,
+"dblclick",function(N){mxEvent.getSource(N)==y&&D(N)});l=K.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));A.insertBefore(l,A.firstChild);mxEvent.addListener(l,"click",G);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,
+mxUtils.bind(this,function(N){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(N)})),A.insertBefore(l,A.firstChild))}z.appendChild(A);z.style.paddingRight=18*A.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var l=d[k],p=l.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(q+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(q+
"image="+p,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(p=this.stringToCells(Graph.decompress(l.xml)),0<p.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(p,l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",
STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName=
"darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource=
@@ -11796,28 +11797,28 @@ startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g){d=null!=d?d:mxUtils.bind(this,function(k,l){l||(k=new ChangePageSetup(this,null,k),k.ignoreColor=!0,this.editor.graph.model.execute(k))});d=new BackgroundImageDialog(this,d,g);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,l,p){d=new LibraryDialog(this,d,g,k,l,p);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,
function(q){q&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow=
"hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var k=g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,
-function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,l,p,q,x){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{x?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,
-d.columnNumber,d,"INFO")}catch(z){}if(null!=A||null!=g){x=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),I=null;g=null!=g?g:mxResources.get("error");if(null!=A){null!=A.retry&&(B=mxResources.get("cancel"),I=function(){y();A.retry()});if(404==A.code||404==A.status||403==A.code){x=403==A.code?null!=A.message?mxUtils.htmlEntities(A.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
-this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var O=null!=p?null:null!=q?q:window.location.hash;if(null!=O&&("#G"==O.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==O.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==A.code||404==A.status)){O="#U"==O.substring(0,
-2)?O.substring(45,O.lastIndexOf("%26ex")):O.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+O);this.handleError(d,g,k,l,p)}),I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function z(){G.innerHTML="";for(var P=0;P<L.length;P++){var J=document.createElement("option");mxUtils.write(J,L[P].displayName);J.value=P;G.appendChild(J);J=document.createElement("option");J.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(J,"<"+L[P].email+">");J.setAttribute("disabled","disabled");G.appendChild(J)}J=document.createElement("option");mxUtils.write(J,mxResources.get("addAccount"));J.value=L.length;G.appendChild(J)}var L=this.drive.getUsersList(),C=document.createElement("div"),E=document.createElement("span");E.style.marginTop="6px";mxUtils.write(E,mxResources.get("changeUser")+": ");C.appendChild(E);var G=document.createElement("select");G.style.width="200px";z();mxEvent.addListener(G,"change",mxUtils.bind(this,
-function(){var P=G.value,J=L.length!=P;J&&this.drive.setUser(L[P]);this.drive.authorize(J,mxUtils.bind(this,function(){J||(L=this.drive.getUsersList(),z())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));C.appendChild(G);C=new CustomDialog(this,C,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(C.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=A.message?
-x=""==A.message&&null!=A.name?mxUtils.htmlEntities(A.name):mxUtils.htmlEntities(A.message):null!=A.response&&null!=A.response.error?x=mxUtils.htmlEntities(A.response.error):"undefined"!==typeof window.App&&(A.code==App.ERROR_TIMEOUT?x=mxUtils.htmlEntities(mxResources.get("timeout")):A.code==App.ERROR_BUSY?x=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof A&&0<A.length&&(x=mxUtils.htmlEntities(A)))}var t=q=null;null!=A&&null!=A.helpLink?(q=mxResources.get("help"),t=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(q=mxResources.get("contactOwner"),x+=mxUtils.htmlEntities(" ("+q+": "+A.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(g,x,B,k,I,null,null,q,t,null,null,null,l?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);
+function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,l,p,q,x){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{x?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,
+d.columnNumber,d,"INFO")}catch(u){}if(null!=z||null!=g){x=mxUtils.htmlEntities(mxResources.get("unknownError"));var A=mxResources.get("ok"),K=null;g=null!=g?g:mxResources.get("error");if(null!=z){null!=z.retry&&(A=mxResources.get("cancel"),K=function(){y();z.retry()});if(404==z.code||404==z.status||403==z.code){x=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
+this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var P=null!=p?null:null!=q?q:window.location.hash;if(null!=P&&("#G"==P.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==P.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==z.code||404==z.status)){P="#U"==P.substring(0,
+2)?P.substring(45,P.lastIndexOf("%26ex")):P.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+P);this.handleError(d,g,k,l,p)}),K,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){G.innerHTML="";for(var N=0;N<D.length;N++){var I=document.createElement("option");mxUtils.write(I,D[N].displayName);I.value=N;G.appendChild(I);I=document.createElement("option");I.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(I,"<"+D[N].email+">");I.setAttribute("disabled","disabled");G.appendChild(I)}I=document.createElement("option");mxUtils.write(I,mxResources.get("addAccount"));I.value=D.length;G.appendChild(I)}var D=this.drive.getUsersList(),B=document.createElement("div"),C=document.createElement("span");C.style.marginTop="6px";mxUtils.write(C,mxResources.get("changeUser")+": ");B.appendChild(C);var G=document.createElement("select");G.style.width="200px";u();mxEvent.addListener(G,"change",mxUtils.bind(this,
+function(){var N=G.value,I=D.length!=N;I&&this.drive.setUser(D[N]);this.drive.authorize(I,mxUtils.bind(this,function(){I||(D=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));B.appendChild(G);B=new CustomDialog(this,B,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(B.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?
+x=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?x=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?x=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?x=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(x=mxUtils.htmlEntities(z)))}var L=q=null;null!=z&&null!=z.helpLink?(q=mxResources.get("help"),L=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(q=mxResources.get("contactOwner"),x+=mxUtils.htmlEntities(" ("+q+": "+z.ownerEmail+")"),L=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,x,A,k,K,null,null,q,L,null,null,null,l?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);
d.init()};EditorUi.prototype.confirm=function(d,g,k,l,p,q){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},y=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){x();null!=g&&g()},function(){x();null!=k&&k()},l,p,null,null,null,null,y);this.showDialog(d.container,340,46+y,!0,q);d.init()};EditorUi.prototype.showBanner=function(d,g,k,l){var p=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=
mxSettings.settings["close"+d])){var q=document.createElement("div");q.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(q.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(q.style,"transition","all 1s ease");q.className="geBtn gePrimaryBtn";
p=document.createElement("img");p.setAttribute("src",IMAGE_PATH+"/logo.png");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";q.appendChild(p);p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get(l?"doNotShowAgain":"close"));p.setAttribute("border","0");p.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
q.appendChild(p);mxUtils.write(q,g);document.body.appendChild(q);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("id","geDoNotShowAgainCheckbox");x.style.marginRight="6px";if(!l){g.appendChild(x);var y=document.createElement("label");y.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(y,mxResources.get("doNotShowAgain"));g.appendChild(y);
-q.style.paddingBottom="30px";q.appendChild(g)}var A=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,x.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);A()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(I){var O=mxEvent.getSource(I);O!=x&&O!=y?(null!=k&&k(),A(),mxEvent.consume(I)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+q.style.paddingBottom="30px";q.appendChild(g)}var z=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,x.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(K){mxEvent.consume(K);z()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){z()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(K){var P=mxEvent.getSource(K);P!=x&&P!=y?(null!=k&&k(),z(),mxEvent.consume(K)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(A,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,l){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<l&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,l,p){var q="jpeg"==k?"jpg":k;l=this.getBaseFilename(l)+(null!=g?".drawio":"")+"."+q;d=this.createImageDataUri(d,
g,k,p);this.saveData(l,q,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,
!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,l,p,q){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=l?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),
k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,l);else{var x=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof x.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var y=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(y?parseInt(y[2],10):
-!1)?!1:q}if(q||this.isOffline()){x.href=URL.createObjectURL(l?this.base64ToBlob(d,k):new Blob([d],{type:k}));q?x.download=g:x.setAttribute("target","_blank");document.body.appendChild(x);try{window.setTimeout(function(){URL.revokeObjectURL(x.href)},2E4),x.click(),x.parentNode.removeChild(x)}catch(A){}}else this.createEchoRequest(d,g,k,l,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,l,p,q){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
-k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,l=Math.ceil(k/1024),p=Array(l),q=0;q<l;++q){for(var x=1024*q,y=Math.min(x+1024,k),A=Array(y-x),B=0;x<y;++B,++x)A[B]=d[x].charCodeAt(0);p[q]=new Uint8Array(A)}return new Blob(p,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,l,p,q,x,y){q=null!=q?q:!1;x=null!=x?x:"vsdx"!=
-p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var A=4>=p?2:6<p?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,I){try{if("_blank"==I)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,l);else if(null!=k&&"text/html"==k.substring(0,9)){var O=new EmbedDialog(this,d);this.showDialog(O.container,450,240,!0,!0);O.init()}else{var t=window.open("about:blank");null==t?mxUtils.popup(d,!0):(t.document.write("<pre>"+mxUtils.htmlEntities(d,
-!1)+"</pre>"),t.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(d,B,k,l,null,y):null!=B&&0<B.length&&this.pickFolder(I,mxUtils.bind(this,function(z){try{this.exportFile(d,B,k,l,I,z)}catch(L){this.handleError(L)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,x,null,1<p,A,d,k,l);q=this.isServices(p)?p>A?390:280:160;this.showDialog(g.container,420,q,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
+!1)?!1:q}if(q||this.isOffline()){x.href=URL.createObjectURL(l?this.base64ToBlob(d,k):new Blob([d],{type:k}));q?x.download=g:x.setAttribute("target","_blank");document.body.appendChild(x);try{window.setTimeout(function(){URL.revokeObjectURL(x.href)},2E4),x.click(),x.parentNode.removeChild(x)}catch(z){}}else this.createEchoRequest(d,g,k,l,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,l,p,q){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
+k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,l=Math.ceil(k/1024),p=Array(l),q=0;q<l;++q){for(var x=1024*q,y=Math.min(x+1024,k),z=Array(y-x),A=0;x<y;++A,++x)z[A]=d[x].charCodeAt(0);p[q]=new Uint8Array(z)}return new Blob(p,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,l,p,q,x,y){q=null!=q?q:!1;x=null!=x?x:"vsdx"!=
+p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var z=4>=p?2:6<p?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(A,K){try{if("_blank"==K)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,l);else if(null!=k&&"text/html"==k.substring(0,9)){var P=new EmbedDialog(this,d);this.showDialog(P.container,450,240,!0,!0);P.init()}else{var L=window.open("about:blank");null==L?mxUtils.popup(d,!0):(L.document.write("<pre>"+mxUtils.htmlEntities(d,
+!1)+"</pre>"),L.document.close())}else K==App.MODE_DEVICE||"download"==K?this.doSaveLocalFile(d,A,k,l,null,y):null!=A&&0<A.length&&this.pickFolder(K,mxUtils.bind(this,function(u){try{this.exportFile(d,A,k,l,K,u)}catch(D){this.handleError(D)}}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,x,null,1<p,z,d,k,l);q=this.isServices(p)?p>z?390:280:160;this.showDialog(g.container,420,q,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
function(d,g,k){var l=window.open("about:blank");null==l||null==l.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"==g?l.document.write("<html>"+d+"</html>"):(d=k?d:btoa(unescape(encodeURIComponent(d))),l.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+d+'"/></html>')):l.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),l.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(l){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
@@ -11828,149 +11829,149 @@ Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListen
this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,function(l){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);
else{this.exportDialog=document.createElement("div");var q=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=q.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=q.zIndex;var x=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});x.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
-function(y){x.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var A=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight="140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));y.setAttribute("border","0");y.setAttribute("src",A);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,l,p){this.isLocalFileSave()?
-this.saveLocalFile(k,d,l,p,g):this.saveRequest(d,g,mxUtils.bind(this,function(q,x){return this.createEchoRequest(k,q,l,p,g,x)}),k,p,l)};EditorUi.prototype.saveRequest=function(d,g,k,l,p,q,x){x=null!=x?x:!mxClient.IS_IOS||!navigator.standalone;var y=this.getServiceCount(!1);isLocalStorage&&y++;var A=4>=y?2:6<y?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(B,I){if("_blank"==I||null!=B&&0<B.length){var O=k("_blank"==I?null:B,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");
-null!=O&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?O.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(t){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,B,q,!0,I,t)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),B,q,!0,I,t)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(z){this.spinner.stop();this.handleError(z)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,A,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,
-g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,A,B,I,O,t,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var L=this.editor.graph.isSelectionEmpty();k=null!=k?k:L;var C=g?null:this.editor.graph.background;C==mxConstants.NONE&&(C=null);null==C&&0==g&&(C=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var E=this.editor.graph.getSvg(C,d,x,y,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!t,I,O);l&&this.editor.graph.addSvgShadow(E);var G=
-this.getBaseFilename()+(p?".drawio":"")+".svg";z=null!=z?z:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var P=mxUtils.bind(this,function(F){this.spinner.stop();p&&F.setAttribute("content",this.getFileData(!0,null,null,null,k,A,null,null,null,!1));z(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
-"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(E);var J=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,P,this.thumbImageCache)):P(F)});t?this.embedFonts(E,J):(this.editor.addFontCss(E),J(E))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,
-y){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();A.id=x;null!=y&&A.setAttribute("name",y);k&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);l&&A.setAttribute("disabled","disabled");q&&(d.appendChild(A),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",x),d.appendChild(k),p||mxUtils.br(d));return A};EditorUi.prototype.addEditButton=function(d,
+function(y){x.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight="140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));y.setAttribute("border","0");y.setAttribute("src",z);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,l,p){this.isLocalFileSave()?
+this.saveLocalFile(k,d,l,p,g):this.saveRequest(d,g,mxUtils.bind(this,function(q,x){return this.createEchoRequest(k,q,l,p,g,x)}),k,p,l)};EditorUi.prototype.saveRequest=function(d,g,k,l,p,q,x){x=null!=x?x:!mxClient.IS_IOS||!navigator.standalone;var y=this.getServiceCount(!1);isLocalStorage&&y++;var z=4>=y?2:6<y?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(A,K){if("_blank"==K||null!=A&&0<A.length){var P=k("_blank"==K?null:A,K==App.MODE_DEVICE||"download"==K||null==K||"_blank"==K?"0":"1");
+null!=P&&(K==App.MODE_DEVICE||"download"==K||"_blank"==K?P.simulate(document,"_blank"):this.pickFolder(K,mxUtils.bind(this,function(L){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,A,q,!0,K,L)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),A,q,!0,K,L)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,z,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,
+g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,z,A,K,P,L,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var D=this.editor.graph.isSelectionEmpty();k=null!=k?k:D;var B=g?null:this.editor.graph.background;B==mxConstants.NONE&&(B=null);null==B&&0==g&&(B=K?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var C=this.editor.graph.getSvg(B,d,x,y,null,k,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!L,K,P);l&&this.editor.graph.addSvgShadow(C);var G=
+this.getBaseFilename()+(p?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var N=mxUtils.bind(this,function(F){this.spinner.stop();p&&F.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(C);var I=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,N,this.thumbImageCache)):N(F)});L?this.embedFonts(C,I):(this.editor.addFontCss(C),I(C))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,
+y){q=null!=q?q:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();z.id=x;null!=y&&z.setAttribute("name",y);k&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);l&&z.setAttribute("disabled","disabled");q&&(d.appendChild(z),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",x),d.appendChild(k),p||mxUtils.br(d));return z};EditorUi.prototype.addEditButton=function(d,
g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var l=this.getCurrentFile(),p="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var q=document.createElement("select");q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));q.appendChild(l);
l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");q.appendChild(l);d.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var x=new FilenameDialog(this,p,mxResources.get("ok"),function(y){null!=y?p=y:q.value="blank"},mxResources.get("url"),null,null,null,null,function(){q.value="blank"});this.showDialog(x.container,300,80,!0,!1);x.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
function(){k.checked&&(null==g||g.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===q.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var y=document.createElement("div");y.style.width="100%";y.style.height="100%";y.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(y.style.border="1px solid black",
y.style.backgroundColor=q):(y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");x.innerHTML="";x.appendChild(y)}mxUtils.write(d,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));
l.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));l.appendChild(p);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(g));d.appendChild(l);mxUtils.write(d,mxResources.get("borderColor")+
-":");var q="#0000ff",x=null;x=mxUtils.button("",mxUtils.bind(this,function(y){this.pickColor(q||"none",function(A){q=A;k()});mxEvent.consume(y)}));k();x.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";x.style.marginLeft="4px";x.style.height="22px";x.style.width="22px";x.style.position="relative";x.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";x.className="geColorBtn";d.appendChild(x);mxUtils.br(d);return{getColor:function(){return q},getTarget:function(){return l.value},
+":");var q="#0000ff",x=null;x=mxUtils.button("",mxUtils.bind(this,function(y){this.pickColor(q||"none",function(z){q=z;k()});mxEvent.consume(y)}));k();x.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";x.style.marginLeft="4px";x.style.height="22px";x.style.width="22px";x.style.position="relative";x.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";x.className="geColorBtn";d.appendChild(x);mxUtils.br(d);return{getColor:function(){return q},getTarget:function(){return l.value},
focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,l,p,q,x){x=null!=x?x:[];l&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=p&&0<p.length&&x.push("edit="+encodeURIComponent(p)),q&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&
-this.currentPage!=this.pages[0]&&x.push("page-id="+this.currentPage.getId());return x};EditorUi.prototype.createLink=function(d,g,k,l,p,q,x,y,A,B){A=this.createUrlParameters(d,g,k,l,p,q,A);d=this.getCurrentFile();g=!0;null!=x?k="#U"+encodeURIComponent(x):(d=this.getCurrentFile(),y||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&
-null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(d.getTitle()));B&&1<k.length&&(A.push("open="+k.substring(1)),k="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,l,p,q,x,y,A,B,I,O){this.getBasenames();var t={};""!=
-p&&p!=mxConstants.NONE&&(t.highlight=p);"auto"!==l&&(t.target=l);B||(t.lightbox=!1);t.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(t.zoom=k/100);k=[];x&&(k.push("pages"),t.resize=!0,null!=this.pages&&null!=this.currentPage&&(t.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),t.resize=!0);y&&k.push("layers");A&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),t.toolbar=k.join(" "));null!=I&&0<I.length&&(t.edit=I);null!=d?t.url=d:t.xml=this.getFileData(!0,
-null,null,null,null,!x);g='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(t))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";O(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
+this.currentPage!=this.pages[0]&&x.push("page-id="+this.currentPage.getId());return x};EditorUi.prototype.createLink=function(d,g,k,l,p,q,x,y,z,A){z=this.createUrlParameters(d,g,k,l,p,q,z);d=this.getCurrentFile();g=!0;null!=x?k="#U"+encodeURIComponent(x):(d=this.getCurrentFile(),y||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&
+null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(d.getTitle()));A&&1<k.length&&(z.push("open="+k.substring(1)),k="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<z.length?"?"+z.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,l,p,q,x,y,z,A,K,P){this.getBasenames();var L={};""!=
+p&&p!=mxConstants.NONE&&(L.highlight=p);"auto"!==l&&(L.target=l);A||(L.lightbox=!1);L.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(L.zoom=k/100);k=[];x&&(k.push("pages"),L.resize=!0,null!=this.pages&&null!=this.currentPage&&(L.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),L.resize=!0);y&&k.push("layers");z&&k.push("tags");0<k.length&&(A&&k.push("lightbox"),L.toolbar=k.join(" "));null!=K&&0<K.length&&(L.edit=K);null!=d?L.url=d:L.xml=this.getFileData(!0,
+null,null,null,null,!x);g='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(L))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";P(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,l){var p=document.createElement("div");p.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(q);var x=document.createElement("div");x.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var y=document.createElement("input");
-y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");x.appendChild(q);var A=document.createElement("span");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));x.appendChild(A);mxUtils.br(x);x.appendChild(y);A=document.createElement("span");mxUtils.write(A,mxResources.get("publicDiagramUrl"));x.appendChild(A);var B=this.getCurrentFile();
-null==k&&null!=B&&B.constructor==window.DriveFile&&(A=document.createElement("a"),A.style.paddingLeft="12px",A.style.color="gray",A.style.cursor="pointer",mxUtils.write(A,mxResources.get("share")),x.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(B.getId())})));q.setAttribute("checked","checked");null==k&&y.setAttribute("disabled","disabled");p.appendChild(x);var I=this.addLinkSection(p),O=this.addCheckbox(p,mxResources.get("zoom"),
-!0,null,!0);mxUtils.write(p,":");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%";p.appendChild(t);var z=this.addCheckbox(p,mxResources.get("fit"),!0);x=null!=this.pages&&1<this.pages.length;var L=L=this.addCheckbox(p,mxResources.get("allPages"),x,!x),C=this.addCheckbox(p,mxResources.get("layers"),!0),E=this.addCheckbox(p,mxResources.get("tags"),!0),G=this.addCheckbox(p,
-mxResources.get("lightbox"),!0),P=null;x=380;if(EditorUi.enableHtmlEditOption){P=this.addEditButton(p,G);var J=P.getEditInput();J.style.marginBottom="16px";x+=50;mxEvent.addListener(G,"change",function(){G.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&G.checked?P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,p,mxUtils.bind(this,function(){l(y.checked?k:null,O.checked,t.value,I.getTarget(),
-I.getColor(),z.checked,L.checked,C.checked,E.checked,G.checked,null!=P?P.getLink():null)}),null,d,g);this.showDialog(d.container,340,x,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,l,p,q,x,y){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,d||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";A.appendChild(B);var I=this.getCurrentFile();d=0;if(null==
-I||I.constructor!=window.DriveFile||g)x=null!=x?x:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;x=null!=x?x:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var O=document.createElement("div");O.style.whiteSpace="normal";mxUtils.write(O,mxResources.get("linkAccountRequired"));B.appendChild(O);O=
-mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));O.style.marginTop="12px";O.className="geBtn";B.appendChild(O);A.appendChild(B);O=document.createElement("a");O.style.paddingLeft="12px";O.style.color="gray";O.style.fontSize="11px";O.style.cursor="pointer";mxUtils.write(O,mxResources.get("check"));B.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(H){this.spinner.stop();H=new ErrorDialog(this,null,mxResources.get(null!=H?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(H.container,300,80,!0,!1);H.init()}))}))}var t=null,z=null;if(null!=k||null!=l)d+=30,mxUtils.write(A,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%",A.appendChild(t),mxUtils.write(A,mxResources.get("height")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.width="50px",z.style.marginLeft="6px",z.style.marginBottom="10px",z.value=l+"px",A.appendChild(z),mxUtils.br(A);var L=this.addLinkSection(A,q);k=null!=this.pages&&1<this.pages.length;var C=null;if(null==I||I.constructor!=window.DriveFile||g)C=this.addCheckbox(A,mxResources.get("allPages"),k,!k);var E=this.addCheckbox(A,mxResources.get("lightbox"),!0,
-null,null,!q),G=this.addEditButton(A,E),P=G.getEditInput();q&&(P.style.marginLeft=E.style.marginLeft,E.style.display="none",d-=20);var J=this.addCheckbox(A,mxResources.get("layers"),!0);J.style.marginLeft=P.style.marginLeft;J.style.marginTop="8px";var F=this.addCheckbox(A,mxResources.get("tags"),!0);F.style.marginLeft=P.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(E,"change",function(){E.checked?(J.removeAttribute("disabled"),P.removeAttribute("disabled")):
-(J.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&E.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,A,mxUtils.bind(this,function(){p(L.getTarget(),L.getColor(),null==C?!0:C.checked,E.checked,G.getLink(),J.checked,null!=t?t.value:null,null!=z?z.value:null,F.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)):L.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("image"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";q.appendChild(x);if(p){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");
-y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var B=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),I=l?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);x=this.editor.graph;var O=l?null:this.addCheckbox(q,mxResources.get("transparentBackground"),x.background==mxConstants.NONE||null==x.background);null!=O&&(O.style.marginBottom="16px");d=new CustomDialog(this,q,mxUtils.bind(this,function(){var t=parseInt(y.value)/100||1,z=parseInt(A.value)||0;k(!B.checked,null!=I?I.checked:!1,null!=O?O.checked:!1,t,z)}),null,d,g);
-this.showDialog(d.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,l,p,q,x,y,A){x=null!=x?x:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph,O="jpeg"==y?220:300,t=document.createElement("h3");mxUtils.write(t,d);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";B.appendChild(t);mxUtils.write(B,mxResources.get("zoom")+":");var z=document.createElement("input");
-z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value=this.lastExportZoom||"100%";B.appendChild(z);mxUtils.write(B,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";B.appendChild(L);mxUtils.br(B);var C=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,
-I.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.style.marginLeft="24px";E.setAttribute("disabled","disabled");E.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var P={};for(t=0;t<d.length;t++)if(!I.isSelectionEmpty()||"selectionOnly"!=d[t]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(d[t]));J.setAttribute("value",
-d[t]);G.appendChild(J);P[d[t]]=J}A?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(G),mxUtils.br(B),O+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(C.checked=!0)})):q&&(B.appendChild(E),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),O+=30,mxEvent.addListener(C,"change",function(){C.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}));I.isSelectionEmpty()?A&&(C.style.display="none",C.nextSibling.style.display="none",C.nextSibling.nextSibling.style.display=
-"none",O-=30):(G.value="diagram",E.setAttribute("checked","checked"),E.defaultChecked=!0,mxEvent.addListener(C,"change",function(){G.value=C.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(B,mxResources.get("dark"),!0),O+=26);var S=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible),V=null;if("png"==y||"jpeg"==y)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||
-!this.canvasSupported,!1,!0),O+=30;var M=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),x,null,null,"jpeg"!=y);M.style.marginBottom="16px";var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||W.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";
+y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");x.appendChild(q);var z=document.createElement("span");mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));x.appendChild(z);mxUtils.br(x);x.appendChild(y);z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));x.appendChild(z);var A=this.getCurrentFile();
+null==k&&null!=A&&A.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),x.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId())})));q.setAttribute("checked","checked");null==k&&y.setAttribute("disabled","disabled");p.appendChild(x);var K=this.addLinkSection(p),P=this.addCheckbox(p,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(p,":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value="100%";p.appendChild(L);var u=this.addCheckbox(p,mxResources.get("fit"),!0);x=null!=this.pages&&1<this.pages.length;var D=D=this.addCheckbox(p,mxResources.get("allPages"),x,!x),B=this.addCheckbox(p,mxResources.get("layers"),!0),C=this.addCheckbox(p,mxResources.get("tags"),!0),G=this.addCheckbox(p,
+mxResources.get("lightbox"),!0),N=null;x=380;if(EditorUi.enableHtmlEditOption){N=this.addEditButton(p,G);var I=N.getEditInput();I.style.marginBottom="16px";x+=50;mxEvent.addListener(G,"change",function(){G.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&G.checked?N.getEditSelect().removeAttribute("disabled"):N.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,p,mxUtils.bind(this,function(){l(y.checked?k:null,P.checked,L.value,K.getTarget(),
+K.getColor(),u.checked,D.checked,B.checked,C.checked,G.checked,null!=N?N.getLink():null)}),null,d,g);this.showDialog(d.container,340,x,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,l,p,q,x,y){var z=document.createElement("div");z.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,d||mxResources.get("link"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(A);var K=this.getCurrentFile();d=0;if(null==
+K||K.constructor!=window.DriveFile||g)x=null!=x?x:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;x=null!=x?x:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var P=document.createElement("div");P.style.whiteSpace="normal";mxUtils.write(P,mxResources.get("linkAccountRequired"));A.appendChild(P);P=
+mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(K.getId())}));P.style.marginTop="12px";P.className="geBtn";A.appendChild(P);z.appendChild(A);P=document.createElement("a");P.style.paddingLeft="12px";P.style.color="gray";P.style.fontSize="11px";P.style.cursor="pointer";mxUtils.write(P,mxResources.get("check"));A.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(H){this.spinner.stop();H=new ErrorDialog(this,null,mxResources.get(null!=H?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(H.container,300,80,!0,!1);H.init()}))}))}var L=null,u=null;if(null!=k||null!=l)d+=30,mxUtils.write(z,mxResources.get("width")+":"),L=document.createElement("input"),L.setAttribute("type","text"),L.style.marginRight="16px",L.style.width="50px",L.style.marginLeft="6px",L.style.marginRight="16px",L.style.marginBottom="10px",
+L.value="100%",z.appendChild(L),mxUtils.write(z,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=l+"px",z.appendChild(u),mxUtils.br(z);var D=this.addLinkSection(z,q);k=null!=this.pages&&1<this.pages.length;var B=null;if(null==K||K.constructor!=window.DriveFile||g)B=this.addCheckbox(z,mxResources.get("allPages"),k,!k);var C=this.addCheckbox(z,mxResources.get("lightbox"),!0,
+null,null,!q),G=this.addEditButton(z,C),N=G.getEditInput();q&&(N.style.marginLeft=C.style.marginLeft,C.style.display="none",d-=20);var I=this.addCheckbox(z,mxResources.get("layers"),!0);I.style.marginLeft=N.style.marginLeft;I.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=N.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(C,"change",function(){C.checked?(I.removeAttribute("disabled"),N.removeAttribute("disabled")):
+(I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){p(D.getTarget(),D.getColor(),null==B?!0:B.checked,C.checked,G.getLink(),I.checked,null!=L?L.value:null,null!=u?u.value:null,F.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,!0);null!=L?(L.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):D.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("image"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";q.appendChild(x);if(p){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");
+y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||"0";q.appendChild(z);mxUtils.br(q)}var A=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),K=l?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);x=this.editor.graph;var P=l?null:this.addCheckbox(q,mxResources.get("transparentBackground"),x.background==mxConstants.NONE||null==x.background);null!=P&&(P.style.marginBottom="16px");d=new CustomDialog(this,q,mxUtils.bind(this,function(){var L=parseInt(y.value)/100||1,u=parseInt(z.value)||0;k(!A.checked,null!=K?K.checked:!1,null!=P?P.checked:!1,L,u)}),null,d,g);
+this.showDialog(d.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,l,p,q,x,y,z){x=null!=x?x:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var K=this.editor.graph,P="jpeg"==y?220:300,L=document.createElement("h3");mxUtils.write(L,d);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(L);mxUtils.write(A,mxResources.get("zoom")+":");var u=document.createElement("input");
+u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";A.appendChild(u);mxUtils.write(A,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";A.appendChild(D);mxUtils.br(A);var B=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,
+K.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.style.marginLeft="24px";C.setAttribute("disabled","disabled");C.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var N={};for(L=0;L<d.length;L++)if(!K.isSelectionEmpty()||"selectionOnly"!=d[L]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(d[L]));I.setAttribute("value",
+d[L]);G.appendChild(I);N[d[L]]=I}z?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),P+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(B.checked=!0)})):q&&(A.appendChild(C),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),P+=30,mxEvent.addListener(B,"change",function(){B.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));K.isSelectionEmpty()?z&&(B.style.display="none",B.nextSibling.style.display="none",B.nextSibling.nextSibling.style.display=
+"none",P-=30):(G.value="diagram",C.setAttribute("checked","checked"),C.defaultChecked=!0,mxEvent.addListener(B,"change",function(){G.value=B.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(A,mxResources.get("dark"),!0),P+=26);var R=this.addCheckbox(A,mxResources.get("shadow"),K.shadowVisible),W=null;if("png"==y||"jpeg"==y)W=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),P+=30;var J=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),x,null,null,"jpeg"!=y);J.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||V.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";
U.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));U.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));U.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(q);mxEvent.addListener(U,"change",mxUtils.bind(this,
-function(){"lblToSvg"==U.value?(W.checked=!0,W.setAttribute("disabled","disabled"),P.page.style.display="none","page"==G.value&&(G.value="diagram"),S.checked=!1,S.setAttribute("disabled","disabled"),u.style.display="inline-block",X.style.display="none"):"disabled"==W.getAttribute("disabled")&&(W.checked=!1,W.removeAttribute("disabled"),S.removeAttribute("disabled"),P.page.style.display="",u.style.display="none",X.style.display="")}));g&&(B.appendChild(W),mxUtils.write(B,mxResources.get("embedImages")),
-mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(U),mxUtils.br(B),O+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));X.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));X.appendChild(g);
-g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));X.appendChild(g);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==y&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(X),B.appendChild(u),mxUtils.br(B),mxUtils.br(B),O+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=L.value;this.lastExportZoom=z.value;
-p(z.value,F.checked,!C.checked,S.checked,M.checked,W.checked,L.value,E.checked,!1,X.value,null!=V?V.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,l);this.showDialog(k.container,340,O,!0,!0,null,null,null,null,!0);z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";
-var x=this.editor.graph;if(null!=g){var y=document.createElement("h3");mxUtils.write(y,g);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var A=this.addCheckbox(q,mxResources.get("fit"),!0),B=this.addCheckbox(q,mxResources.get("shadow"),x.shadowVisible&&l,!l),I=this.addCheckbox(q,k),O=this.addCheckbox(q,mxResources.get("lightbox"),!0),t=this.addEditButton(q,O),z=t.getEditInput(),L=1<x.model.getChildCount(x.model.getRoot()),C=this.addCheckbox(q,mxResources.get("layers"),
-L,!L);C.style.marginLeft=z.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(O,"change",function(){O.checked?(L&&C.removeAttribute("disabled"),z.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&O.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(A.checked,B.checked,I.checked,
-O.checked,t.getLink(),C.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function A(z){var L=" ",C="";l&&(L=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",C+="cursor:pointer;");d&&(C+="max-width:100%;");var E="";k&&(E=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');x('<img src="'+z+'"'+E+(""!=C?' style="'+C+'"':"")+L+"/>")}var B=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(z){var L=l?this.getFileData(!0):null;z=
-this.createImageDataUri(z,L,"png");A(z)}),null,null,null,mxUtils.bind(this,function(z){y({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var O="";k&&(O="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+O+"&xml="+encodeURIComponent(g));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&
-299>=t.getStatus()?A("data:image/png;base64,"+t.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,l,p,q,x){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),A=y.getElementsByTagName("a");if(null!=A)for(var B=0;B<A.length;B++){var I=A[B].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==A[B].getAttribute("target")&&A[B].removeAttribute("target")}l&&
-y.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(y);if(k){var O=" ",t="";l&&(O="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(p?"&edit=_blank":"")+(q?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");d&&(t+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(z){x('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(z))+'"'+(""!=t?' style="'+t+'"':"")+O+"/>")}))}else t="",l&&(g=this.getSelectedPageIndex(),y.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),d&&(d=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+d+" "+p),t+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=t&&y.setAttribute("style",t),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),x(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(d){d=
+function(){"lblToSvg"==U.value?(V.checked=!0,V.setAttribute("disabled","disabled"),N.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),t.style.display="inline-block",X.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),R.removeAttribute("disabled"),N.page.style.display="",t.style.display="none",X.style.display="")}));g&&(A.appendChild(V),mxUtils.write(A,mxResources.get("embedImages")),
+mxUtils.br(A),mxUtils.write(A,mxResources.get("txtSettings")+":"),A.appendChild(U),mxUtils.br(A),P+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));X.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));X.appendChild(g);
+g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));X.appendChild(g);var t=document.createElement("div");mxUtils.write(t,mxResources.get("LinksLost"));t.style.margin="7px";t.style.display="none";"svg"==y&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(X),A.appendChild(t),mxUtils.br(A),mxUtils.br(A),P+=50);k=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=D.value;this.lastExportZoom=u.value;
+p(u.value,F.checked,!B.checked,R.checked,J.checked,V.checked,D.value,C.checked,!1,X.value,null!=W?W.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,l);this.showDialog(k.container,340,P,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";
+var x=this.editor.graph;if(null!=g){var y=document.createElement("h3");mxUtils.write(y,g);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var z=this.addCheckbox(q,mxResources.get("fit"),!0),A=this.addCheckbox(q,mxResources.get("shadow"),x.shadowVisible&&l,!l),K=this.addCheckbox(q,k),P=this.addCheckbox(q,mxResources.get("lightbox"),!0),L=this.addEditButton(q,P),u=L.getEditInput(),D=1<x.model.getChildCount(x.model.getRoot()),B=this.addCheckbox(q,mxResources.get("layers"),
+D,!D);B.style.marginLeft=u.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(P,"change",function(){P.checked?(D&&B.removeAttribute("disabled"),u.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&P.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(z.checked,A.checked,K.checked,
+P.checked,L.getLink(),B.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function z(u){var D=" ",B="";l&&(D=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=K?"&page="+K:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",B+="cursor:pointer;");d&&(B+="max-width:100%;");var C="";k&&(C=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');x('<img src="'+u+'"'+C+(""!=B?' style="'+B+'"':"")+D+"/>")}var A=this.editor.graph.getGraphBounds(),K=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var D=l?this.getFileData(!0):null;u=
+this.createImageDataUri(u,D,"png");z(u)}),null,null,null,mxUtils.bind(this,function(u){y({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),A.width*A.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var P="";k&&(P="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var L=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+P+"&xml="+encodeURIComponent(g));L.send(mxUtils.bind(this,function(){200<=L.getStatus()&&
+299>=L.getStatus()?z("data:image/png;base64,"+L.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,l,p,q,x){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),z=y.getElementsByTagName("a");if(null!=z)for(var A=0;A<z.length;A++){var K=z[A].getAttribute("href");null!=K&&"#"==K.charAt(0)&&"_blank"==z[A].getAttribute("target")&&z[A].removeAttribute("target")}l&&
+y.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(y);if(k){var P=" ",L="";l&&(P="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(p?"&edit=_blank":"")+(q?"&layers=1":
+"")+"');}})(this);\"",L+="cursor:pointer;");d&&(L+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(u){x('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=L?' style="'+L+'"':"")+P+"/>")}))}else L="",l&&(g=this.getSelectedPageIndex(),y.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),L+="cursor:pointer;"),d&&(d=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+d+" "+p),L+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=L&&y.setAttribute("style",L),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),x(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=
d;else if("mxfile"==d.nodeName){var l=d.getElementsByTagName("diagram");if(0<l.length){k=l[0];var p=g.getGlobalVariable;g.getGlobalVariable=function(q){return"page"==q?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:p.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}l=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(q){}finally{this.editor.graph=l}return d};EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=
d){if(d.hasAttribute("scale")){var l=parseFloat(d.getAttribute("scale"));!isNaN(l)&&0<l&&(g=l)}d.hasAttribute("border")&&(l=parseInt(d.getAttribute("border")),!isNaN(l)&&0<l&&(k=l))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,l,p){try{var q=this.editor.graph,x=null!=q.themes&&"darkTheme"==q.defaultThemeName,y=null;if(null!=k&&0<k.length)q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),q),y=k;else if(x||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet());var A=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&q.setBackgroundImage(B.viewState.backgroundImage);q.getGlobalVariable=function(I){return"page"==I?B.getName():"pagenumber"==I?1:A.apply(this,
-arguments)};document.body.appendChild(q.container);q.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var O=I.toDataURL("image/png");O=Editor.writeGraphModelToPng(O,"tEXt","mxfile",encodeURIComponent(y));d(O.substring(O.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(t){null!=g&&g(t)}}),null,null,null,mxUtils.bind(this,function(I){null!=g&&
-g(I)}),null,null,l,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(I){null!=g&&g(I)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,l,p,q,x,y,A,B,I,O,t){y=null!=y?y:!0;I=null!=I?I:0;x=null!=A?A:g.background;x==mxConstants.NONE&&(x=null);q=g.getSvg(x,B,I,null,null,q,null,null,null,g.shadowVisible||O,null,t,"diagram");(g.shadowVisible||O)&&g.addSvgShadow(q,null,null,0==I);null!=d&&q.setAttribute("content",d);null!=k&&q.setAttribute("resource",k);var z=mxUtils.bind(this,function(L){L=
-(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(L);null!=p&&p(L);return L});g.mathEnabled&&this.editor.addMathCss(q);if(null!=p)this.embedFonts(q,mxUtils.bind(this,function(L){y?this.editor.convertImages(L,mxUtils.bind(this,function(C){z(C)})):z(L)}));else return z(q)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(l){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,l,p,q,x,y,A,B,I,O,t){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var z=this.editor.graph.isSelectionEmpty();k=null!=k?k:z;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(L){this.spinner.stop();try{this.saveCanvas(L,
-p?this.getFileData(!0,null,null,null,k,y):null,A,null==this.pages||0==this.pages.length,I)}catch(C){this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}),null,k,d||1,g,l,null,null,q,x,B,O,t)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,l,p,q,x){g=null!=g?g:0;k=null!=k?k:0;var y=[];try{var A=
-this.editor.graph;if(null!=d&&0<d.length){A.model.beginUpdate();try{var B=mxUtils.parseXml(d);d={};var I=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var O=I.getElementsByTagName("diagram");if(1==O.length&&!q){if(I=Editor.parseDiagramNode(O[0]),null!=this.currentPage&&(d[O[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var t=O[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,t))}}else if(0<O.length){q=[];var z=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[O[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(O[0]),l=!1,z=1);for(;z<O.length;z++){var L=O[z].getAttribute("id");O[z].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(O[z]));d[L]=O[z].getAttribute("id");var E=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[E+1]));A.model.execute(new ChangePage(this,C,C,E,
-!0));q.push(C)}this.updatePageLinks(d,q)}}if(null!=I&&"mxGraphModel"===I.nodeName){y=A.importGraphModel(I,g,k,l);if(null!=y)for(z=0;z<y.length;z++)this.updatePageLinksForCell(d,y[z]);var G=A.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(d,G);var P=new ChangePageSetup(this,null,G);P.ignoreColor=!0;A.model.execute(P)}}x&&this.insertHandler(y,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(J){if(p)throw J;
-this.handleError(J)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
+!0),q),y=k;else if(x||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet());var z=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var A=this.pages[0];this.currentPage==A?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&q.setBackgroundImage(A.viewState.backgroundImage);q.getGlobalVariable=function(K){return"page"==K?A.getName():"pagenumber"==K?1:z.apply(this,
+arguments)};document.body.appendChild(q.container);q.model.setRoot(A.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var P=K.toDataURL("image/png");P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(y));d(P.substring(P.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(L){null!=g&&g(L)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&
+g(K)}),null,null,l,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,l,p,q,x,y,z,A,K,P,L){y=null!=y?y:!0;K=null!=K?K:0;x=null!=z?z:g.background;x==mxConstants.NONE&&(x=null);q=g.getSvg(x,A,K,null,null,q,null,null,null,g.shadowVisible||P,null,L,"diagram");(g.shadowVisible||P)&&g.addSvgShadow(q,null,null,0==K);null!=d&&q.setAttribute("content",d);null!=k&&q.setAttribute("resource",k);var u=mxUtils.bind(this,function(D){D=
+(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(D);null!=p&&p(D);return D});g.mathEnabled&&this.editor.addMathCss(q);if(null!=p)this.embedFonts(q,mxUtils.bind(this,function(D){y?this.editor.convertImages(D,mxUtils.bind(this,function(B){u(B)})):u(D)}));else return u(q)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(l){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,l,p,q,x,y,z,A,K,P,L){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(D){this.spinner.stop();try{this.saveCanvas(D,
+p?this.getFileData(!0,null,null,null,k,y):null,z,null==this.pages||0==this.pages.length,K)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,k,d||1,g,l,null,null,q,x,A,P,L)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,l,p,q,x){g=null!=g?g:0;k=null!=k?k:0;var y=[];try{var z=
+this.editor.graph;if(null!=d&&0<d.length){z.model.beginUpdate();try{var A=mxUtils.parseXml(d);d={};var K=this.editor.extractGraphModel(A.documentElement,null!=this.pages);if(null!=K&&"mxfile"==K.nodeName&&null!=this.pages){var P=K.getElementsByTagName("diagram");if(1==P.length&&!q){if(K=Editor.parseDiagramNode(P[0]),null!=this.currentPage&&(d[P[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var L=P[0].getAttribute("name");null!=L&&""!=L&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,L))}}else if(0<P.length){q=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[P[0].getAttribute("id")]=this.pages[0].getId(),K=Editor.parseDiagramNode(P[0]),l=!1,u=1);for(;u<P.length;u++){var D=P[u].getAttribute("id");P[u].removeAttribute("id");var B=this.updatePageRoot(new DiagramPage(P[u]));d[D]=P[u].getAttribute("id");var C=this.pages.length;null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[C+1]));z.model.execute(new ChangePage(this,B,B,C,
+!0));q.push(B)}this.updatePageLinks(d,q)}}if(null!=K&&"mxGraphModel"===K.nodeName){y=z.importGraphModel(K,g,k,l);if(null!=y)for(u=0;u<y.length;u++)this.updatePageLinksForCell(d,y[u]);var G=z.parseBackgroundImage(K.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(d,G);var N=new ChangePageSetup(this,null,G);N.ignoreColor=!0;z.model.execute(N)}}x&&this.insertHandler(y,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(I){if(p)throw I;
+this.handleError(I)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
function(d,g){var k=document.createElement("div"),l=this.editor.graph,p=l.getLinkForCell(g);null!=p&&l.setLinkForCell(g,this.updatePageLink(d,p));if(l.isHtmlLabel(g)){k.innerHTML=l.sanitizeHtml(l.getLabel(g));for(var q=k.getElementsByTagName("a"),x=!1,y=0;y<q.length;y++)p=q[y].getAttribute("href"),null!=p&&(q[y].setAttribute("href",this.updatePageLink(d,p)),x=!0);x&&l.labelChanged(g,k.innerHTML)}for(y=0;y<l.model.getChildCount(g);y++)this.updatePageLinksForCell(d,l.model.getChildAt(g,y))};EditorUi.prototype.updatePageLink=
function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var l=JSON.parse(g.substring(17));if(null!=l.actions){for(var p=0;p<l.actions.length;p++){var q=l.actions[p];if(null!=q.open&&Graph.isPageLink(q.open)){var x=q.open.substring(q.open.indexOf(",")+1);k=d[x];null!=k?q.open="data:page/id,"+k:null==this.getPageById(x)&&delete q.open}}g="data:action/json,"+JSON.stringify(l)}}catch(y){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,l,p){l=null!=l?l:d.name;k=null!=k?k:mxUtils.bind(this,function(x){this.handleError(x)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var x=this.isRemoteVisioFormat(l);try{var y="UNKNOWN-VISIO",A=l.lastIndexOf(".");if(0<=A&&A<l.length)y=l.substring(A+1).toUpperCase();else{var B=l.lastIndexOf("/");0<=
-B&&B<l.length&&(l=l.substring(B+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+l,label:x?"remote":"local"})}catch(O){}if(x)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{x=new FormData;x.append("file1",d,l);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
-null!=p&&I.setRequestHeader("x-convert-custom",p);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var O=I.response;if("text/xml"==O.type){var t=new FileReader;t.onload=mxUtils.bind(this,function(z){try{g(z.target.result)}catch(L){k({message:mxResources.get("errorLoadingFile")})}});t.readAsText(O)}else this.doImportVisio(O,g,k,l)}catch(z){k(z)}else try{""==I.responseType||"text"==I.responseType?k({message:I.responseText}):(t=new FileReader,t.onload=
-function(){k({message:JSON.parse(t.result).Message})},t.readAsText(I.response))}catch(z){k({})}});I.send(x)}else try{this.doImportVisio(d,g,k,l)}catch(O){k(O)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(p){this.handleError(p)});
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,l,p){l=null!=l?l:d.name;k=null!=k?k:mxUtils.bind(this,function(x){this.handleError(x)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var x=this.isRemoteVisioFormat(l);try{var y="UNKNOWN-VISIO",z=l.lastIndexOf(".");if(0<=z&&z<l.length)y=l.substring(z+1).toUpperCase();else{var A=l.lastIndexOf("/");0<=
+A&&A<l.length&&(l=l.substring(A+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+l,label:x?"remote":"local"})}catch(P){}if(x)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{x=new FormData;x.append("file1",d,l);var K=new XMLHttpRequest;K.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));K.responseType="blob";this.addRemoteServiceSecurityCheck(K);
+null!=p&&K.setRequestHeader("x-convert-custom",p);K.onreadystatechange=mxUtils.bind(this,function(){if(4==K.readyState)if(200<=K.status&&299>=K.status)try{var P=K.response;if("text/xml"==P.type){var L=new FileReader;L.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(D){k({message:mxResources.get("errorLoadingFile")})}});L.readAsText(P)}else this.doImportVisio(P,g,k,l)}catch(u){k(u)}else try{""==K.responseType||"text"==K.responseType?k({message:K.responseText}):(L=new FileReader,L.onload=
+function(){k({message:JSON.parse(L.result).Message})},L.readAsText(K.response))}catch(u){k({})}});K.send(x)}else try{this.doImportVisio(d,g,k,l)}catch(P){k(P)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(p){this.handleError(p)});
var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,g,k)}catch(p){k(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?l():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",l))};EditorUi.prototype.exportVisio=function(d){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(d,g,k){var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var p=
JSON.parse(d);g(LucidImporter.importState(p));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var q=[(new Date).toISOString(),"convertLucidChart",p];null!=p.state&&q.push(JSON.parse(p.state));if(null!=p.svgThumbs)for(var x=0;x<p.svgThumbs.length;x++)q.push(Editor.createSvgDataUri(p.svgThumbs[x]));null!=p.thumb&&q.push(p.thumb);console.log.apply(console,q)}}catch(y){}}catch(y){null!=window.console&&console.error(y),k(y)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(l,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",l)})})})}):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generateMermaidImage=function(d,
g,k,l){var p=this,q=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(x){try{if(mxClient.IS_IE||mxClient.IS_IE11)x=x.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var y=mxUtils.parseXml(x).getElementsByTagName("svg");
-if(0<y.length){var A=parseFloat(y[0].getAttribute("width")),B=parseFloat(y[0].getAttribute("height"));if(isNaN(A)||isNaN(B))try{var I=y[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(I[2]);B=parseFloat(I[3])}catch(O){A=A||100,B=B||100}k(p.convertDataUri(Editor.createSvgDataUri(x)),A,B)}else l({message:mxResources.get("invalidInput")})}catch(O){l(O)}})}catch(x){l(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,l){function p(y,A,B){c1=y>>2;c2=(y&3)<<4|A>>4;c3=(A&15)<<2|B>>6;c4=B&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var x=new XMLHttpRequest;x.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(B){var I=new Image;I.onload=
-function(){try{var O=I.width,t=I.height;if(0==O&&0==t){var z=A.result,L=z.indexOf(","),C=decodeURIComponent(escape(atob(z.substring(L+1)))),E=mxUtils.parseXml(C).getElementsByTagName("svg");0<E.length&&(O=parseFloat(E[0].getAttribute("width")),t=parseFloat(E[0].getAttribute("height")))}k(A.result,O,t)}catch(G){l(G)}};I.src=A.result};A.onerror=function(B){l(B)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();
-try{p=l.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(d,g,k,l,p,q,x,y){q=null!=q?q:!0;x=null!=x?x:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(t){4==
-t.readyState&&200<=t.status&&299>=t.status&&this.editor.graph.setSelectionCells(this.insertTextAt(t.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var A=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var B=Editor.extractGraphModelFromPdf(d);if(null!=B&&0<B.length)return this.importXml(B,g,k,q,!0,y)}if(Editor.isPngDataUrl(d)&&(B=Editor.extractGraphModelFromPng(d),null!=B&&0<B.length))return this.importXml(B,
-g,k,q,!0,y);if("data:image/svg+xml;"==d.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(B=d.substring(d.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(d.substring(d.indexOf(",")+1));var I=this.importXml(B,g,k,q,!0,y);if(0<I.length)return I}catch(t){}this.loadImage(d,mxUtils.bind(this,function(t){if("data:"==d.substring(0,5))this.resizeImage(t,d,mxUtils.bind(this,function(C,E,G){A.setSelectionCell(A.insertVertex(null,null,
-"",A.snap(g),A.snap(k),E,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(C)+";"))}),x,this.maxImageSize);else{var z=Math.min(1,Math.min(this.maxImageSize/t.width,this.maxImageSize/t.height)),L=Math.round(t.width*z);t=Math.round(t.height*z);A.setSelectionCell(A.insertVertex(null,null,"",A.snap(g),A.snap(k),L,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var t=null;A.getModel().beginUpdate();try{t=A.insertVertex(A.getDefaultParent(),null,d,A.snap(g),A.snap(k),1,1,"text;"+(l?"html=1;":"")),A.updateCellSize(t),A.fireEvent(new mxEventObject("textInserted","cells",[t]))}finally{A.getModel().endUpdate()}A.setSelectionCell(t)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,q,null,y);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(t){this.editor.graph.setSelectionCells(this.importXml(t,g,k,q,null,y))}),mxUtils.bind(this,function(t){this.handleError(t)}));else{A=this.editor.graph;p=null;A.getModel().beginUpdate();try{p=A.insertVertex(A.getDefaultParent(),null,"",A.snap(g),A.snap(k),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));A.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");p.value=d;A.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var O=A.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=O.width;p.geometry.height=O.height}Graph.isLink(p.value)&&A.setLinkForCell(p,p.value);p.geometry.width+=A.gridSize;p.geometry.height+=A.gridSize}finally{A.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
+if(0<y.length){var z=parseFloat(y[0].getAttribute("width")),A=parseFloat(y[0].getAttribute("height"));if(isNaN(z)||isNaN(A))try{var K=y[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(K[2]);A=parseFloat(K[3])}catch(P){z=z||100,A=A||100}k(p.convertDataUri(Editor.createSvgDataUri(x)),z,A)}else l({message:mxResources.get("invalidInput")})}catch(P){l(P)}})}catch(x){l(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,l){function p(y,z,A){c1=y>>2;c2=(y&3)<<4|z>>4;c3=(z&15)<<2|A>>6;c4=A&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var x=new XMLHttpRequest;x.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(A){var K=new Image;K.onload=
+function(){try{var P=K.width,L=K.height;if(0==P&&0==L){var u=z.result,D=u.indexOf(","),B=decodeURIComponent(escape(atob(u.substring(D+1)))),C=mxUtils.parseXml(B).getElementsByTagName("svg");0<C.length&&(P=parseFloat(C[0].getAttribute("width")),L=parseFloat(C[0].getAttribute("height")))}k(z.result,P,L)}catch(G){l(G)}};K.src=z.result};z.onerror=function(A){l(A)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();
+try{p=l.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(d,g,k,l,p,q,x,y){q=null!=q?q:!0;x=null!=x?x:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(L){4==
+L.readyState&&200<=L.status&&299>=L.status&&this.editor.graph.setSelectionCells(this.insertTextAt(L.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var z=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var A=Editor.extractGraphModelFromPdf(d);if(null!=A&&0<A.length)return this.importXml(A,g,k,q,!0,y)}if(Editor.isPngDataUrl(d)&&(A=Editor.extractGraphModelFromPng(d),null!=A&&0<A.length))return this.importXml(A,
+g,k,q,!0,y);if("data:image/svg+xml;"==d.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(A=d.substring(d.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(d.substring(d.indexOf(",")+1));var K=this.importXml(A,g,k,q,!0,y);if(0<K.length)return K}catch(L){}this.loadImage(d,mxUtils.bind(this,function(L){if("data:"==d.substring(0,5))this.resizeImage(L,d,mxUtils.bind(this,function(B,C,G){z.setSelectionCell(z.insertVertex(null,null,
+"",z.snap(g),z.snap(k),C,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(B)+";"))}),x,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/L.width,this.maxImageSize/L.height)),D=Math.round(L.width*u);L=Math.round(L.height*u);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(g),z.snap(k),D,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var L=null;z.getModel().beginUpdate();try{L=z.insertVertex(z.getDefaultParent(),null,d,z.snap(g),z.snap(k),1,1,"text;"+(l?"html=1;":"")),z.updateCellSize(L),z.fireEvent(new mxEventObject("textInserted","cells",[L]))}finally{z.getModel().endUpdate()}z.setSelectionCell(L)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,q,null,y);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(L){this.editor.graph.setSelectionCells(this.importXml(L,g,k,q,null,y))}),mxUtils.bind(this,function(L){this.handleError(L)}));else{z=this.editor.graph;p=null;z.getModel().beginUpdate();try{p=z.insertVertex(z.getDefaultParent(),null,"",z.snap(g),z.snap(k),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");p.value=d;z.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var P=z.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=P.width;p.geometry.height=P.height}Graph.isLink(p.value)&&z.setLinkForCell(p,p.value);p.geometry.width+=z.gridSize;p.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==
this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(x,y){StorageFile.listFiles(this,
-"F",x,y)});window.openBrowserFile=mxUtils.bind(this,function(x,y,A){StorageFile.getFileContent(this,x,y,A)});window.deleteBrowserFile=mxUtils.bind(this,function(x,y,A){StorageFile.deleteFile(this,x,y,A)});if(!g){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(x){this.hideDialog(x)}));window.openFile.setConsumer(mxUtils.bind(this,function(x,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(x=new Blob([x],{type:"application/octet-stream"}),
-this.importVisio(x,mxUtils.bind(this,function(A){this.importXml(A,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(x,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=l;q.apply(p,arguments);x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,g,k){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(q){if(mxUtils.isEmptyObject(q.files))k();else{var x=0,y,A=!1;q.forEach(function(B,I){B=I.name.toLowerCase();"diagram/diagram.xml"==B?(A=!0,I.async("string").then(function(O){0==O.indexOf("<mxfile ")?g(O):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>x&&(x=B,y=I))});0<x?y.async("string").then(function(B){(new XMLHttpRequest).upload&&
-l.isRemoteFileFormat(B,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):l.parseFileData(B,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?g(I.responseText):k())}),d.name):k()}):A||k()}},function(q){k(q)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(d,g,k,l,p,q,x,y,A,B,I,O){B=null!=
-B?B:!0;var t=!1,z=null,L=mxUtils.bind(this,function(C){var E=null;null!=C&&"<mxlibrary"==C.substring(0,10)?this.loadLibrary(new LocalLibrary(this,C,x)):E=this.importXml(C,k,l,B,null,null!=O?mxEvent.isControlDown(O):null);null!=y&&y(E)});"image"==g.substring(0,5)?(A=!1,"image/png"==g.substring(0,9)&&(g=I?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(z=this.importXml(g,k,l,B,null,null!=O?mxEvent.isControlDown(O):null),A=!0)),A||(g=this.editor.graph,A=d.indexOf(";"),0<A&&(d=d.substring(0,
-A)+d.substring(d.indexOf(",",A+1))),B&&g.isGridEnabled()&&(k=g.snap(k),l=g.snap(l)),z=[g.insertVertex(null,null,"",k,l,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(t=!0,this.importGraphML(d,L)):null!=A&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(t=!0,this.importVisio(A,L)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(t=!0,p=mxUtils.bind(this,function(C){4==C.readyState&&(200<=C.status&&299>=C.status?L(C.responseText):null!=y&&y(null))}),null!=d?this.parseFileData(d,p,x):this.parseFile(A,p,x)):0==d.indexOf("PK")&&null!=A?(t=!0,this.importZipFile(A,L,mxUtils.bind(this,function(){z=this.insertTextAt(this.validateFileData(d),k,l,!0,null,B);y(z)}))):/(\.v(sd|dx))($|\?)/i.test(x)||/(\.vs(s|x))($|\?)/i.test(x)||(z=this.insertTextAt(this.validateFileData(d),
-k,l,!0,null,B,null,null!=O?mxEvent.isControlDown(O):null));t||null==y||y(z);return z};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,A,B,I,O,t){l=null!=l?l:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var z=null!=g&&null!=k,L=!0;g=null!=g?g:0;k=null!=k?k:0;var C=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var E=I||this.resampleThreshold,G=0;G<d.length;G++)if("image/svg"!==d[G].type.substring(0,9)&&"image/"===d[G].type.substring(0,6)&&d[G].size>E){C=!0;break}var P=mxUtils.bind(this,function(){var J=
-this.editor.graph,F=J.gridSize;p=null!=p?p:mxUtils.bind(this,function(U,X,u,D,K,T,N,Q,R){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,N)),null):this.importFile(U,X,u,D,K,T,N,Q,R,z,O,t)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(U){J.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=d.length,S=H,V=[],M=mxUtils.bind(this,function(U,X){V[U]=X;if(0==
---S){this.spinner.stop();if(null!=y)y(V);else{var u=[];J.getModel().beginUpdate();try{for(U=0;U<V.length;U++){var D=V[U]();null!=D&&(u=u.concat(D))}}finally{J.getModel().endUpdate()}}q(u)}}),W=0;W<H;W++)mxUtils.bind(this,function(U){var X=d[U];if(null!=X){var u=new FileReader;u.onload=mxUtils.bind(this,function(D){if(null==x||x(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var K=Graph.clipSvgDataUri(D.target.result),T=K.indexOf(",");T=decodeURIComponent(escape(atob(K.substring(T+
-1))));var N=mxUtils.parseXml(T);T=N.getElementsByTagName("svg");if(0<T.length){T=T[0];var Q=O?null:T.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?M(U,mxUtils.bind(this,function(){try{if(null!=N){var ba=N.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],Z=ea.getAttribute("width"),fa=ea.getAttribute("height");
-Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;var aa=ea.getAttribute("viewBox");if(null==aa||0==aa.length)ea.setAttribute("viewBox","0 0 "+Z+" "+fa);else if(isNaN(Z)||isNaN(fa)){var va=aa.split(" ");3<va.length&&(Z=parseFloat(va[2]),fa=parseFloat(va[3]))}K=Editor.createSvgDataUri(mxUtils.getXml(ea));var ja=Math.min(1,Math.min(l/Math.max(1,Z)),l/Math.max(1,fa)),Ba=p(K,X.type,g+U*F,k+U*F,Math.max(1,Math.round(Z*ja)),Math.max(1,Math.round(fa*
-ja)),X.name);if(isNaN(Z)||isNaN(fa)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Z=Math.max(1,Da.width);fa=Math.max(1,Da.height);Ba[0].geometry.width=Z;Ba[0].geometry.height=fa;ea.setAttribute("viewBox","0 0 "+Z+" "+fa);K=Editor.createSvgDataUri(mxUtils.getXml(ea));var qa=K.indexOf(";");0<qa&&(K=K.substring(0,qa)+K.substring(K.indexOf(",",qa+1)));J.setCellStyles("image",K,[Ba[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Ba}}}catch(qa){}return null})):M(U,mxUtils.bind(this,
-function(){return p(Q,"text/xml",g+U*F,k+U*F,0,0,X.name)}))}else M(U,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var R=O?null:this.extractGraphModelFromPng(D.target.result);if(null!=R&&0<R.length){var Y=new Image;Y.src=D.target.result;M(U,mxUtils.bind(this,function(){return p(R,"text/xml",g+U*F,k+U*F,Y.width,Y.height,X.name)}));T=!0}}T||(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(D.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,D.target.result,mxUtils.bind(this,function(ea,Z,fa){M(U,mxUtils.bind(this,function(){if(null!=ea&&ea.length<B){var aa=L&&this.isResampleImageSize(X.size,I)?Math.min(1,Math.min(l/Z,l/fa)):1;return p(ea,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),L,l,I,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else K=D.target.result,p(K,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){M(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(D){M(U,function(){return D})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?u.readAsDataURL(X):u.readAsText(X)}})(W)});if(C){C=
-[];for(G=0;G<d.length;G++)C.push(d[G]);d=C;this.confirmImageResize(function(J){L=J;P()},A)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+"F",x,y)});window.openBrowserFile=mxUtils.bind(this,function(x,y,z){StorageFile.getFileContent(this,x,y,z)});window.deleteBrowserFile=mxUtils.bind(this,function(x,y,z){StorageFile.deleteFile(this,x,y,z)});if(!g){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(x){this.hideDialog(x)}));window.openFile.setConsumer(mxUtils.bind(this,function(x,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(x=new Blob([x],{type:"application/octet-stream"}),
+this.importVisio(x,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(x,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=l;q.apply(p,arguments);x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,g,k){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(q){if(mxUtils.isEmptyObject(q.files))k();else{var x=0,y,z=!1;q.forEach(function(A,K){A=K.name.toLowerCase();"diagram/diagram.xml"==A?(z=!0,K.async("string").then(function(P){0==P.indexOf("<mxfile ")?g(P):k()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>x&&(x=A,y=K))});0<x?y.async("string").then(function(A){(new XMLHttpRequest).upload&&
+l.isRemoteFileFormat(A,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):l.parseFileData(A,mxUtils.bind(this,function(K){4==K.readyState&&(200<=K.status&&299>=K.status?g(K.responseText):k())}),d.name):k()}):z||k()}},function(q){k(q)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(d,g,k,l,p,q,x,y,z,A,K,P){A=null!=
+A?A:!0;var L=!1,u=null,D=mxUtils.bind(this,function(B){var C=null;null!=B&&"<mxlibrary"==B.substring(0,10)?this.loadLibrary(new LocalLibrary(this,B,x)):C=this.importXml(B,k,l,A,null,null!=P?mxEvent.isControlDown(P):null);null!=y&&y(C)});"image"==g.substring(0,5)?(z=!1,"image/png"==g.substring(0,9)&&(g=K?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,l,A,null,null!=P?mxEvent.isControlDown(P):null),z=!0)),z||(g=this.editor.graph,z=d.indexOf(";"),0<z&&(d=d.substring(0,
+z)+d.substring(d.indexOf(",",z+1))),A&&g.isGridEnabled()&&(k=g.snap(k),l=g.snap(l)),u=[g.insertVertex(null,null,"",k,l,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(L=!0,this.importGraphML(d,D)):null!=z&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(L=!0,this.importVisio(z,D)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(L=!0,p=mxUtils.bind(this,function(B){4==B.readyState&&(200<=B.status&&299>=B.status?D(B.responseText):null!=y&&y(null))}),null!=d?this.parseFileData(d,p,x):this.parseFile(z,p,x)):0==d.indexOf("PK")&&null!=z?(L=!0,this.importZipFile(z,D,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,l,!0,null,A);y(u)}))):/(\.v(sd|dx))($|\?)/i.test(x)||/(\.vs(s|x))($|\?)/i.test(x)||(u=this.insertTextAt(this.validateFileData(d),
+k,l,!0,null,A,null,null!=P?mxEvent.isControlDown(P):null));L||null==y||y(u);return u};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,z,A,K,P,L){l=null!=l?l:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var u=null!=g&&null!=k,D=!0;g=null!=g?g:0;k=null!=k?k:0;var B=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var C=K||this.resampleThreshold,G=0;G<d.length;G++)if("image/svg"!==d[G].type.substring(0,9)&&"image/"===d[G].type.substring(0,6)&&d[G].size>C){B=!0;break}var N=mxUtils.bind(this,function(){var I=
+this.editor.graph,F=I.gridSize;p=null!=p?p:mxUtils.bind(this,function(U,X,t,E,M,T,O,Q,S){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,O)),null):this.importFile(U,X,t,E,M,T,O,Q,S,u,P,L)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(U){I.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=d.length,R=H,W=[],J=mxUtils.bind(this,function(U,X){W[U]=X;if(0==
+--R){this.spinner.stop();if(null!=y)y(W);else{var t=[];I.getModel().beginUpdate();try{for(U=0;U<W.length;U++){var E=W[U]();null!=E&&(t=t.concat(E))}}finally{I.getModel().endUpdate()}}q(t)}}),V=0;V<H;V++)mxUtils.bind(this,function(U){var X=d[U];if(null!=X){var t=new FileReader;t.onload=mxUtils.bind(this,function(E){if(null==x||x(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var M=Graph.clipSvgDataUri(E.target.result),T=M.indexOf(",");T=decodeURIComponent(escape(atob(M.substring(T+
+1))));var O=mxUtils.parseXml(T);T=O.getElementsByTagName("svg");if(0<T.length){T=T[0];var Q=P?null:T.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?J(U,mxUtils.bind(this,function(){try{if(null!=O){var ba=O.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],Z=ea.getAttribute("width"),fa=ea.getAttribute("height");
+Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;var aa=ea.getAttribute("viewBox");if(null==aa||0==aa.length)ea.setAttribute("viewBox","0 0 "+Z+" "+fa);else if(isNaN(Z)||isNaN(fa)){var va=aa.split(" ");3<va.length&&(Z=parseFloat(va[2]),fa=parseFloat(va[3]))}M=Editor.createSvgDataUri(mxUtils.getXml(ea));var ja=Math.min(1,Math.min(l/Math.max(1,Z)),l/Math.max(1,fa)),Ba=p(M,X.type,g+U*F,k+U*F,Math.max(1,Math.round(Z*ja)),Math.max(1,Math.round(fa*
+ja)),X.name);if(isNaN(Z)||isNaN(fa)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Z=Math.max(1,Da.width);fa=Math.max(1,Da.height);Ba[0].geometry.width=Z;Ba[0].geometry.height=fa;ea.setAttribute("viewBox","0 0 "+Z+" "+fa);M=Editor.createSvgDataUri(mxUtils.getXml(ea));var qa=M.indexOf(";");0<qa&&(M=M.substring(0,qa)+M.substring(M.indexOf(",",qa+1)));I.setCellStyles("image",M,[Ba[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Ba}}}catch(qa){}return null})):J(U,mxUtils.bind(this,
+function(){return p(Q,"text/xml",g+U*F,k+U*F,0,0,X.name)}))}else J(U,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var S=P?null:this.extractGraphModelFromPng(E.target.result);if(null!=S&&0<S.length){var Y=new Image;Y.src=E.target.result;J(U,mxUtils.bind(this,function(){return p(S,"text/xml",g+U*F,k+U*F,Y.width,Y.height,X.name)}));T=!0}}T||(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(E.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,E.target.result,mxUtils.bind(this,function(ea,Z,fa){J(U,mxUtils.bind(this,function(){if(null!=ea&&ea.length<A){var aa=D&&this.isResampleImageSize(X.size,K)?Math.min(1,Math.min(l/Z,l/fa)):1;return p(ea,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),D,l,K,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else M=E.target.result,p(M,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){J(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(E){J(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?t.readAsDataURL(X):t.readAsText(X)}})(V)});if(B){B=
+[];for(G=0;G<d.length;G++)B.push(d[G]);d=B;this.confirmImageResize(function(I){D=I;N()},z)}else N()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,p=function(q,x){if(q||g)mxSettings.setResizeImages(q?x:null),mxSettings.save();k();d(x)};null==l||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
!0,!0):p(!1,l)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,g,k)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){g(l)};l.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),A=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var B=Math.max(y/p,A/p);if(1<B){var I=Math.round(y/B),O=Math.round(A/B),t=document.createElement("canvas");t.width=I;t.height=O;t.getContext("2d").drawImage(d,0,0,I,O);var z=
-t.toDataURL();if(z.length<g.length){var L=document.createElement("canvas");L.width=I;L.height=O;var C=L.toDataURL();z!==C&&(g=z,y=I,A=O)}}}catch(E){}k(g,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
+action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),z=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var A=Math.max(y/p,z/p);if(1<A){var K=Math.round(y/A),P=Math.round(z/A),L=document.createElement("canvas");L.width=K;L.height=P;L.getContext("2d").drawImage(d,0,0,K,P);var u=
+L.toDataURL();if(u.length<g.length){var D=document.createElement("canvas");D.width=K;D.height=P;var B=D.toDataURL();u!==B&&(g=u,y=K,z=P)}}}catch(C){}k(g,y,z)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var m=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
-mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Editor.isDarkMode()&&(g.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(E){var G=E.getEvent();return null==E.getState()&&!mxEvent.isMouseEvent(G)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==E.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});g.cellEditor.editPlantUmlData=function(E,
-G,P){var J=JSON.parse(P);G=new TextareaDialog(d,mxResources.get("plantUml")+":",J.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(F,J.format,function(H,S,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==J.format)g.labelChanged(E,"<pre>"+H+"</pre>"),g.updateCellSize(E,!0);else{g.setCellStyles("image",d.convertDataUri(H),[E]);var M=g.model.getGeometry(E);null!=M&&(M=M.clone(),M.width=S,M.height=V,g.cellsResized([E],[M],!1))}g.setAttributeForCell(E,
-"plantUmlData",JSON.stringify({data:F,format:J.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(E,G,P){var J=JSON.parse(P);G=new TextareaDialog(d,mxResources.get("mermaid")+":",J.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,J.config,function(H,S,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
-H,[E]);var M=g.model.getGeometry(E);null!=M&&(M=M.clone(),M.width=Math.max(M.width,S),M.height=Math.max(M.height,V),g.cellsResized([E],[M],!1));g.setAttributeForCell(E,"mermaidData",JSON.stringify({data:F,config:J.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(E,G){try{var P=this.graph.getAttributeForCell(E,"plantUmlData");if(null!=
-P)this.editPlantUmlData(E,G,P);else if(P=this.graph.getAttributeForCell(E,"mermaidData"),null!=P)this.editMermaidData(E,G,P);else{var J=g.getCellStyle(E);"1"==mxUtils.getValue(J,"metaEdit","0")?d.showDataDialog(E):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(E){return d.getLinkTitle(E)};g.customLinkClicked=function(E){var G=!1;try{d.handleCustomLink(E),G=!0}catch(P){d.handleError(P)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(E){var G=l.apply(this,
-arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(E){null!=E&&null!=E.originalSrc&&(E=d.createImageForPageLink(E.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
-mxUtils.bind(this,function(E,G){E=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=E){var P=E.indexOf(",");if(0<P)for(E=E.substring(P+1),G=G.getProperty("patches"),P=0;P<G.length;P++)if(null!=G[P][EditorUi.DIFF_UPDATE]&&null!=G[P][EditorUi.DIFF_UPDATE][E]||null!=G[P][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[P][EditorUi.DIFF_REMOVE],E)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(E,G){var P=q.apply(this,arguments);
-if(null!=P&&null!=P.originalSrc)if(!G)P={src:P.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,F=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";P=d.createImageForPageLink(P.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=F;this.stylesheet=J}return P};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.apply(this,
-arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var y=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(E){E=null!=E?E:"";"1"==urlParams.dev&&(E+=(0<E.length?"&":"?")+"dev=1");return y.apply(this,arguments)};
-var A=g.addClickHandler;g.addClickHandler=function(E,G,P){var J=G;G=function(F,H){if(null==H){var S=mxEvent.getSource(F);"a"==S.nodeName.toLowerCase()&&(H=S.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=J&&J(F,H)};A.call(this,E,G,P)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;
-this.menus.addPopupMenuEditItems=function(E,G,P){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(E,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=g.getExportVariables;g.getExportVariables=function(){var E=I.apply(this,arguments),G=d.getCurrentFile();null!=
-G&&(E.filename=G.getTitle());E.pagecount=null!=d.pages?d.pages.length:1;E.page=null!=d.currentPage?d.currentPage.getName():"";E.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return E};var O=g.getGlobalVariable;g.getGlobalVariable=function(E){var G=d.getCurrentFile();return"filename"==E&&null!=G?G.getTitle():"page"==E&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==E?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
-"pagecount"==E?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var t=g.labelLinkClicked;g.labelLinkClicked=function(E,G,P){var J=G.getAttribute("href");if(null==J||!g.isCustomLink(J)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!g.isEnabled()||null!=E&&g.isCellLocked(E.cell))g.customLinkClicked(J),g.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var E=d.defaultFilename,G=d.getCurrentFile();null!=G&&(E=null!=G.getTitle()?
-G.getTitle():E);return E};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,
-!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(E){var G=g.cellEditor.text2,P=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(J){null!=P&&(P.parentNode.removeChild(P),P=null);J.stopPropagation();
-J.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(J){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=this.highlightElement(G));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){null!=P&&(P.parentNode.removeChild(P),P=null);if(0<J.dataTransfer.files.length)this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,function(H,S,V,M,W,U){g.insertImage(H,W,U)},function(){},function(H){return"image/"==H.type.substring(0,
-6)},function(H){for(var S=0;S<H.length;S++)H[S]()},mxEvent.isControlDown(J));else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")){var F=J.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(H){var S=Math.max(1,H.width);H=Math.max(1,H.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,S)),V/Math.max(1,H));g.insertImage(decodeURIComponent(F),S*V,H*V)})):document.execCommand("insertHTML",
-!1,J.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(J.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(J.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/plain"));J.stopPropagation();J.preventDefault()})))}));this.isSettingsEnabled()&&(z=this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(E,G){mxSettings.setUnit(G.getProperty("unit"));
-mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(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)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,G){0<this.editor.graph.getSelectionCount()?(E=this.editor.graph.getSelectionCell(),
-E=this.editor.graph.getModel().getStyle(E),this.styleInput.value=E||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(E){return mxEvent.getSource(E)==this.styleInput?!0:L.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(g.container,"dragleave",function(E){g.isEnabled()&&
-(null!=C&&(C.parentNode.removeChild(C),C=null),E.stopPropagation(),E.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(E){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();E.stopPropagation();E.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(E){null!=C&&(C.parentNode.removeChild(C),C=null);if(g.isEnabled()){var G=mxUtils.convertPoint(g.container,
-mxEvent.getClientX(E),mxEvent.getClientY(E)),P=E.dataTransfer.files,J=g.view.translate,F=g.view.scale,H=G.x/F-J.x,S=G.y/F-J.y;if(0<P.length)G=1==P.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===P[0].type.substring(0,9)||"image/"!==P[0].type.substring(0,6)||/(\.drawio.png)$/i.test(P[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(E)||G)?(!mxEvent.isShiftDown(E)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(P,!0)):(mxEvent.isAltDown(E)&&(S=H=null),this.importFiles(P,
-H,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(E),null,null,mxEvent.isShiftDown(E),E));else{mxEvent.isAltDown(E)&&(S=H=0);var V=0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")?E.dataTransfer.getData("text/uri-list"):null;P=this.extractGraphModelFromEvent(E,null!=this.pages);if(null!=P)g.setSelectionCells(this.importXml(P,H,S,!0));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")){var M=E.dataTransfer.getData("text/html");P=document.createElement("div");P.innerHTML=
-g.sanitizeHtml(M);var W=null;G=P.getElementsByTagName("img");null!=G&&1==G.length?(M=G[0].getAttribute("src"),null==M&&(M=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)||(W=!0)):(G=P.getElementsByTagName("a"),null!=G&&1==G.length?M=G[0].getAttribute("href"):(P=P.getElementsByTagName("pre"),null!=P&&1==P.length&&(M=mxUtils.getTextContent(P[0]))));var U=!0,X=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(M,H,S,!0,W,null,U,mxEvent.isControlDown(E)))});W&&null!=
-M&&M.length>this.resampleThreshold?this.confirmImageResize(function(u){U=u;X()},mxEvent.isControlDown(E)):X()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(u){var D=Math.max(1,u.width);u=Math.max(1,u.height);var K=this.maxImageSize;K=Math.min(1,Math.min(K/Math.max(1,D)),K/Math.max(1,u));g.setSelectionCell(g.insertVertex(null,null,"",H,S,D*K,u*K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-V+";"))}),mxUtils.bind(this,function(u){g.setSelectionCells(this.insertTextAt(V,H,S,!0))})):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(E.dataTransfer.getData("text/plain"),H,S,!0))}}E.stopPropagation();E.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(A,B,I,O,t,z){d.insertImage(A,t,z)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var B=0;B<A.length;B++)A[B]()});else{var y=
-this.editor.graph.getInsertPoint();this.importFiles([x.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
+mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Editor.isDarkMode()&&(g.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(C){var G=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(G)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==C.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});g.cellEditor.editPlantUmlData=function(C,
+G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("plantUml")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(F,I.format,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==I.format)g.labelChanged(C,"<pre>"+H+"</pre>"),g.updateCellSize(C,!0);else{g.setCellStyles("image",d.convertDataUri(H),[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=R,J.height=W,g.cellsResized([C],[J],!1))}g.setAttributeForCell(C,
+"plantUmlData",JSON.stringify({data:F,format:I.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(C,G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("mermaid")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,I.config,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
+H,[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=Math.max(J.width,R),J.height=Math.max(J.height,W),g.cellsResized([C],[J],!1));g.setAttributeForCell(C,"mermaidData",JSON.stringify({data:F,config:I.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(C,G){try{var N=this.graph.getAttributeForCell(C,"plantUmlData");if(null!=
+N)this.editPlantUmlData(C,G,N);else if(N=this.graph.getAttributeForCell(C,"mermaidData"),null!=N)this.editMermaidData(C,G,N);else{var I=g.getCellStyle(C);"1"==mxUtils.getValue(I,"metaEdit","0")?d.showDataDialog(C):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(C){return d.getLinkTitle(C)};g.customLinkClicked=function(C){var G=!1;try{d.handleCustomLink(C),G=!0}catch(N){d.handleError(N)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(C){var G=l.apply(this,
+arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(C){null!=C&&null!=C.originalSrc&&(C=d.createImageForPageLink(C.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
+mxUtils.bind(this,function(C,G){C=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=C){var N=C.indexOf(",");if(0<N)for(C=C.substring(N+1),G=G.getProperty("patches"),N=0;N<G.length;N++)if(null!=G[N][EditorUi.DIFF_UPDATE]&&null!=G[N][EditorUi.DIFF_UPDATE][C]||null!=G[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[N][EditorUi.DIFF_REMOVE],C)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(C,G){var N=q.apply(this,arguments);
+if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var I=this.stylesheet,F=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=d.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=F;this.stylesheet=I}return N};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.apply(this,
+arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var y=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(C){C=null!=C?C:"";"1"==urlParams.dev&&(C+=(0<C.length?"&":"?")+"dev=1");return y.apply(this,arguments)};
+var z=g.addClickHandler;g.addClickHandler=function(C,G,N){var I=G;G=function(F,H){if(null==H){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(H=R.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=I&&I(F,H)};z.call(this,C,G,N)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;
+this.menus.addPopupMenuEditItems=function(C,G,N){d.editor.graph.isSelectionEmpty()?A.apply(this,arguments):d.menus.addMenuItems(C,"delete - cut copy copyAsImage - duplicate".split(" "),null,N)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var K=g.getExportVariables;g.getExportVariables=function(){var C=K.apply(this,arguments),G=d.getCurrentFile();null!=
+G&&(C.filename=G.getTitle());C.pagecount=null!=d.pages?d.pages.length:1;C.page=null!=d.currentPage?d.currentPage.getName():"";C.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return C};var P=g.getGlobalVariable;g.getGlobalVariable=function(C){var G=d.getCurrentFile();return"filename"==C&&null!=G?G.getTitle():"page"==C&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==C?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
+"pagecount"==C?null!=d.pages?d.pages.length:1:P.apply(this,arguments)};var L=g.labelLinkClicked;g.labelLinkClicked=function(C,G,N){var I=G.getAttribute("href");if(null==I||!g.isCustomLink(I)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))L.apply(this,arguments);else{if(!g.isEnabled()||null!=C&&g.isCellLocked(C.cell))g.customLinkClicked(I),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var C=d.defaultFilename,G=d.getCurrentFile();null!=G&&(C=null!=G.getTitle()?
+G.getTitle():C);return C};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,
+!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(C){var G=g.cellEditor.text2,N=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(I){null!=N&&(N.parentNode.removeChild(N),N=null);I.stopPropagation();
+I.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(I){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(G));I.stopPropagation();I.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(I){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,0,0,this.maxImageSize,function(H,R,W,J,V,U){g.insertImage(H,V,U)},function(){},function(H){return"image/"==H.type.substring(0,
+6)},function(H){for(var R=0;R<H.length;R++)H[R]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var F=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(H){var R=Math.max(1,H.width);H=Math.max(1,H.height);var W=this.maxImageSize;W=Math.min(1,Math.min(W/Math.max(1,R)),W/Math.max(1,H));g.insertImage(decodeURIComponent(F),R*W,H*W)})):document.execCommand("insertHTML",
+!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(C,G){mxSettings.setUnit(G.getProperty("unit"));
+mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left=
+"2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,G){0<this.editor.graph.getSelectionCount()?(C=this.editor.graph.getSelectionCell(),
+C=this.editor.graph.getModel().getStyle(C),this.styleInput.value=C||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==this.styleInput?!0:D.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(g.container,"dragleave",function(C){g.isEnabled()&&
+(null!=B&&(B.parentNode.removeChild(B),B=null),C.stopPropagation(),C.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(C){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(C){null!=B&&(B.parentNode.removeChild(B),B=null);if(g.isEnabled()){var G=mxUtils.convertPoint(g.container,
+mxEvent.getClientX(C),mxEvent.getClientY(C)),N=C.dataTransfer.files,I=g.view.translate,F=g.view.scale,H=G.x/F-I.x,R=G.y/F-I.y;if(0<N.length)G=1==N.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===N[0].type.substring(0,9)||"image/"!==N[0].type.substring(0,6)||/(\.drawio.png)$/i.test(N[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(C)||G)?(!mxEvent.isShiftDown(C)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(C)&&(R=H=null),this.importFiles(N,
+H,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(C),null,null,mxEvent.isShiftDown(C),C));else{mxEvent.isAltDown(C)&&(R=H=0);var W=0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")?C.dataTransfer.getData("text/uri-list"):null;N=this.extractGraphModelFromEvent(C,null!=this.pages);if(null!=N)g.setSelectionCells(this.importXml(N,H,R,!0));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/html")){var J=C.dataTransfer.getData("text/html");N=document.createElement("div");N.innerHTML=
+g.sanitizeHtml(J);var V=null;G=N.getElementsByTagName("img");null!=G&&1==G.length?(J=G[0].getAttribute("src"),null==J&&(J=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(J)||(V=!0)):(G=N.getElementsByTagName("a"),null!=G&&1==G.length?J=G[0].getAttribute("href"):(N=N.getElementsByTagName("pre"),null!=N&&1==N.length&&(J=mxUtils.getTextContent(N[0]))));var U=!0,X=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(J,H,R,!0,V,null,U,mxEvent.isControlDown(C)))});V&&null!=
+J&&J.length>this.resampleThreshold?this.confirmImageResize(function(t){U=t;X()},mxEvent.isControlDown(C)):X()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(t){var E=Math.max(1,t.width);t=Math.max(1,t.height);var M=this.maxImageSize;M=Math.min(1,Math.min(M/Math.max(1,E)),M/Math.max(1,t));g.setSelectionCell(g.insertVertex(null,null,"",H,R,E*M,t*M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+W+";"))}),mxUtils.bind(this,function(t){g.setSelectionCells(this.insertTextAt(W,H,R,!0))})):0<=mxUtils.indexOf(C.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(C.dataTransfer.getData("text/plain"),H,R,!0))}}C.stopPropagation();C.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
+mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(z,A,K,P,L,u){d.insertImage(z,L,u)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var A=0;A<z.length;A++)z[A]()});else{var y=
+this.editor.graph.getInsertPoint();this.importFiles([x.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
"false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var l=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(q){var x=mxEvent.getSource(q);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==x.nodeName||"TEXTAREA"==x.nodeName||224!=q.keyCode&&(mxClient.IS_MAC||17!=q.keyCode)&&(!mxClient.IS_MAC||91!=q.keyCode&&93!=q.keyCode)||l||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",
g.container.appendChild(k),l=!0,k.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(q){var x=q.keyCode;window.setTimeout(mxUtils.bind(this,function(){!l||224!=x&&17!=x&&91!=x&&93!=x||(l=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(q){if(g.isEnabled())try{mxClipboard.copy(g),
@@ -11987,15 +11988,15 @@ mxUtils.bind(this,function(d,g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(l,p){try{this.spinner.stop();var q=this.createImageDataUri(l,g,"png"),x=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height"));this.writeImageToClipboard(q,x,y,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(l,p){try{this.spinner.stop();var q=this.createImageDataUri(l,g,"png"),x=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height"));this.writeImageToClipboard(q,x,y,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,l){var p=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerHTML="";else{var l=
mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),p=mxUtils.getXml(k.encodeCells(l));mxUtils.setTextContent(d,encodeURIComponent(p));g?(k.removeCells(l,!1),k.lastPasteXml=null):(k.lastPasteXml=p,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),
g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,l){var p=this.editor.graph,q=null;p.lastPasteXml==d?p.pasteCounter++:(p.lastPasteXml=d,p.pasteCounter=0);var x=p.pasteCounter*p.gridSize;if(k||this.isCompatibleString(d))q=this.importXml(d,x,x),p.setSelectionCells(q);else if(g&&1==p.getSelectionCount()){x=p.getStartEditingCell(p.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==p.getCurrentCellStyle(x)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,
d,[x]);else{p.model.beginUpdate();try{p.labelChanged(x,d),Graph.isLink(d)&&p.setLinkForCell(x,d)}finally{p.model.endUpdate()}}p.setSelectionCell(x)}else q=p.getInsertPoint(),p.isMouseInsertPoint()&&(x=0,p.lastPasteXml==d&&0<p.pasteCounter&&p.pasteCounter--),q=this.insertTextAt(d,q.x+x,q.y+x,!0),p.setSelectionCells(q);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return q};EditorUi.prototype.pasteCells=
-function(d,g,k,l){if(!mxEvent.isConsumed(d)){var p=g,q=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var x=d.clipboardData.getData("text/plain"),y=!1;if(null!=x&&0<x.length&&"%3CmxGraphModel%3E"==x.substring(0,18))try{var A=decodeURIComponent(x);this.isCompatibleString(A)&&(y=!0,x=A)}catch(O){}y=y?null:d.clipboardData.getData("text/html");null!=y&&0<y.length?(p=this.parseHtmlData(y),q="text/plain"!=p.getAttribute("data-type")):null!=x&&0<x.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,
-y))}x=p.getElementsByTagName("span");if(null!=x&&0<x.length&&"application/vnd.lucid.chart.objects"===x[0].getAttribute("data-lucid-type"))k=x[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(O){var t=this.editor.graph;t.lastPasteXml==O?t.pasteCounter++:(t.lastPasteXml=O,t.pasteCounter=0);var z=t.pasteCounter*t.gridSize;t.setSelectionCells(this.importXml(O,z,z));t.scrollCellToVisible(t.getSelectionCell())}),mxUtils.bind(this,function(O){this.handleError(O)})),
-mxEvent.consume(d));else{q=q?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);y=!1;try{var B=q.lastIndexOf("%3E");0<=B&&B<q.length-3&&(q=q.substring(0,B+3))}catch(O){}try{x=p.getElementsByTagName("span"),(A=null!=x&&0<x.length?mxUtils.trim(decodeURIComponent(x[0].textContent)):decodeURIComponent(q))&&(this.isCompatibleString(A)||0==A.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(y=!0,q=A)}catch(O){}try{if(null!=q&&0<q.length){if(0==q.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(q=(new MiroImporter).importMiroJson(JSON.parse(q)))}catch(O){console.log("Miro import error:",O)}this.pasteXml(q,l,y,d);try{mxEvent.consume(d)}catch(O){}}else if(!k){var I=this.editor.graph;I.lastPasteXml=null;I.pasteCounter=0}}catch(O){this.handleError(O)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",
+function(d,g,k,l){if(!mxEvent.isConsumed(d)){var p=g,q=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var x=d.clipboardData.getData("text/plain"),y=!1;if(null!=x&&0<x.length&&"%3CmxGraphModel%3E"==x.substring(0,18))try{var z=decodeURIComponent(x);this.isCompatibleString(z)&&(y=!0,x=z)}catch(P){}y=y?null:d.clipboardData.getData("text/html");null!=y&&0<y.length?(p=this.parseHtmlData(y),q="text/plain"!=p.getAttribute("data-type")):null!=x&&0<x.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,
+y))}x=p.getElementsByTagName("span");if(null!=x&&0<x.length&&"application/vnd.lucid.chart.objects"===x[0].getAttribute("data-lucid-type"))k=x[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(P){var L=this.editor.graph;L.lastPasteXml==P?L.pasteCounter++:(L.lastPasteXml=P,L.pasteCounter=0);var u=L.pasteCounter*L.gridSize;L.setSelectionCells(this.importXml(P,u,u));L.scrollCellToVisible(L.getSelectionCell())}),mxUtils.bind(this,function(P){this.handleError(P)})),
+mxEvent.consume(d));else{q=q?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);y=!1;try{var A=q.lastIndexOf("%3E");0<=A&&A<q.length-3&&(q=q.substring(0,A+3))}catch(P){}try{x=p.getElementsByTagName("span"),(z=null!=x&&0<x.length?mxUtils.trim(decodeURIComponent(x[0].textContent)):decodeURIComponent(q))&&(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(y=!0,q=z)}catch(P){}try{if(null!=q&&0<q.length){if(0==q.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(q=(new MiroImporter).importMiroJson(JSON.parse(q)))}catch(P){console.log("Miro import error:",P)}this.pasteXml(q,l,y,d);try{mxEvent.consume(d)}catch(P){}}else if(!k){var K=this.editor.graph;K.lastPasteXml=null;K.pasteCounter=0}}catch(P){this.handleError(P)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",
function(l){null!=g&&(g.parentNode.removeChild(g),g=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());l.stopPropagation();l.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(l){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var p=this.extractGraphModelFromEvent(l);if(null==p){var q=null!=l.dataTransfer?l.dataTransfer:l.clipboardData;null!=q&&(10==document.documentMode||11==document.documentMode?p=q.getData("Text"):(p=null,p=0<=mxUtils.indexOf(q.types,
"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(q.types,"text/html")?q.getData("text/html"):null,null!=p&&0<p.length?(q=document.createElement("div"),q.innerHTML=this.editor.graph.sanitizeHtml(p),q=q.getElementsByTagName("img"),0<q.length&&(p=q[0].getAttribute("src"))):0<=mxUtils.indexOf(q.types,"text/plain")&&(p=q.getData("text/plain"))),null!=p&&(Editor.isPngDataUrl(p)?(p=Editor.extractGraphModelFromPng(p),null!=p&&0<p.length&&this.openLocalFile(p,null,!0)):this.isRemoteFileFormat(p)?
@@ -12003,7 +12004,7 @@ this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInO
null,!0)}l.stopPropagation();l.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var l=document.body;var p=document.documentElement;var q=(l.clientWidth||p.clientWidth)-3;l=Math.max(l.clientHeight||0,p.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,q=d.clientWidth,l=d.clientHeight;p=document.createElement("div");p.style.zIndex=mxPopupMenu.prototype.zIndex+2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";
p.style.top=g+"px";p.style.left=k+"px";p.style.width=Math.max(0,q-3)+"px";p.style.height=Math.max(0,l-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);return p};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),l=new mxGraphModel;k.decode(g,l);g=l.getChildAt(l.getRoot(),0);for(k=0;k<l.getChildCount(g);k++)d.push(l.getChildAt(g,
k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,l,p){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=g.substring(0,g.length-4)+".drawio");var q=mxUtils.bind(this,function(y){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==y.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-l);try{this.loadLibrary(new LocalLibrary(this,y,g))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(y,g,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?
+l);try{this.loadLibrary(new LocalLibrary(this,y,g))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(y,g,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?
(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(y){4==y.readyState&&(this.spinner.stop(),200<=y.status&&299>=y.status?q(y.responseText):this.handleError({message:mxResources.get(413==y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,
function(y){this.spinner.stop();this.openLocalFile(y,g,l)}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,d,k.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(y){this.spinner.stop();
q(y)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,l)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var x=Editor.extractGraphModelFromPdf(d);null!=x&&(p=null,l=!0,d=x)}this.spinner.stop();this.openLocalFile(d,g,l,p,null!=p?k:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(l){var p=
@@ -12014,61 +12015,61 @@ mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=ne
(k(mxMarker.getPackageForType(p[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(p[mxConstants.STYLE_ENDARROW])));p=l.model.getChildCount(d);for(var q=0;q<p;q++)this.addBasenamesForCell(l.model.getChildAt(d,q),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,l,p){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(p)try{var q=this.editor.graph;q.setGridEnabled(!1);q.pageVisible=!1;var x=q.model.cells,y;for(y in x){var A=x[y];null!=A&&null!=A.style&&(A.style+=";sketch=1;"+(-1==A.style.indexOf("fontFamily=")||-1<A.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!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?
+if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(p)try{var q=this.editor.graph;q.setGridEnabled(!1);q.pageVisible=!1;var x=q.model.cells,y;for(y in x){var z=x[y];null!=z&&null!=z.style&&(z.style+=";sketch=1;"+(-1==z.style.indexOf("fontFamily=")||-1<z.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(A){console.log(A)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?d.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var g=this.editor.graph;
g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var l=g.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(p){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,l,1,this.embedExportBorder)}else d||
-k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,l=!1,p=null,q=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,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(A){if(A.source==(window.opener||window.parent)){var B=A.data,I=null,O=mxUtils.bind(this,function(Q){if(null!=Q&&"function"===typeof Q.charAt&&"<"!=Q.charAt(0))try{Editor.isPngDataUrl(Q)?Q=Editor.extractGraphModelFromPng(Q):"data:image/svg+xml;base64,"==Q.substring(0,26)?Q=atob(Q.substring(26)):
-"data:image/svg+xml;utf8,"==Q.substring(0,24)&&(Q=Q.substring(24)),null!=Q&&("%"==Q.charAt(0)?Q=decodeURIComponent(Q):"<"!=Q.charAt(0)&&(Q=Graph.decompress(Q)))}catch(R){}return Q});if("json"==urlParams.proto){var t=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[A],"data",[B])}catch(Q){B=null}try{if(null==B)return;if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):B.message,
-null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayoutList(B.layouts);return}if("prompt"==B.action){this.spinner.stop();var z=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Q){null!=Q?x.postMessage(JSON.stringify({event:"prompt",value:Q,message:B}),"*"):x.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):
-B.title);this.showDialog(z.container,300,80,!0,!1);z.init();return}if("draft"==B.action){var L=O(B.xml);this.spinner.stop();z=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),L,mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"edit",message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,
-B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(z.container,640,480,!0,!1,mxUtils.bind(this,function(Q){Q&&this.actions.get("exit").funct()}));try{z.init()}catch(Q){x.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var C=1==B.enableRecent,E=1==B.enableSearch,G=1==
-B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var P=this.getCurrentUser(),J=new TemplatesDialog(this,function(Q,R,Y){Q=Q||this.emptyDiagramXml;x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:R,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:B}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=P?P.id:null,C?mxUtils.bind(this,function(Q,R,Y){this.remoteInvoke("getRecentDiagrams",
-[Y],null,Q,R)}):null,E?mxUtils.bind(this,function(Q,R,Y,ba){this.remoteInvoke("searchDiagrams",[Q,ba],null,R,Y)}):null,mxUtils.bind(this,function(Q,R,Y){this.remoteInvoke("getFileContent",[Q.url],null,R,Y)}),null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(J.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}z=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,
-function(Q,R,Y,ba){Q=Q||this.emptyDiagramXml;null!=B.callback?x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:R,tempUrl:Y,libs:ba,builtIn:!0,message:B}),"*"):(d(Q,A,Q!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,C?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],null,Q,function(){Q(null,"Network Error!")})}):null,E?mxUtils.bind(this,function(Q,R){this.remoteInvoke("searchDiagrams",
-[Q,null],null,R,function(){R(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,R,Y){x.postMessage(JSON.stringify({event:"template",docUrl:Q,info:R,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==B.withoutType);this.showDialog(z.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();Q&&this.actions.get("exit").funct()}));z.init();return}if("textContent"==B.action){var F=
-this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:F,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message));null!=B.modified&&(this.editor.modified=B.modified);return}if("spinner"==B.action){var H=null!=B.messageKey?mxResources.get(B.messageKey):B.message;null==B.show||B.show?this.spinner.spin(document.body,H):
-this.spinner.stop();return}if("exit"==B.action){this.actions.get("exit").funct();return}if("viewport"==B.action){null!=B.viewport&&(this.embedViewport=B.viewport);return}if("snapshot"==B.action){this.sendEmbeddedSvgExport(!0);return}if("export"==B.action){if("png"==B.format||"xmlpng"==B.format){if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var S=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,
-M=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var R=this.createLoadMessage("export");R.format=B.format;R.message=B;R.data=Q;R.xml=S;x.postMessage(JSON.stringify(R),"*")}),W=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==B.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(S)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);M(Q)}),U=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():
-this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var Q=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var R,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){R=this.updatePageRoot(this.pages[Y]);break}null==R&&(R=this.currentPage);V.getGlobalVariable=function(fa){return"page"==fa?R.getName():"pagenumber"==fa?1:Q.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(R.root)}if(null!=
-B.layerIds){var ba=V.model,ea=ba.getChildCells(ba.getRoot()),Z={};for(Y=0;Y<B.layerIds.length;Y++)Z[B.layerIds[Y]]=!0;for(Y=0;Y<ea.length;Y++)ba.setVisible(ea[Y],Z[ea[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(fa){W(fa.toDataURL("image/png"))}),B.width,null,B.background,mxUtils.bind(this,function(){W(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length?(k=!0,this.setFileData(S),k=!1,this.editor.graph.mathEnabled?
-window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(S))).send(mxUtils.bind(this,function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?M("data:image/png;base64,"+Q.getText()):W(null)}),mxUtils.bind(this,
-function(){W(null)}))}}else X=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var R=this.getXmlFileData();Q.xml=mxUtils.getXml(R);Q.data=this.getFileData(null,null,!0,null,null,null,R);Q.format=B.format}else if("html"==B.format)R=this.editor.getGraphXml(),Q.data=this.getHtml(R,this.editor.graph),Q.xml=mxUtils.getXml(R),Q.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;R=null!=B.background?B.background:this.editor.graph.background;R==mxConstants.NONE&&(R=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var Y=mxUtils.bind(this,function(ba){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(ba);x.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==B.format)(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Q.xml,
-this.editor.graph,null,!0,Y,null,null,B.embedImages,R,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),R=this.editor.graph.getSvg(R,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,null,B.keepTheme),(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(R),this.embedFonts(R,mxUtils.bind(this,function(ba){B.embedImages||
-null==B.embedImages?this.editor.convertImages(ba,mxUtils.bind(this,function(ea){Y(mxUtils.getXml(ea))})):Y(mxUtils.getXml(ba))}));return}x.postMessage(JSON.stringify(Q),"*")}),null!=B.xml&&0<B.xml.length?(k=!0,this.setFileData(B.xml),k=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==B.action){t=B.toSketch;l=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&
-null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var u=Editor.sketchMode;this.doSetSketchMode(B.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=B.dark&&(u=Editor.darkMode,this.doSetDarkMode(B.dark),u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=B.border&&(this.embedExportBorder=B.border);null!=B.background&&(this.embedExportBackground=
-B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var D=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=B.rect.top+"px";this.diagramContainer.style.left=B.rect.left+"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Q=
-this.editor.graph,R=Q.maxFitScale;Q.maxFitScale=B.maxFitScale;Q.fit(2*D);Q.maxFitScale=R;Q.container.scrollTop-=2*D;Q.container.scrollLeft-=2*D;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn);null!=B.title&&null!=this.buttonContainer&&(L=document.createElement("span"),mxUtils.write(L,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(L),
-this.embedFilenameSpan=L);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Q){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var K=this.getCurrentFile();null!=K&&(L=O(B.xml),null!=L&&""!=L&&K.mergeFile(new LocalFile(this,L),function(){x.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Q){x.postMessage(JSON.stringify({event:"merge",message:B,error:Q}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(x):
-"remoteInvoke"==B.action?this.handleRemoteInvoke(B,A.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):x.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Q){this.handleError(Q)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),N=mxUtils.bind(this,function(Q,R){k=!0;try{d(Q,R,null,t)}catch(Y){this.handleError(Y)}k=
+k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,l=!1,p=null,q=mxUtils.bind(this,function(z,A){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&
+this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var A=z.data,K=null,P=mxUtils.bind(this,function(Q){if(null!=Q&&"function"===typeof Q.charAt&&"<"!=Q.charAt(0))try{Editor.isPngDataUrl(Q)?Q=Editor.extractGraphModelFromPng(Q):"data:image/svg+xml;base64,"==Q.substring(0,26)?Q=atob(Q.substring(26)):
+"data:image/svg+xml;utf8,"==Q.substring(0,24)&&(Q=Q.substring(24)),null!=Q&&("%"==Q.charAt(0)?Q=decodeURIComponent(Q):"<"!=Q.charAt(0)&&(Q=Graph.decompress(Q)))}catch(S){}return Q});if("json"==urlParams.proto){var L=!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[A])}catch(Q){A=null}try{if(null==A)return;if("dialog"==A.action){this.showError(null!=A.titleKey?mxResources.get(A.titleKey):A.title,null!=A.messageKey?mxResources.get(A.messageKey):A.message,
+null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayoutList(A.layouts);return}if("prompt"==A.action){this.spinner.stop();var u=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(Q){null!=Q?x.postMessage(JSON.stringify({event:"prompt",value:Q,message:A}),"*"):x.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")},null!=A.titleKey?mxResources.get(A.titleKey):
+A.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==A.action){var D=P(A.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),D,mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),"*")}),A.editKey?mxResources.get(A.editKey):null,
+A.discardKey?mxResources.get(A.discardKey):null,A.ignore?mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(Q){Q&&this.actions.get("exit").funct()}));try{u.init()}catch(Q){x.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();var B=1==A.enableRecent,C=1==A.enableSearch,G=1==
+A.enableCustomTemp;if("1"==urlParams.newTempDlg&&!A.templatesOnly&&null!=A.callback){var N=this.getCurrentUser(),I=new TemplatesDialog(this,function(Q,S,Y){Q=Q||this.emptyDiagramXml;x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:A}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=N?N.id:null,B?mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getRecentDiagrams",
+[Y],null,Q,S)}):null,C?mxUtils.bind(this,function(Q,S,Y,ba){this.remoteInvoke("searchDiagrams",[Q,ba],null,S,Y)}):null,mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getFileContent",[Q.url],null,S,Y)}),null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,
+function(Q,S,Y,ba){Q=Q||this.emptyDiagramXml;null!=A.callback?x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y,libs:ba,builtIn:!0,message:A}),"*"):(d(Q,z,Q!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,B?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],null,Q,function(){Q(null,"Network Error!")})}):null,C?mxUtils.bind(this,function(Q,S){this.remoteInvoke("searchDiagrams",
+[Q,null],null,S,function(){S(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,S,Y){x.postMessage(JSON.stringify({event:"template",docUrl:Q,info:S,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==A.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();Q&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==A.action){var F=
+this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:F,message:A}),"*");return}if("status"==A.action){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message));null!=A.modified&&(this.editor.modified=A.modified);return}if("spinner"==A.action){var H=null!=A.messageKey?mxResources.get(A.messageKey):A.message;null==A.show||A.show?this.spinner.spin(document.body,H):
+this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){null!=A.viewport&&(this.embedViewport=A.viewport);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var R=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var W=this.editor.graph,
+J=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var S=this.createLoadMessage("export");S.format=A.format;S.message=A;S.data=Q;S.xml=R;x.postMessage(JSON.stringify(S),"*")}),V=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==A.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(R)));W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);J(Q)}),U=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var Q=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());for(var S,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){S=this.updatePageRoot(this.pages[Y]);break}null==S&&(S=this.currentPage);W.getGlobalVariable=function(fa){return"page"==fa?S.getName():"pagenumber"==fa?1:Q.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(S.root)}if(null!=
+A.layerIds){var ba=W.model,ea=ba.getChildCells(ba.getRoot()),Z={};for(Y=0;Y<A.layerIds.length;Y++)Z[A.layerIds[Y]]=!0;for(Y=0;Y<ea.length;Y++)ba.setVisible(ea[Y],Z[ea[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(fa){V(fa.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){V(null)}),null,null,A.scale,A.transparent,A.shadow,null,W,A.border,null,A.grid,A.keepTheme)});null!=A.xml&&0<A.xml.length?(k=!0,this.setFileData(R),k=!1,this.editor.graph.mathEnabled?
+window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?J("data:image/png;base64,"+Q.getText()):V(null)}),mxUtils.bind(this,
+function(){V(null)}))}}else X=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var S=this.getXmlFileData();Q.xml=mxUtils.getXml(S);Q.data=this.getFileData(null,null,!0,null,null,null,S);Q.format=A.format}else if("html"==A.format)S=this.editor.getGraphXml(),Q.data=this.getHtml(S,this.editor.graph),Q.xml=mxUtils.getXml(S),Q.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=
+null;S=null!=A.background?A.background:this.editor.graph.background;S==mxConstants.NONE&&(S=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var Y=mxUtils.bind(this,function(ba){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(ba);x.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==A.format)(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))&&this.getEmbeddedSvg(Q.xml,
+this.editor.graph,null,!0,Y,null,null,A.embedImages,S,A.scale,A.border,A.shadow,A.keepTheme);else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),S=this.editor.graph.getSvg(S,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||A.shadow,null,A.keepTheme),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(S),this.embedFonts(S,mxUtils.bind(this,function(ba){A.embedImages||
+null==A.embedImages?this.editor.convertImages(ba,mxUtils.bind(this,function(ea){Y(mxUtils.getXml(ea))})):Y(mxUtils.getXml(ba))}));return}x.postMessage(JSON.stringify(Q),"*")}),null!=A.xml&&0<A.xml.length?(k=!0,this.setFileData(A.xml),k=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==A.action){L=A.toSketch;l=1==A.autosave;this.hideDialog();null!=A.modified&&null==urlParams.modified&&(urlParams.modified=A.modified);null!=A.saveAndExit&&
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=A.saveAndExit);null!=A.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=A.noSaveBtn);if(null!=A.rough){var t=Editor.sketchMode;this.doSetSketchMode(A.rough);t!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=A.dark&&(t=Editor.darkMode,this.doSetDarkMode(A.dark),t!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=A.border&&(this.embedExportBorder=A.border);null!=A.background&&(this.embedExportBackground=
+A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var E=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=A.rect.top+"px";this.diagramContainer.style.left=A.rect.left+"px";this.diagramContainer.style.height=A.rect.height+"px";this.diagramContainer.style.width=A.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";K=mxUtils.bind(this,function(){var Q=
+this.editor.graph,S=Q.maxFitScale;Q.maxFitScale=A.maxFitScale;Q.fit(2*E);Q.maxFitScale=S;Q.container.scrollTop-=2*E;Q.container.scrollLeft-=2*E;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(D=document.createElement("span"),mxUtils.write(D,A.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(D),
+this.embedFilenameSpan=D);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(Q){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var M=this.getCurrentFile();null!=M&&(D=P(A.xml),null!=D&&""!=D&&M.mergeFile(new LocalFile(this,D),function(){x.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(Q){x.postMessage(JSON.stringify({event:"merge",message:A,error:Q}),"*")}))}else"remoteInvokeReady"==A.action?this.handleRemoteInvokeReady(x):
+"remoteInvoke"==A.action?this.handleRemoteInvoke(A,z.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):x.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(Q){this.handleError(Q)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),O=mxUtils.bind(this,function(Q,S){k=!0;try{d(Q,S,null,L)}catch(Y){this.handleError(Y)}k=
!1;null!=urlParams.modified&&this.editor.setStatus("");p=T();l&&null==g&&(g=mxUtils.bind(this,function(Y,ba){Y=T();Y==p||k||(ba=this.createLoadMessage("autosave"),ba.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(ba),"*"));p=Y}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",
-g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)R=this.createLoadMessage("load"),R.xml=Q,x.postMessage(JSON.stringify(R),"*");null!=I&&I()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?
-(O="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Q){N(Q,A)},mxUtils.bind(this,function(Q){this.handleError(Q)}),O)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==
-Q.responseText.substring(0,13)&&N(Q.responseText,A)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Q){N(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==B||"object"!==typeof B||null==B.format||null==B.data&&null==B.url?(B=O(B),N(B,A)):this.loadDescriptor(B,mxUtils.bind(this,function(Q){N(T(),A)}),mxUtils.bind(this,function(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}))}}));var x=window.opener||
-window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";x.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(A,B,I){y.apply(this,arguments);x.postMessage(JSON.stringify({event:"openLink",href:A,target:B,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position=
+g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)S=this.createLoadMessage("load"),S.xml=Q,x.postMessage(JSON.stringify(S),"*");null!=K&&K()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?
+(P="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(Q){O(Q,z)},mxUtils.bind(this,function(Q){this.handleError(Q)}),P)):null!=A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==
+Q.responseText.substring(0,13)&&O(Q.responseText,z)}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(Q){O(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=P(A),O(A,z)):this.loadDescriptor(A,mxUtils.bind(this,function(Q){O(T(),z)}),mxUtils.bind(this,function(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}))}}));var x=window.opener||
+window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";x.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(z,A,K){y.apply(this,arguments);x.postMessage(JSON.stringify({event:"openLink",href:z,target:A,allowOpener:K}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position=
"absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var g=document.createElement("button");g.className="geBigButton";var k=g;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(g,l);g.setAttribute("title",l);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),mxUtils.write(g,mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g),k=g);"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g),k=g);k.style.marginRight="20px";this.toolbar.container.appendChild(d);
this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(d,g){for(var k=this.editor.graph,l=k.getSelectionCells(),p=0;p<d.length;p++){var q=new window[d[p].layout](k);if(null!=d[p].config)for(var x in d[p].config)q[x]=d[p].config[x];this.executeLayout(function(){q.execute(k.getDefaultParent(),0==l.length?null:l)},p==d.length-1,g)}};EditorUi.prototype.importCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},
-A=this.editor.graph,B=null,I=null,O=null,t=null,z=null,L=null,C=null,E="whiteSpace=wrap;html=1;",G=null,P=null,J="",F="auto",H="auto",S=null,V=null,M=40,W=40,U=100,X=0,u=function(){null!=g?g(ta):(A.setSelectionCells(ta),A.scrollCellToVisible(A.getSelectionCell()))},D=A.getFreeInsertPoint(),K=D.x,T=D.y;D=T;var N=null,Q="auto";P=null;for(var R=[],Y=null,ba=null,ea=0;ea<k.length&&"#"==k[ea].charAt(0);){d=k[ea].replace(/\r$/,"");for(ea++;ea<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ea].charAt(0);)d=
-d.substring(0,d.length-1)+mxUtils.trim(k[ea].substring(1)),ea++;if("#"!=d.charAt(1)){var Z=d.indexOf(":");if(0<Z){var fa=mxUtils.trim(d.substring(1,Z)),aa=mxUtils.trim(d.substring(Z+1));"label"==fa?N=A.sanitizeHtml(aa):"labelname"==fa&&0<aa.length&&"-"!=aa?z=aa:"labels"==fa&&0<aa.length&&"-"!=aa?C=JSON.parse(aa):"style"==fa?I=aa:"parentstyle"==fa?E=aa:"unknownStyle"==fa&&"-"!=aa?L=aa:"stylename"==fa&&0<aa.length&&"-"!=aa?t=aa:"styles"==fa&&0<aa.length&&"-"!=aa?O=JSON.parse(aa):"vars"==fa&&0<aa.length&&
-"-"!=aa?B=JSON.parse(aa):"identity"==fa&&0<aa.length&&"-"!=aa?G=aa:"parent"==fa&&0<aa.length&&"-"!=aa?P=aa:"namespace"==fa&&0<aa.length&&"-"!=aa?J=aa:"width"==fa?F=aa:"height"==fa?H=aa:"left"==fa&&0<aa.length?S=aa:"top"==fa&&0<aa.length?V=aa:"ignore"==fa?ba=aa.split(","):"connect"==fa?R.push(JSON.parse(aa)):"link"==fa?Y=aa:"padding"==fa?X=parseFloat(aa):"edgespacing"==fa?M=parseFloat(aa):"nodespacing"==fa?W=parseFloat(aa):"levelspacing"==fa?U=parseFloat(aa):"layout"==fa&&(Q=aa)}}}if(null==k[ea])throw Error(mxResources.get("invalidOrMissingFile"));
-var va=this.editor.csvToArray(k[ea].replace(/\r$/,""));Z=d=null;fa=[];for(aa=0;aa<va.length;aa++)G==va[aa]&&(d=aa),P==va[aa]&&(Z=aa),fa.push(mxUtils.trim(va[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==N&&(N="%"+fa[0]+"%");if(null!=R)for(var ja=0;ja<R.length;ja++)null==y[R[ja].to]&&(y[R[ja].to]={});G=[];for(aa=ea+1;aa<k.length;aa++){var Ba=this.editor.csvToArray(k[aa].replace(/\r$/,""));if(null==Ba){var Da=40<k[aa].length?k[aa].substring(0,40)+"...":k[aa];throw Error(Da+
-" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&G.push(Ba)}A.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Ba=G[aa];var qa=null,Ca=null!=d?J+Ba[d]:null;null!=Ca&&(qa=A.model.getCell(Ca));k=null!=qa;var Aa=new mxCell(N,new mxGeometry(K,D,0,0),I||"whiteSpace=wrap;html=1;");Aa.vertex=!0;Aa.id=Ca;Da=null!=qa?qa:Aa;for(var Ha=0;Ha<Ba.length;Ha++)A.setAttributeForCell(Da,fa[Ha],Ba[Ha]);if(null!=z&&null!=C){var Na=C[Da.getAttribute(z)];null!=Na&&A.labelChanged(Da,Na)}if(null!=
-t&&null!=O){var Ga=O[Da.getAttribute(t)];null!=Ga&&(Da.style=Ga)}A.setAttributeForCell(Da,"placeholders","1");Da.style=A.replacePlaceholders(Da,Da.style,B);k?(0>mxUtils.indexOf(q,qa)&&q.push(qa),A.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))):A.fireEvent(new mxEventObject("cellsInserted","cells",[Aa]));qa=Aa;if(!k)for(ja=0;ja<R.length;ja++)y[R[ja].to][qa.getAttribute(R[ja].to)]=qa;null!=Y&&"link"!=Y&&(A.setLinkForCell(qa,qa.getAttribute(Y)),A.setAttributeForCell(qa,Y,null));var Fa=this.editor.graph.getPreferredSizeForCell(qa);
-P=null!=Z?A.model.getCell(J+Ba[Z]):null;if(qa.vertex){Da=null!=P?0:K;ea=null!=P?0:T;null!=S&&null!=qa.getAttribute(S)&&(qa.geometry.x=Da+parseFloat(qa.getAttribute(S)));null!=V&&null!=qa.getAttribute(V)&&(qa.geometry.y=ea+parseFloat(qa.getAttribute(V)));var Ea="@"==F.charAt(0)?qa.getAttribute(F.substring(1)):null;qa.geometry.width=null!=Ea&&"auto"!=Ea?parseFloat(qa.getAttribute(F.substring(1))):"auto"==F||"auto"==Ea?Fa.width+X:parseFloat(F);var La="@"==H.charAt(0)?qa.getAttribute(H.substring(1)):
-null;qa.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==H||"auto"==La?Fa.height+X:parseFloat(H);D+=qa.geometry.height+W}k?(null==x[Ca]&&(x[Ca]=[]),x[Ca].push(qa)):(l.push(qa),null!=P?(P.style=A.replacePlaceholders(P,E,B),A.addCell(qa,P),p.push(P)):q.push(A.addCell(qa)))}for(aa=0;aa<p.length;aa++)Ea="@"==F.charAt(0)?p[aa].getAttribute(F.substring(1)):null,La="@"==H.charAt(0)?p[aa].getAttribute(H.substring(1)):null,"auto"!=F&&"auto"!=Ea||"auto"!=H&&"auto"!=La||A.updateGroupBounds([p[aa]],
-X,!0);var za=q.slice(),ta=q.slice();for(ja=0;ja<R.length;ja++){var ka=R[ja];for(aa=0;aa<l.length;aa++){qa=l[aa];var oa=mxUtils.bind(this,function(ia,ma,ra){var pa=ma.getAttribute(ra.from);if(null!=pa&&""!=pa){pa=pa.split(",");for(var na=0;na<pa.length;na++){var Ka=y[ra.to][pa[na]];if(null==Ka&&null!=L){Ka=new mxCell(pa[na],new mxGeometry(K,T,0,0),L);Ka.style=A.replacePlaceholders(ma,Ka.style,B);var Ia=this.editor.graph.getPreferredSizeForCell(Ka);Ka.geometry.width=Ia.width+X;Ka.geometry.height=Ia.height+
-X;y[ra.to][pa[na]]=Ka;Ka.vertex=!0;Ka.id=pa[na];q.push(A.addCell(Ka))}if(null!=Ka){Ia=ra.label;null!=ra.fromlabel&&(Ia=(ma.getAttribute(ra.fromlabel)||"")+(Ia||""));null!=ra.sourcelabel&&(Ia=A.replacePlaceholders(ma,ra.sourcelabel,B)+(Ia||""));null!=ra.tolabel&&(Ia=(Ia||"")+(Ka.getAttribute(ra.tolabel)||""));null!=ra.targetlabel&&(Ia=(Ia||"")+A.replacePlaceholders(Ka,ra.targetlabel,B));var Ra="target"==ra.placeholders==!ra.invert?Ka:ia;Ra=null!=ra.style?A.replacePlaceholders(Ra,ra.style,B):A.createCurrentEdgeStyle();
-Ia=A.insertEdge(null,null,Ia||"",ra.invert?Ka:ia,ra.invert?ia:Ka,Ra);if(null!=ra.labels)for(Ra=0;Ra<ra.labels.length;Ra++){var Sa=ra.labels[Ra],Ja=new mxCell(Sa.label||Ra,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Sa.placeholders&&(Ja.value=A.replacePlaceholders("target"==Sa.placeholders==!ra.invert?Ka:ia,Ja.value,B));if(null!=Sa.dx||null!=Sa.dy)Ja.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=
-Sa.dy?Sa.dy:0);Ia.insert(Ja)}ta.push(Ia);mxUtils.remove(ra.invert?ia:Ka,za)}}}});oa(qa,qa,ka);if(null!=x[qa.id])for(Ha=0;Ha<x[qa.id].length;Ha++)oa(qa,x[qa.id][Ha],ka)}}if(null!=ba)for(aa=0;aa<l.length;aa++)for(qa=l[aa],Ha=0;Ha<ba.length;Ha++)A.setAttributeForCell(qa,mxUtils.trim(ba[Ha]),null);if(0<q.length){var sa=new mxParallelEdgeLayout(A);sa.spacing=M;sa.checkOverlap=!0;var ya=function(){0<sa.spacing&&sa.execute(A.getDefaultParent());for(var ia=0;ia<q.length;ia++){var ma=A.getCellGeometry(q[ia]);
-ma.x=Math.round(A.snap(ma.x));ma.y=Math.round(A.snap(ma.y));"auto"==F&&(ma.width=Math.round(A.snap(ma.width)));"auto"==H&&(ma.height=Math.round(A.snap(ma.height)))}};if("["==Q.charAt(0)){var wa=u;A.view.validate();this.executeLayoutList(JSON.parse(Q),function(){ya();wa()});u=null}else if("circle"==Q){var ua=new mxCircleLayout(A);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var xa=ua.isVertexIgnored;ua.isVertexIgnored=function(ia){return xa.apply(this,arguments)||0>mxUtils.indexOf(q,ia)};this.executeLayout(function(){ua.execute(A.getDefaultParent());
-ya()},!0,u);u=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ta.length==2*q.length-1&&1==za.length){A.view.validate();var ha=new mxCompactTreeLayout(A,"horizontaltree"==Q);ha.levelDistance=W;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),0<za.length?za[0]:null)},!0,u);u=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==za.length){A.view.validate();var da=new mxHierarchicalLayout(A,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);da.intraCellSpacing=W;da.parallelEdgeSpacing=M;da.interRankCellSpacing=U;da.disableEdgeStyle=!1;this.executeLayout(function(){da.execute(A.getDefaultParent(),ta);A.moveCells(ta,K,T)},!0,u);u=null}else if("organic"==Q||"auto"==Q&&ta.length>q.length){A.view.validate();var ca=new mxFastOrganicLayout(A);ca.forceConstant=3*W;ca.disableEdgeStyle=!1;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(ia){return la.apply(this,arguments)||0>mxUtils.indexOf(q,
-ia)};this.executeLayout(function(){ca.execute(A.getDefaultParent());ya()},!0,u);u=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=u&&u()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=
+z=this.editor.graph,A=null,K=null,P=null,L=null,u=null,D=null,B=null,C="whiteSpace=wrap;html=1;",G=null,N=null,I="",F="auto",H="auto",R=null,W=null,J=40,V=40,U=100,X=0,t=function(){null!=g?g(ta):(z.setSelectionCells(ta),z.scrollCellToVisible(z.getSelectionCell()))},E=z.getFreeInsertPoint(),M=E.x,T=E.y;E=T;var O=null,Q="auto";N=null;for(var S=[],Y=null,ba=null,ea=0;ea<k.length&&"#"==k[ea].charAt(0);){d=k[ea].replace(/\r$/,"");for(ea++;ea<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ea].charAt(0);)d=
+d.substring(0,d.length-1)+mxUtils.trim(k[ea].substring(1)),ea++;if("#"!=d.charAt(1)){var Z=d.indexOf(":");if(0<Z){var fa=mxUtils.trim(d.substring(1,Z)),aa=mxUtils.trim(d.substring(Z+1));"label"==fa?O=z.sanitizeHtml(aa):"labelname"==fa&&0<aa.length&&"-"!=aa?u=aa:"labels"==fa&&0<aa.length&&"-"!=aa?B=JSON.parse(aa):"style"==fa?K=aa:"parentstyle"==fa?C=aa:"unknownStyle"==fa&&"-"!=aa?D=aa:"stylename"==fa&&0<aa.length&&"-"!=aa?L=aa:"styles"==fa&&0<aa.length&&"-"!=aa?P=JSON.parse(aa):"vars"==fa&&0<aa.length&&
+"-"!=aa?A=JSON.parse(aa):"identity"==fa&&0<aa.length&&"-"!=aa?G=aa:"parent"==fa&&0<aa.length&&"-"!=aa?N=aa:"namespace"==fa&&0<aa.length&&"-"!=aa?I=aa:"width"==fa?F=aa:"height"==fa?H=aa:"left"==fa&&0<aa.length?R=aa:"top"==fa&&0<aa.length?W=aa:"ignore"==fa?ba=aa.split(","):"connect"==fa?S.push(JSON.parse(aa)):"link"==fa?Y=aa:"padding"==fa?X=parseFloat(aa):"edgespacing"==fa?J=parseFloat(aa):"nodespacing"==fa?V=parseFloat(aa):"levelspacing"==fa?U=parseFloat(aa):"layout"==fa&&(Q=aa)}}}if(null==k[ea])throw Error(mxResources.get("invalidOrMissingFile"));
+var va=this.editor.csvToArray(k[ea].replace(/\r$/,""));Z=d=null;fa=[];for(aa=0;aa<va.length;aa++)G==va[aa]&&(d=aa),N==va[aa]&&(Z=aa),fa.push(mxUtils.trim(va[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==O&&(O="%"+fa[0]+"%");if(null!=S)for(var ja=0;ja<S.length;ja++)null==y[S[ja].to]&&(y[S[ja].to]={});G=[];for(aa=ea+1;aa<k.length;aa++){var Ba=this.editor.csvToArray(k[aa].replace(/\r$/,""));if(null==Ba){var Da=40<k[aa].length?k[aa].substring(0,40)+"...":k[aa];throw Error(Da+
+" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&G.push(Ba)}z.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Ba=G[aa];var qa=null,Ca=null!=d?I+Ba[d]:null;null!=Ca&&(qa=z.model.getCell(Ca));k=null!=qa;var Aa=new mxCell(O,new mxGeometry(M,E,0,0),K||"whiteSpace=wrap;html=1;");Aa.vertex=!0;Aa.id=Ca;Da=null!=qa?qa:Aa;for(var Ha=0;Ha<Ba.length;Ha++)z.setAttributeForCell(Da,fa[Ha],Ba[Ha]);if(null!=u&&null!=B){var Na=B[Da.getAttribute(u)];null!=Na&&z.labelChanged(Da,Na)}if(null!=
+L&&null!=P){var Ga=P[Da.getAttribute(L)];null!=Ga&&(Da.style=Ga)}z.setAttributeForCell(Da,"placeholders","1");Da.style=z.replacePlaceholders(Da,Da.style,A);k?(0>mxUtils.indexOf(q,qa)&&q.push(qa),z.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))):z.fireEvent(new mxEventObject("cellsInserted","cells",[Aa]));qa=Aa;if(!k)for(ja=0;ja<S.length;ja++)y[S[ja].to][qa.getAttribute(S[ja].to)]=qa;null!=Y&&"link"!=Y&&(z.setLinkForCell(qa,qa.getAttribute(Y)),z.setAttributeForCell(qa,Y,null));var Fa=this.editor.graph.getPreferredSizeForCell(qa);
+N=null!=Z?z.model.getCell(I+Ba[Z]):null;if(qa.vertex){Da=null!=N?0:M;ea=null!=N?0:T;null!=R&&null!=qa.getAttribute(R)&&(qa.geometry.x=Da+parseFloat(qa.getAttribute(R)));null!=W&&null!=qa.getAttribute(W)&&(qa.geometry.y=ea+parseFloat(qa.getAttribute(W)));var Ea="@"==F.charAt(0)?qa.getAttribute(F.substring(1)):null;qa.geometry.width=null!=Ea&&"auto"!=Ea?parseFloat(qa.getAttribute(F.substring(1))):"auto"==F||"auto"==Ea?Fa.width+X:parseFloat(F);var La="@"==H.charAt(0)?qa.getAttribute(H.substring(1)):
+null;qa.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==H||"auto"==La?Fa.height+X:parseFloat(H);E+=qa.geometry.height+V}k?(null==x[Ca]&&(x[Ca]=[]),x[Ca].push(qa)):(l.push(qa),null!=N?(N.style=z.replacePlaceholders(N,C,A),z.addCell(qa,N),p.push(N)):q.push(z.addCell(qa)))}for(aa=0;aa<p.length;aa++)Ea="@"==F.charAt(0)?p[aa].getAttribute(F.substring(1)):null,La="@"==H.charAt(0)?p[aa].getAttribute(H.substring(1)):null,"auto"!=F&&"auto"!=Ea||"auto"!=H&&"auto"!=La||z.updateGroupBounds([p[aa]],
+X,!0);var za=q.slice(),ta=q.slice();for(ja=0;ja<S.length;ja++){var ka=S[ja];for(aa=0;aa<l.length;aa++){qa=l[aa];var oa=mxUtils.bind(this,function(ia,ma,ra){var pa=ma.getAttribute(ra.from);if(null!=pa&&""!=pa){pa=pa.split(",");for(var na=0;na<pa.length;na++){var Ka=y[ra.to][pa[na]];if(null==Ka&&null!=D){Ka=new mxCell(pa[na],new mxGeometry(M,T,0,0),D);Ka.style=z.replacePlaceholders(ma,Ka.style,A);var Ia=this.editor.graph.getPreferredSizeForCell(Ka);Ka.geometry.width=Ia.width+X;Ka.geometry.height=Ia.height+
+X;y[ra.to][pa[na]]=Ka;Ka.vertex=!0;Ka.id=pa[na];q.push(z.addCell(Ka))}if(null!=Ka){Ia=ra.label;null!=ra.fromlabel&&(Ia=(ma.getAttribute(ra.fromlabel)||"")+(Ia||""));null!=ra.sourcelabel&&(Ia=z.replacePlaceholders(ma,ra.sourcelabel,A)+(Ia||""));null!=ra.tolabel&&(Ia=(Ia||"")+(Ka.getAttribute(ra.tolabel)||""));null!=ra.targetlabel&&(Ia=(Ia||"")+z.replacePlaceholders(Ka,ra.targetlabel,A));var Ra="target"==ra.placeholders==!ra.invert?Ka:ia;Ra=null!=ra.style?z.replacePlaceholders(Ra,ra.style,A):z.createCurrentEdgeStyle();
+Ia=z.insertEdge(null,null,Ia||"",ra.invert?Ka:ia,ra.invert?ia:Ka,Ra);if(null!=ra.labels)for(Ra=0;Ra<ra.labels.length;Ra++){var Sa=ra.labels[Ra],Ja=new mxCell(Sa.label||Ra,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Sa.placeholders&&(Ja.value=z.replacePlaceholders("target"==Sa.placeholders==!ra.invert?Ka:ia,Ja.value,A));if(null!=Sa.dx||null!=Sa.dy)Ja.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=
+Sa.dy?Sa.dy:0);Ia.insert(Ja)}ta.push(Ia);mxUtils.remove(ra.invert?ia:Ka,za)}}}});oa(qa,qa,ka);if(null!=x[qa.id])for(Ha=0;Ha<x[qa.id].length;Ha++)oa(qa,x[qa.id][Ha],ka)}}if(null!=ba)for(aa=0;aa<l.length;aa++)for(qa=l[aa],Ha=0;Ha<ba.length;Ha++)z.setAttributeForCell(qa,mxUtils.trim(ba[Ha]),null);if(0<q.length){var sa=new mxParallelEdgeLayout(z);sa.spacing=J;sa.checkOverlap=!0;var ya=function(){0<sa.spacing&&sa.execute(z.getDefaultParent());for(var ia=0;ia<q.length;ia++){var ma=z.getCellGeometry(q[ia]);
+ma.x=Math.round(z.snap(ma.x));ma.y=Math.round(z.snap(ma.y));"auto"==F&&(ma.width=Math.round(z.snap(ma.width)));"auto"==H&&(ma.height=Math.round(z.snap(ma.height)))}};if("["==Q.charAt(0)){var wa=t;z.view.validate();this.executeLayoutList(JSON.parse(Q),function(){ya();wa()});t=null}else if("circle"==Q){var ua=new mxCircleLayout(z);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var xa=ua.isVertexIgnored;ua.isVertexIgnored=function(ia){return xa.apply(this,arguments)||0>mxUtils.indexOf(q,ia)};this.executeLayout(function(){ua.execute(z.getDefaultParent());
+ya()},!0,t);t=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ta.length==2*q.length-1&&1==za.length){z.view.validate();var ha=new mxCompactTreeLayout(z,"horizontaltree"==Q);ha.levelDistance=V;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(z.getDefaultParent(),0<za.length?za[0]:null)},!0,t);t=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==za.length){z.view.validate();var da=new mxHierarchicalLayout(z,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);da.intraCellSpacing=V;da.parallelEdgeSpacing=J;da.interRankCellSpacing=U;da.disableEdgeStyle=!1;this.executeLayout(function(){da.execute(z.getDefaultParent(),ta);z.moveCells(ta,M,T)},!0,t);t=null}else if("organic"==Q||"auto"==Q&&ta.length>q.length){z.view.validate();var ca=new mxFastOrganicLayout(z);ca.forceConstant=3*V;ca.disableEdgeStyle=!1;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(ia){return la.apply(this,arguments)||0>mxUtils.indexOf(q,
+ia)};this.executeLayout(function(){ca.execute(z.getDefaultParent());ya()},!0,t);t=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=t&&t()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=
null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),l;for(l in urlParams)0>mxUtils.indexOf(k,l)&&(d=0==g?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,l,p){d=new LinkDialog(this,d,g,k,!0,l,p);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=
function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),
@@ -12078,23 +12079,23 @@ return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnable
this.actions.get("shadowVisible").setEnabled(l);this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(l&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=
g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==
urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
-function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,l,p,q,x,y){var A=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(A.getSvg(l,p,q)),"image/svg+xml");
-else{var B=d.getFileData(!0,null,null,null,null,!0),I=A.getGraphBounds(),O=Math.floor(I.width*p/A.view.scale),t=Math.floor(I.height*p/A.view.scale);if(B.length<=MAX_REQUEST_SIZE&&O*t<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var z={globalVars:A.getExportVariables()};y&&(z.grid={size:A.gridSize,steps:A.view.gridSteps,color:A.view.gridColor});d.saveRequest(g,k,function(L,C){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(C||"0")+(null!=L?"&filename="+
-encodeURIComponent(L):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<x?"&dpi="+x:"")+"&bg="+(null!=l?l:"none")+"&w="+O+"&h="+t+"&border="+q+"&xml="+encodeURIComponent(B))})}else"png"==k?d.exportImage(p,null==l||"none"==l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=
+function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,l,p,q,x,y){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(l,p,q)),"image/svg+xml");
+else{var A=d.getFileData(!0,null,null,null,null,!0),K=z.getGraphBounds(),P=Math.floor(K.width*p/z.view.scale),L=Math.floor(K.height*p/z.view.scale);if(A.length<=MAX_REQUEST_SIZE&&P*L<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:z.getExportVariables()};y&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(D,B){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(B||"0")+(null!=D?"&filename="+
+encodeURIComponent(D):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<x?"&dpi="+x:"")+"&bg="+(null!=l?l:"none")+"&w="+P+"&h="+L+"&border="+q+"&xml="+encodeURIComponent(A))})}else"png"==k?d.exportImage(p,null==l||"none"==l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=
0;k<this.pages.length;k++){var l=d;this.currentPage!=this.pages[k]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),l.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+l.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));
-l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var x=mxSettings.getCustomLibraries();for(d=0;d<x.length;d++){var y=x[d];if("R"==y.substring(0,1)){var A=JSON.parse(decodeURIComponent(y.substring(1)));q[A[0]]={id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",
-null,null,function(B){p.innerHTML="";if(0==B.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<B.length;I++){var O=B[I];q[O.id]&&(g[O.id]=O);var t=this.addCheckbox(p,O.title,q[O.id]);(function(z,L){mxEvent.addListener(L,"change",function(){this.checked?g[z.id]=z:delete g[z.id]})})(O,t)}},mxUtils.bind(this,function(B){p.innerHTML="";var I=document.createElement("div");I.style.padding="8px";
-I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));p.appendChild(I)}));k.appendChild(p);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,I;for(I in g)null==q[I]&&(B++,mxUtils.bind(this,function(O){this.remoteInvoke("getFileContent",[O.downloadUrl],null,mxUtils.bind(this,function(t){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-t,O))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[I]));for(I in q)g[I]||this.closeLibrary(new RemoteLibrary(this,null,q[I]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
+l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var x=mxSettings.getCustomLibraries();for(d=0;d<x.length;d++){var y=x[d];if("R"==y.substring(0,1)){var z=JSON.parse(decodeURIComponent(y.substring(1)));q[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",
+null,null,function(A){p.innerHTML="";if(0==A.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var K=0;K<A.length;K++){var P=A[K];q[P.id]&&(g[P.id]=P);var L=this.addCheckbox(p,P.title,q[P.id]);(function(u,D){mxEvent.addListener(D,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(P,L)}},mxUtils.bind(this,function(A){p.innerHTML="";var K=document.createElement("div");K.style.padding="8px";
+K.style.textAlign="center";mxUtils.write(K,mxResources.get("error")+": ");mxUtils.write(K,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(K)}));k.appendChild(p);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,K;for(K in g)null==q[K]&&(A++,mxUtils.bind(this,function(P){this.remoteInvoke("getFileContent",[P.downloadUrl],null,mxUtils.bind(this,function(L){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+L,P))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[K]));for(K in q)g[K]||this.closeLibrary(new RemoteLibrary(this,null,q[K]));0==A&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,l,p){var q=!0,x=window.setTimeout(mxUtils.bind(this,function(){q=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),y=mxUtils.bind(this,function(){window.clearTimeout(x);
-q&&l.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(x);q&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:A});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(B,I){var O={event:"remoteInvokeResponse",
-msgMarkers:d.msgMarkers};null!=I?O.error={errResp:I}:null!=B&&(O.resp=B);this.remoteWin.postMessage(JSON.stringify(O),"*")});try{var l=d.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var q=!1,x=0;x<p.allowedDomains.length;x++)if(g=="https://"+p.allowedDomains[x]){q=!0;break}if(!q){k(null,"Invalid Call: "+l+" is not allowed.");return}}var y=d.functionArgs;Array.isArray(y)||(y=[]);if(p.isAsync)y.push(function(){k(Array.prototype.slice.apply(arguments))}),
-y.push(function(B){k(null,B||"Unkown Error")}),this[l].apply(this,y);else{var A=this[l].apply(this,y);k([A])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
+q&&l.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(x);q&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:z});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(A,K){var P={event:"remoteInvokeResponse",
+msgMarkers:d.msgMarkers};null!=K?P.error={errResp:K}:null!=A&&(P.resp=A);this.remoteWin.postMessage(JSON.stringify(P),"*")});try{var l=d.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var q=!1,x=0;x<p.allowedDomains.length;x++)if(g=="https://"+p.allowedDomains[x]){q=!0;break}if(!q){k(null,"Invalid Call: "+l+" is not allowed.");return}}var y=d.functionArgs;Array.isArray(y)||(y=[]);if(p.isAsync)y.push(function(){k(Array.prototype.slice.apply(arguments))}),
+y.push(function(A){k(null,A||"Unkown Error")}),this[l].apply(this,y);else{var z=this[l].apply(this,y);k([z])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(A){k(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
2>p.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=g&&g(x)}};l.onsuccess=mxUtils.bind(this,function(p){var q=l.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(x){if(!x||
-"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var A=!0,B=!1,I,O=0,t=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),z=mxUtils.bind(this,function(){O++;L()}),L=mxUtils.bind(this,function(){try{if(O>=
-I.length)t();else{var E=I[O];StorageFile.getFileContent(this,E,mxUtils.bind(this,function(G){null==G||".scratchpad"==E&&G==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[E]}),"*"):z()}),z)}}catch(G){console.log(G)}}),C=mxUtils.bind(this,function(E){try{this.setDatabaseItem(null,[{title:E.title,size:E.data.length,lastModified:Date.now(),type:E.isLib?"L":"F"},{title:E.title,data:E.data}],z,z,["filesInfo","files"])}catch(G){console.log(G)}});
-x=mxUtils.bind(this,function(E){try{if(E.source==y.contentWindow){var G={};try{G=JSON.parse(E.data)}catch(P){}"init"==G.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||B||(A?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(I=G.resp[0],A=!1,L()):t():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?C(G.resp[0]):z())}}catch(P){console.log(P)}});
+"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var z=!0,A=!1,K,P=0,L=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){P++;D()}),D=mxUtils.bind(this,function(){try{if(P>=
+K.length)L();else{var C=K[P];StorageFile.getFileContent(this,C,mxUtils.bind(this,function(G){null==G||".scratchpad"==C&&G==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[C]}),"*"):u()}),u)}}catch(G){console.log(G)}}),B=mxUtils.bind(this,function(C){try{this.setDatabaseItem(null,[{title:C.title,size:C.data.length,lastModified:Date.now(),type:C.isLib?"L":"F"},{title:C.title,data:C.data}],u,u,["filesInfo","files"])}catch(G){console.log(G)}});
+x=mxUtils.bind(this,function(C){try{if(C.source==y.contentWindow){var G={};try{G=JSON.parse(C.data)}catch(N){}"init"==G.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||A||(z?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(K=G.resp[0],z=!1,D()):L():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?B(G.resp[0]):u())}}catch(N){console.log(N)}});
window.addEventListener("message",x)}})));d(q);q.onversionchange=function(){q.close()}});l.onerror=g;l.onblocked=function(){}}catch(p){null!=g&&g(p)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,l,p){this.openDatabase(mxUtils.bind(this,function(q){try{p=p||"objects";Array.isArray(p)||(p=[p],d=[d],g=[g]);var x=q.transaction(p,"readwrite");x.oncomplete=k;x.onerror=l;for(q=0;q<p.length;q++)x.objectStore(p[q]).put(null!=d&&null!=d[q]?{key:d[q],data:g[q]}:g[q])}catch(y){null!=
l&&l(y)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);p=p.transaction(l,"readwrite");p.oncomplete=g;p.onerror=k;for(var q=0;q<l.length;q++)p.objectStore(l[q]).delete(d[q])}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){try{l=l||"objects";var q=p.transaction([l],"readonly").objectStore(l).get(d);q.onsuccess=function(){g(q.result)};
q.onerror=k}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=k||"objects";var p=l.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(x){null==x.target.result?d(q):(q.push(x.target.result.value),x.target.result.continue())};p.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=
@@ -12102,46 +12103,46 @@ k||"objects";var p=l.transaction([k],"readonly").objectStore(k).getAllKeys();p.o
!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var l=this.getCurrentFile();null!=l?l.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();
return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,l,p,q,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,l,p,q,x,y)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,A,B,I,O,t,z,L,C){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,A,B,I,O,t,z,L,C)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,l,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(d,g,k,l,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),l=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<l.length){var p="<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(p||
l)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var J=O.getElementsByTagName("div"),F=0,H=0;H<J.length;H++)"none"!=J[H].style.display&&J[H].parentNode==O&&F++;t.style.display=0==F?"block":"none"}function d(J,F,H,S){function V(){F.removeChild(U);F.removeChild(X);W.style.display="block";M.style.display="block"}A={div:F,comment:J,saveCallback:H,deleteOnCancel:S};var M=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
-"geCommentEditTxtArea";U.style.minHeight=M.offsetHeight+"px";U.value=J.content;F.insertBefore(U,M);var X=document.createElement("div");X.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){S?(F.parentNode.removeChild(F),v()):V();A=null});u.className="geCommentEditBtn";X.appendChild(u);var D=mxUtils.button(mxResources.get("save"),function(){M.innerHTML="";J.content=U.value;mxUtils.write(M,J.content);V();H(J);A=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
-function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(D.click(),mxEvent.consume(K)):27==K.keyCode&&(u.click(),mxEvent.consume(K)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";X.appendChild(D);F.insertBefore(X,M);W.style.display="none";M.style.display="none";U.focus()}function g(J,F){F.innerHTML="";J=new Date(J.modifiedDate);var H=b.timeSince(J);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
-[H],"{1} ago"));F.setAttribute("title",J.toLocaleDateString()+" "+J.toLocaleTimeString())}function k(J){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";J.appendChild(F);J.busyImg=F}function l(J){J.style.border="1px solid red";J.removeChild(J.busyImg)}function p(J){J.style.border="";J.removeChild(J.busyImg)}function q(J,F,H,S,V){function M(N,Q,R){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className=
-"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,J);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(J);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);J.addReply(aa,function(ja){aa.id=ja;J.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va);
-b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=W().pdiv,aa=b.newComment(N,b.getCurrentUser());aa.pCommentId=J.id;null==J.replies&&(J.replies=[]);var va=q(aa,J.replies,fa,S+1);Q?Z():ea()}if(V||!J.isResolved){t.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",J.id);X.style.marginLeft=20*S+5+"px";J.isResolved&&!Editor.isDarkMode()&&
-(X.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=J.user.pictureUrl||Editor.userImage;u.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";u.appendChild(D);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,J.user.displayName||"");D.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",
-J.id);g(J,K);D.appendChild(K);X.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,J.content||"");X.appendChild(u);J.isLocked&&(X.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";u.appendChild(T);x||J.isLocked||0!=S&&!y||M(mxResources.get("reply"),function(){U("",!0)},J.isResolved);D=b.getCurrentUser();null==D||D.id!=J.user.id||x||J.isLocked||(M(mxResources.get("edit"),
-function(){function N(){d(J,X,function(){k(X);J.editComment(J.content,function(){p(X)},function(Q){l(X);N();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}N()},J.isResolved),M(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);J.deleteComment(function(N){if(!0===N){N=X.querySelector(".geCommentTxt");N.innerHTML="";mxUtils.write(N,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(N=
-0;N<Q.length;N++)Q[N].parentNode.removeChild(Q[N]);p(X);X.style.opacity="0.5"}else{Q=W(J).replies;for(N=0;N<Q.length;N++)O.removeChild(Q[N]);for(N=0;N<F.length;N++)if(F[N]==J){F.splice(N,1);break}t.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(N){l(X);b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},J.isResolved));x||J.isLocked||0!=S||M(J.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(N){function Q(){var R=
-N.target;R.innerHTML="";J.isResolved=!J.isResolved;mxUtils.write(R,J.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=J.isResolved?"none":"",ba=W(J).replies,ea=Editor.isDarkMode()?"transparent":J.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=ea;for(var fa=ba[Z].querySelectorAll(".geCommentAction"),aa=0;aa<fa.length;aa++)fa[aa]!=R.parentNode&&(fa[aa].style.display=Y);C||(ba[Z].style.display="none")}v()}J.isResolved?U(mxResources.get("reOpened")+
-": ",!0,Q,!1,!0):U(mxResources.get("markedAsResolved"),!1,Q,!0)});X.appendChild(u);null!=H?O.insertBefore(X,H.nextSibling):O.appendChild(X);for(H=0;null!=J.replies&&H<J.replies.length;H++)u=J.replies[H],u.isResolved=J.isResolved,q(u,J.replies,null,S+1,V);null!=A&&(A.comment.id==J.id?(V=J.content,J.content=A.comment.content,d(J,X,A.saveCallback,A.deleteOnCancel),J.content=V):null==A.comment.id&&A.comment.pCommentId==J.id&&(O.appendChild(A.div),d(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return X}}
-var x=!b.canComment(),y=b.canReplyToReplies(),A=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",O=document.createElement("div");O.className="geCommentsList";O.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";O.style.bottom=parseInt(I)+7+"px";B.appendChild(O);var t=document.createElement("span");t.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(t,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=I;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");I.className="geButton";if(!x){var L=I.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(J){function F(){d(H,S,function(V){k(S);b.addComment(V,function(M){V.id=M;E.push(V);p(S)},function(M){l(S);F();b.handleError(M,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),S=q(H,E,null,0);F();J.preventDefault();mxEvent.consume(J)});z.appendChild(L)}L=I.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var C=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(J){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";G();J.preventDefault();mxEvent.consume(J)});z.appendChild(L);b.commentsRefreshNeeded()&&(L=I.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(J){G();
-J.preventDefault();mxEvent.consume(J)}),z.appendChild(L));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(I.style.filter="invert(100%)"),mxEvent.addListener(I,"click",function(J){n();J.preventDefault();mxEvent.consume(J)}),z.appendChild(I));B.appendChild(z);var E=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
-var J=A.div.querySelector(".geCommentEditTxtArea"),F=A.div.querySelector(".geCommentEditBtns");A.comment.content=J.value;J.parentNode.removeChild(J);F.parentNode.removeChild(F)}catch(H){b.handleError(H)}O.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function S(V){if(null!=V){V.sort(function(W,U){return new Date(W.modifiedDate)-
-new Date(U.modifiedDate)});for(var M=0;M<V.length;M++)S(V[M].replies)}}H.sort(function(V,M){return new Date(V.modifiedDate)-new Date(M.modifiedDate)});O.innerHTML="";O.appendChild(t);t.style.display="block";E=H;for(H=0;H<E.length;H++)S(E[H].replies),q(E[H],E,null,0,C);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(O.appendChild(A.div),d(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(H){O.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
-": "+H.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function J(M){var W=H[M.id];if(null!=W)for(g(M,W),W=0;null!=M.replies&&W<M.replies.length;W++)J(M.replies[W])}if(this.window.isVisible()){for(var F=O.querySelectorAll(".geCommentDate"),H={},S=0;S<F.length;S++){var V=F[S];H[V.getAttribute("data-commentId")]=V}for(S=0;S<E.length;S++)J(E[S])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=
-new mxWindow(mxResources.get("comments"),B,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(J,F){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;J=Math.max(0,Math.min(J,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,H-this.table.clientHeight-48));this.getX()==J&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var P=mxUtils.bind(this,function(){var J=this.window.getX(),F=this.window.getY();this.window.setLocation(J,F)});mxEvent.addListener(window,"resize",P);this.destroy=function(){mxEvent.removeListener(window,"resize",P);this.window.destroy()}},ConfirmDialog=function(b,e,f,
+var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var I=P.getElementsByTagName("div"),F=0,H=0;H<I.length;H++)"none"!=I[H].style.display&&I[H].parentNode==P&&F++;L.style.display=0==F?"block":"none"}function d(I,F,H,R){function W(){F.removeChild(U);F.removeChild(X);V.style.display="block";J.style.display="block"}z={div:F,comment:I,saveCallback:H,deleteOnCancel:R};var J=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=J.offsetHeight+"px";U.value=I.content;F.insertBefore(U,J);var X=document.createElement("div");X.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),v()):W();z=null});t.className="geCommentEditBtn";X.appendChild(t);var E=mxUtils.button(mxResources.get("save"),function(){J.innerHTML="";I.content=U.value;mxUtils.write(J,I.content);W();H(I);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(E.click(),mxEvent.consume(M)):27==M.keyCode&&(t.click(),mxEvent.consume(M)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,J);V.style.display="none";J.style.display="none";U.focus()}function g(I,F){F.innerHTML="";I=new Date(I.modifiedDate);var H=b.timeSince(I);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
+[H],"{1} ago"));F.setAttribute("title",I.toLocaleDateString()+" "+I.toLocaleTimeString())}function k(I){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";I.appendChild(F);I.busyImg=F}function l(I){I.style.border="1px solid red";I.removeChild(I.busyImg)}function p(I){I.style.border="";I.removeChild(I.busyImg)}function q(I,F,H,R,W){function J(O,Q,S){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className=
+"geCommentActionLnk";mxUtils.write(ba,O);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,I);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);S&&(Y.style.display="none")}function V(){function O(Y){Q.push(S);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)S=S.nextSibling,O(Y.replies[ba])}var Q=[],S=X;O(I);return{pdiv:S,replies:Q}}function U(O,Q,S,Y,ba){function ea(){k(va);I.addReply(aa,function(ja){aa.id=ja;I.replies.push(aa);p(va);S&&S()},function(ja){Z();l(va);
+b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=V().pdiv,aa=b.newComment(O,b.getCurrentUser());aa.pCommentId=I.id;null==I.replies&&(I.replies=[]);var va=q(aa,I.replies,fa,R+1);Q?Z():ea()}if(W||!I.isResolved){L.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",I.id);X.style.marginLeft=20*R+5+"px";I.isResolved&&!Editor.isDarkMode()&&
+(X.style.backgroundColor="ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=I.user.pictureUrl||Editor.userImage;t.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";t.appendChild(E);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,I.user.displayName||"");E.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",
+I.id);g(I,M);E.appendChild(M);X.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,I.content||"");X.appendChild(t);I.isLocked&&(X.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";t.appendChild(T);x||I.isLocked||0!=R&&!y||J(mxResources.get("reply"),function(){U("",!0)},I.isResolved);E=b.getCurrentUser();null==E||E.id!=I.user.id||x||I.isLocked||(J(mxResources.get("edit"),
+function(){function O(){d(I,X,function(){k(X);I.editComment(I.content,function(){p(X)},function(Q){l(X);O();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},I.isResolved),J(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);I.deleteComment(function(O){if(!0===O){O=X.querySelector(".geCommentTxt");O.innerHTML="";mxUtils.write(O,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(O=
+0;O<Q.length;O++)Q[O].parentNode.removeChild(Q[O]);p(X);X.style.opacity="0.5"}else{Q=V(I).replies;for(O=0;O<Q.length;O++)P.removeChild(Q[O]);for(O=0;O<F.length;O++)if(F[O]==I){F.splice(O,1);break}L.style.display=0==P.getElementsByTagName("div").length?"block":"none"}},function(O){l(X);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},I.isResolved));x||I.isLocked||0!=R||J(I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function Q(){var S=
+O.target;S.innerHTML="";I.isResolved=!I.isResolved;mxUtils.write(S,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",ba=V(I).replies,ea=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=ea;for(var fa=ba[Z].querySelectorAll(".geCommentAction"),aa=0;aa<fa.length;aa++)fa[aa]!=S.parentNode&&(fa[aa].style.display=Y);B||(ba[Z].style.display="none")}v()}I.isResolved?U(mxResources.get("reOpened")+
+": ",!0,Q,!1,!0):U(mxResources.get("markedAsResolved"),!1,Q,!0)});X.appendChild(t);null!=H?P.insertBefore(X,H.nextSibling):P.appendChild(X);for(H=0;null!=I.replies&&H<I.replies.length;H++)t=I.replies[H],t.isResolved=I.isResolved,q(t,I.replies,null,R+1,W);null!=z&&(z.comment.id==I.id?(W=I.content,I.content=z.comment.content,d(I,X,z.saveCallback,z.deleteOnCancel),I.content=W):null==z.comment.id&&z.comment.pCommentId==I.id&&(P.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return X}}
+var x=!b.canComment(),y=b.canReplyToReplies(),z=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var K=EditorUi.compactUi?"26px":"30px",P=document.createElement("div");P.className="geCommentsList";P.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";P.style.bottom=parseInt(K)+7+"px";A.appendChild(P);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(L,mxResources.get("noCommentsFound"));var u=document.createElement("div");u.className="geToolbarContainer geCommentsToolbar";u.style.height=K;u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";K=document.createElement("a");K.className="geButton";if(!x){var D=K.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(D,"click",function(I){function F(){d(H,R,function(W){k(R);b.addComment(W,function(J){W.id=J;C.push(W);p(R)},function(J){l(R);F();b.handleError(J,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),R=q(H,C,null,0);F();I.preventDefault();mxEvent.consume(I)});u.appendChild(D)}D=K.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
+var B=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(I){this.className=(B=!B)?"geButton geCheckedBtn":"geButton";G();I.preventDefault();mxEvent.consume(I)});u.appendChild(D);b.commentsRefreshNeeded()&&(D=K.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',D.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(I){G();
+I.preventDefault();mxEvent.consume(I)}),u.appendChild(D));b.commentsSaveNeeded()&&(K=K.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',K.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(I){n();I.preventDefault();mxEvent.consume(I)}),u.appendChild(K));A.appendChild(u);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
+var I=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=I.value;I.parentNode.removeChild(I);F.parentNode.removeChild(F)}catch(H){b.handleError(H)}P.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
+new Date(U.modifiedDate)});for(var J=0;J<W.length;J++)R(W[J].replies)}}H.sort(function(W,J){return new Date(W.modifiedDate)-new Date(J.modifiedDate)});P.innerHTML="";P.appendChild(L);L.style.display="block";C=H;for(H=0;H<C.length;H++)R(C[H].replies),q(C[H],C,null,0,B);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(P.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(H){P.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
+": "+H.message:""));this.hasError=!0})):P.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;u=mxUtils.bind(this,function(){function I(J){var V=H[J.id];if(null!=V)for(g(J,V),V=0;null!=J.replies&&V<J.replies.length;V++)I(J.replies[V])}if(this.window.isVisible()){for(var F=P.querySelectorAll(".geCommentDate"),H={},R=0;R<F.length;R++){var W=F[R];H[W.getAttribute("data-commentId")]=W}for(R=0;R<C.length;R++)I(C[R])}});setInterval(u,6E4);this.refreshCommentsTime=u;this.window=
+new mxWindow(mxResources.get("comments"),A,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(I,F){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;I=Math.max(0,Math.min(I,(window.innerWidth||
+document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,H-this.table.clientHeight-48));this.getX()==I&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var I=this.window.getX(),F=this.window.getY();this.window.setLocation(I,F)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,e,f,
c,m,n,v,d,g,k,l){var p=document.createElement("div");p.style.textAlign="center";l=null!=l?l:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=l+"px";q.style.lineHeight="1.2em";mxUtils.write(q,e);p.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",k),q.appendChild(e),p.appendChild(q));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
"nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(x.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&k.appendChild(n);var y=mxUtils.button(m||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(x.checked)});k.appendChild(y);null!=v?(y.innerHTML=
v+"<br>"+y.innerHTML+"<br>",y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.className="geBtn",y.style.width="40%"):y.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(n);p.appendChild(k);g?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(x),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),q.appendChild(m),p.appendChild(q),mxEvent.addListener(m,
-"click",function(A){x.checked=!x.checked;mxEvent.consume(A)})):k.style.marginTop="12px";this.init=function(){y.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+"click",function(z){x.checked=!x.checked;mxEvent.consume(z)})):k.style.marginTop="12px";this.init=function(){y.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,m){if(null!=e)for(var n=0;n<e.length;n++)null!=e[n]&&(b=this.patchPages(b,e[n],f,c,m));return b};
EditorUi.prototype.patchPages=function(b,e,f,c,m){var n={},v=[],d={},g={},k={},l={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var p in c[EditorUi.DIFF_UPDATE])n[p]=c[EditorUi.DIFF_UPDATE][p];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)g[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)d[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(p in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][p],null!=c.previous&&(l[c.previous]=p);if(null!=b){var q="";for(c=0;c<b.length;c++){var x=b[c].getId();k[x]=b[c];null!=l[q]||g[x]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][x]&&null!=e[EditorUi.DIFF_UPDATE][x].previous||(l[q]=x);q=x}}var y={},A=mxUtils.bind(this,function(I){var O=null!=I?I.getId():"";if(null!=I&&!y[O]){y[O]=!0;v.push(I);var t=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][O]:null;null!=t&&(this.updatePageRoot(I),null!=t.name&&I.setName(t.name),
-null!=t.view&&this.patchViewState(I,t.view),null!=t.cells&&this.patchPage(I,t.cells,n[I.getId()],m),!f||null==t.cells&&null==t.view||(I.needsUpdate=!0))}I=l[O];null!=I&&(delete l[O],A(k[I]));I=d[O];null!=I&&(delete d[O],B(I))}),B=mxUtils.bind(this,function(I){I=mxUtils.parseXml(I.data).documentElement;I=new DiagramPage(I);this.updatePageRoot(I);var O=k[I.getId()];null==O?A(I):(this.patchPage(O,this.diffPages([O],[I]),n[O.getId()],m),f&&(O.needsUpdate=!0))});A();for(p in l)A(k[l[p]]),delete l[p];for(p in d)B(d[p]),
+e[EditorUi.DIFF_UPDATE][p],null!=c.previous&&(l[c.previous]=p);if(null!=b){var q="";for(c=0;c<b.length;c++){var x=b[c].getId();k[x]=b[c];null!=l[q]||g[x]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][x]&&null!=e[EditorUi.DIFF_UPDATE][x].previous||(l[q]=x);q=x}}var y={},z=mxUtils.bind(this,function(K){var P=null!=K?K.getId():"";if(null!=K&&!y[P]){y[P]=!0;v.push(K);var L=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][P]:null;null!=L&&(this.updatePageRoot(K),null!=L.name&&K.setName(L.name),
+null!=L.view&&this.patchViewState(K,L.view),null!=L.cells&&this.patchPage(K,L.cells,n[K.getId()],m),!f||null==L.cells&&null==L.view||(K.needsUpdate=!0))}K=l[P];null!=K&&(delete l[P],z(k[K]));K=d[P];null!=K&&(delete d[P],A(K))}),A=mxUtils.bind(this,function(K){K=mxUtils.parseXml(K.data).documentElement;K=new DiagramPage(K);this.updatePageRoot(K);var P=k[K.getId()];null==P?z(K):(this.patchPage(P,this.diffPages([P],[K]),n[P.getId()],m),f&&(P.needsUpdate=!0))});z();for(p in l)z(k[l[p]]),delete l[p];for(p in d)A(d[p]),
delete d[p];return v};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
EditorUi.prototype.createParentLookup=function(b,e){function f(k){var l=c[k];null==l&&(l={inserted:[],moved:{}},c[k]=l);return l}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var m=0;m<e[EditorUi.DIFF_INSERT].length;m++){var n=e[EditorUi.DIFF_INSERT][m],v=null!=n.parent?n.parent:"",d=null!=n.previous?n.previous:"";f(v).inserted[d]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][g],null!=n.previous&&(v=n.parent,null==v&&(m=b.getCell(g),null!=m&&(m=
b.getParent(m),null!=m&&(v=m.getId()))),null!=v&&(f(v).moved[n.previous]=g));return c};
-EditorUi.prototype.patchPage=function(b,e,f,c){var m=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(m,e);m.beginUpdate();try{var v=m.updateEdgeParent,d=new mxDictionary,g=[];m.updateEdgeParent=function(B,I){!d.get(B)&&c&&(d.put(B,!0),g.push(B))};var k=n[""],l=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=l&&(p=this.getCellForJson(l));if(null==p){var q=null!=k&&null!=k.moved?k.moved[""]:null;null!=q&&(p=m.getCell(q))}null!=p&&(m.setRoot(p),
-b.root=p);this.patchCellRecursive(b,m,m.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var x=0;x<e[EditorUi.DIFF_REMOVE].length;x++){var y=m.getCell(e[EditorUi.DIFF_REMOVE][x]);null!=y&&m.remove(y)}if(null!=e[EditorUi.DIFF_UPDATE]){var A=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(q in e[EditorUi.DIFF_UPDATE])this.patchCell(m,m.getCell(q),e[EditorUi.DIFF_UPDATE][q],null!=A?A[q]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(x=0;x<e[EditorUi.DIFF_INSERT].length;x++)l=e[EditorUi.DIFF_INSERT][x],
+EditorUi.prototype.patchPage=function(b,e,f,c){var m=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(m,e);m.beginUpdate();try{var v=m.updateEdgeParent,d=new mxDictionary,g=[];m.updateEdgeParent=function(A,K){!d.get(A)&&c&&(d.put(A,!0),g.push(A))};var k=n[""],l=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=l&&(p=this.getCellForJson(l));if(null==p){var q=null!=k&&null!=k.moved?k.moved[""]:null;null!=q&&(p=m.getCell(q))}null!=p&&(m.setRoot(p),
+b.root=p);this.patchCellRecursive(b,m,m.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var x=0;x<e[EditorUi.DIFF_REMOVE].length;x++){var y=m.getCell(e[EditorUi.DIFF_REMOVE][x]);null!=y&&m.remove(y)}if(null!=e[EditorUi.DIFF_UPDATE]){var z=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(q in e[EditorUi.DIFF_UPDATE])this.patchCell(m,m.getCell(q),e[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(x=0;x<e[EditorUi.DIFF_INSERT].length;x++)l=e[EditorUi.DIFF_INSERT][x],
y=m.getCell(l.id),null!=y&&(m.setTerminal(y,m.getCell(l.source),!0),m.setTerminal(y,m.getCell(l.target),!1));m.updateEdgeParent=v;if(c&&0<g.length)for(x=0;x<g.length;x++)m.contains(g[x])&&m.updateEdgeParent(g[x])}finally{m.endUpdate()}};
EditorUi.prototype.patchCellRecursive=function(b,e,f,c,m){if(null!=f){var n=c[f.getId()],v=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var d=0,g=e.getChildCount(f),k="",l=0;l<g;l++){var p=e.getChildAt(f,l).getId();null==n[k]&&(null==m[EditorUi.DIFF_UPDATE]||null==m[EditorUi.DIFF_UPDATE][p]||null==m[EditorUi.DIFF_UPDATE][p].previous&&null==m[EditorUi.DIFF_UPDATE][p].parent)&&(n[k]=p);k=p}g=mxUtils.bind(this,function(q,x){var y=null!=q?q.getId():"";null!=q&&x&&(x=
e.getCell(y),null!=x&&x!=q&&(q=null));null!=q&&(e.getChildAt(f,d)!=q&&e.add(f,q,d),this.patchCellRecursive(b,e,q,c,m),d++);return y});for(k=[null];0<k.length;)if(l=k.shift(),l=g(null!=l?l.child:null,null!=l?l.insert:!1),p=n[l],null!=p&&(delete n[l],k.push({child:e.getCell(p)})),p=v[l],null!=p&&(delete v[l],k.push({child:this.getCellForJson(p),insert:!0})),0==k.length){for(l in n)k.push({child:e.getCell(n[l])}),delete n[l];for(l in v)k.push({child:this.getCellForJson(v[l]),insert:!0}),delete v[l]}}};
@@ -12216,15 +12217,15 @@ b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isR
DrawioFileSync.prototype.merge=function(b,e,f,c,m,n){try{this.file.stats.merged++;this.lastModified=new Date;var v=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var d=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(d,this.ui.pages):null;var g=this.file.isRealtime()?this.ui.diffPages(d,this.file.ownPages):null;d=this.ui.applyPatches(d,b);var k=null==e?null:this.ui.getHashValueForPages(d);
this.file.setShadowPages(d);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",g,"checksum",e,"current",k,"valid",e==k,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",v,"etag",this.file.getDescriptorEtag(f));if(null!=e&&e!=k){var l=this.ui.hashValue(v),p=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(m,b,"From: "+p+"\nTo: "+l+"\nChecksum: "+e+"\nCurrent: "+k,v,"merge");
"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(d)]);return}null==this.patchRealtime(b,null,g)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(y){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=m&&m(y);try{if(this.file.errorReportsEnabled)p=this.ui.hashValue(this.file.getCurrentRevisionId()),l=this.ui.hashValue(v),this.file.sendErrorReport("Error in merge","From: "+p+"\nTo: "+l+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),y);else{var q=this.file.getCurrentUser(),x=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),x,y)}}catch(A){}}};
+null!=m&&m(y);try{if(this.file.errorReportsEnabled)p=this.ui.hashValue(this.file.getCurrentRevisionId()),l=this.ui.hashValue(v),this.file.sendErrorReport("Error in merge","From: "+p+"\nTo: "+l+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),y);else{var q=this.file.getCurrentUser(),x=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),x,y)}}catch(z){}}};
DrawioFileSync.prototype.fileChanged=function(b,e,f,c){var m=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(n){null!=f&&f()||(this.isValidState()?this.catchup(n,b,e,f):null!=e&&e())}),e):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=m};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var m=this.file.getCurrentRevisionId(),n=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",m,"to",n,"valid",this.isValidState());if(m==n)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var v=this.file.getDescriptorSecret(b);if(null==v||"1"==urlParams.lockdown)this.reload(e,f,c);else{var d=0,g=!1,k=mxUtils.bind(this,function(){if(null==
c||!c())if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var l=!0,p=window.setTimeout(mxUtils.bind(this,function(){l=!1;this.reload(e,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(m)+"&to="+encodeURIComponent(n)+(null!=v?"&secret="+encodeURIComponent(v):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(p);if(l&&
-(null==c||!c()))if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var x=null,y=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",d,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var A=JSON.parse(q.getText());if(null!=A&&0<A.length)for(var B=0;B<A.length;B++){var I=this.stringToObject(A[B]);if(I.v>DrawioFileSync.PROTOCOL){g=!0;y=[];break}else if(I.v===
-DrawioFileSync.PROTOCOL&&null!=I.d)x=I.d.checksum,y.push(I.d.patch);else{g=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",g,"temp",y,"checksum",x)}catch(O){y=[],null!=window.console&&"1"==urlParams.test&&console.log(O)}try{0<y.length?(this.file.stats.cacheHits++,this.merge(y,x,b,e,f,c)):d<=this.maxCacheReadyRetries-1&&!g&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(k,(d+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(e,f,c))}catch(O){null!=f&&f(O)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(m){null!=e&&e(m)}),f,c)};
+(null==c||!c()))if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var x=null,y=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",d,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var A=0;A<z.length;A++){var K=this.stringToObject(z[A]);if(K.v>DrawioFileSync.PROTOCOL){g=!0;y=[];break}else if(K.v===
+DrawioFileSync.PROTOCOL&&null!=K.d)x=K.d.checksum,y.push(K.d.patch);else{g=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",g,"temp",y,"checksum",x)}catch(P){y=[],null!=window.console&&"1"==urlParams.test&&console.log(P)}try{0<y.length?(this.file.stats.cacheHits++,this.merge(y,x,b,e,f,c)):d<=this.maxCacheReadyRetries-1&&!g&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(k,(d+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(e,f,c))}catch(P){null!=f&&f(P)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(m){null!=e&&e(m)}),f,c)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,m=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(n){window.clearTimeout(m);c&&(200<=n.getStatus()&&299>=n.getStatus()?e(n.getText()):f({code:n.getStatus(),message:"Token Error "+n.getStatus()}))}))};
@@ -12299,10 +12300,10 @@ null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedir
function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),m=null;if(null!=c){null!=c.current&&(m=c.current.userId,f.push(c[m].user),f[0].isCurrent=!0);for(var n in c)"current"!=n&&n!=m&&f.push(c[n].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(m){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,v){this.authorize(!1,mxUtils.bind(this,function(){null!=v&&v();f()}),mxUtils.bind(this,function(d){var g=null!=d.message?d.message:mxResources.get("cannotLogin");null!=d&&null!=d.error&&403==d.error.code&&null!=d.error.data&&0<d.error.data.length&&"domainPolicy"==d.error.data[0].reason&&(g=d.error.message);this.logout();this.ui.showError(mxResources.get("error"),
g,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,m){try{var n=!0,v=null,d=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var g=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=v&&window.clearTimeout(v);v=window.setTimeout(mxUtils.bind(this,
-function(){n=!1;null!=m&&m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:g})}),this.ui.timeout);var k=null,l=!1;"string"===typeof f.params?k=f.params:null!=f.params&&(k=JSON.stringify(f.params),l=!0);var p=f.fullUrl||this.GDriveBaseUrl+f.url;l&&(p+=(0<p.indexOf("?")?"&":"?")+"alt=json");var q=new mxXmlRequest(p,k,f.method||"GET");q.setRequestHeaders=mxUtils.bind(this,function(x,y){if(null!=f.headers)for(var A in f.headers)x.setRequestHeader(A,f.headers[A]);else null!=f.contentType?
-x.setRequestHeader("Content-Type",f.contentType):l&&x.setRequestHeader("Content-Type","application/json");x.setRequestHeader("Authorization","Bearer "+b)});q.send(mxUtils.bind(this,function(x){try{if(window.clearTimeout(v),n){try{var y=JSON.parse(x.getText())}catch(I){y=null}if(200<=x.getStatus()&&299>=x.getStatus())null!=c&&c(y);else{var A=null!=y&&null!=y.error?null!=y.error.data?y.error.data:y.error.errors:null,B=null!=A&&0<A.length?A[0].reason:null;null==m||null==y||null==y.error||-1!=y.error.code&&
-(403!=y.error.code||"domainPolicy"!=B&&"The requested mime type change is forbidden."!=y.error.message)?null!=y&&null!=y.error&&(401==y.error.code||403==y.error.code&&"rateLimitExceeded"!=B)?403==y.error.code&&this.retryAuth||401==y.error.code&&this.retryAuth&&"authError"==B?(null!=m&&m(y),this.retryAuth=!1):(this.retryAuth=!0,this.execute(g)):null!=y&&null!=y.error&&412!=y.error.code&&404!=y.error.code&&400!=y.error.code&&this.currentRequest==f&&d<this.maxRetries?(d++,this.requestThread=window.setTimeout(g,
-Math.round(Math.pow(2,d)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=m&&m(y):m(y)}}}catch(I){if(null!=m)m(I);else throw I;}}))}catch(x){if(null!=m)m(x);else throw x;}});null!=b&&this.authCalled?g():this.execute(g)}catch(k){if(null!=m)m(k);else throw k;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+function(){n=!1;null!=m&&m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:g})}),this.ui.timeout);var k=null,l=!1;"string"===typeof f.params?k=f.params:null!=f.params&&(k=JSON.stringify(f.params),l=!0);var p=f.fullUrl||this.GDriveBaseUrl+f.url;l&&(p+=(0<p.indexOf("?")?"&":"?")+"alt=json");var q=new mxXmlRequest(p,k,f.method||"GET");q.setRequestHeaders=mxUtils.bind(this,function(x,y){if(null!=f.headers)for(var z in f.headers)x.setRequestHeader(z,f.headers[z]);else null!=f.contentType?
+x.setRequestHeader("Content-Type",f.contentType):l&&x.setRequestHeader("Content-Type","application/json");x.setRequestHeader("Authorization","Bearer "+b)});q.send(mxUtils.bind(this,function(x){try{if(window.clearTimeout(v),n){try{var y=JSON.parse(x.getText())}catch(K){y=null}if(200<=x.getStatus()&&299>=x.getStatus())null!=c&&c(y);else{var z=null!=y&&null!=y.error?null!=y.error.data?y.error.data:y.error.errors:null,A=null!=z&&0<z.length?z[0].reason:null;null==m||null==y||null==y.error||-1!=y.error.code&&
+(403!=y.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=y.error.message)?null!=y&&null!=y.error&&(401==y.error.code||403==y.error.code&&"rateLimitExceeded"!=A)?403==y.error.code&&this.retryAuth||401==y.error.code&&this.retryAuth&&"authError"==A?(null!=m&&m(y),this.retryAuth=!1):(this.retryAuth=!0,this.execute(g)):null!=y&&null!=y.error&&412!=y.error.code&&404!=y.error.code&&400!=y.error.code&&this.currentRequest==f&&d<this.maxRetries?(d++,this.requestThread=window.setTimeout(g,
+Math.round(Math.pow(2,d)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=m&&m(y):m(y)}}}catch(K){if(null!=m)m(K);else throw K;}}))}catch(x){if(null!=m)m(x);else throw x;}});null!=b&&this.authCalled?g():this.execute(g)}catch(k){if(null!=m)m(k);else throw k;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(f,c,m,n,v){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(d){this.updateAuthInfo(d,!0,!0,c,m)}),m):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),f,c,m,n,v):null!=m&&m(d)}),m)};DriveClient.prototype.updateAuthInfo=function(f,c,m,n,v){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(m||null==this.user){var d=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var g=JSON.parse(d);this.setPersistentToken(g,!c);null!=n&&n()}),v)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,m,n,v,d){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var g=
JSON.parse(this.getPersistentToken(!0));g&&null!=g.current&&(this.userId=g.current.userId)}if(c&&null==this.userId)null!=n&&n();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),this.updateAuthInfo(l,!0,!1,m,n)):(0!=l.getStatus()&&this.logout(),null!=n&&n(l))}),n);else{var k=
@@ -12316,24 +12317,24 @@ m){return this.getFile(f,c,m,!0,!0)};DriveClient.prototype.loadDescriptor=functi
""))+"&orderBy=modifiedDate desc,title"},n,v)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var m=null;if(null!=f)for(var n=0;n<f.length;n++)if(f[n].key==c){m=f[n].value;break}return m};DriveClient.prototype.getFile=function(f,c,m,n,v){n=null!=n?n:!1;v=null!=v?v:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(d){d.title=d.originalFilename;d.headRevisionId=d.id;d.id=f;this.getXmlFile(d,
c,m)}),m):this.loadDescriptor(f,mxUtils.bind(this,function(d){try{if(null!=this.user){var g=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,m,null,{Authorization:"Bearer "+b}):n||v||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,m,!0,v):this.getXmlFile(d,c,m)}else m({message:mxResources.get("loggedOut")})}catch(k){if(null!=m)m(k);
else throw k;}}),m)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,m,n,v){try{var d={Authorization:"Bearer "+b},g=f.downloadUrl;if(null==g)null!=m&&m({message:mxResources.get("exportOptionsDisabledDetails")});else{var k=0,l=mxUtils.bind(this,function(){this.ui.editor.loadUrl(g,mxUtils.bind(this,function(p){try{if(null==p)m({message:mxResources.get("invalidOrMissingFile")});
-else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,p,f)):m({message:mxResources.get("notADiagramFile")});else{var q=!1;if(/\.png$/i.test(f.title)){var x=p.lastIndexOf(",");if(0<x){var y=this.ui.extractGraphModelFromPng(p);if(null!=y&&0<y.length)p=y;else try{y=p.substring(x+1);var A=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y),B=this.ui.editor.extractGraphModel(mxUtils.parseXml(A).documentElement,!0);null==B||0<B.getElementsByTagName("parsererror").length?
-q=!0:p=A}catch(I){q=!0}}}else/\.pdf$/i.test(f.title)?(y=Editor.extractGraphModelFromPdf(p),null!=y&&0<y.length&&(q=!0,p=y)):"data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)&&(A=p.substring(22),p=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,g)?this.ui.parseFileData(p,mxUtils.bind(this,function(I){try{4==I.readyState&&(200<=I.status&&299>=I.status?c(new LocalFile(this.ui,I.responseText,f.title+this.extension,
-!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}catch(O){if(null!=m)m(O);else throw O;}}),f.title):c(q?new LocalFile(this.ui,p,f.title,!0):new DriveFile(this.ui,p,f))}}catch(I){if(null!=m)m(I);else throw I;}}),mxUtils.bind(this,function(p,q){if(k<this.maxRetries&&null!=q&&403==q.getStatus())k++,window.setTimeout(l,2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=m)m(p);else throw p;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
-9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,d)});l()}}catch(p){if(null!=m)m(p);else throw p;}};DriveClient.prototype.saveFile=function(f,c,m,n,v,d,g,k,l){try{var p=0;f.saveLevel=1;var q=mxUtils.bind(this,function(E){if(null!=n)n(E);else throw E;try{if(!f.isConflict(E)){var G="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(E)||"unknown");null!=E&&null!=E.error&&null!=E.error.code&&(G+="-code_"+E.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:G,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(P){}}),x=mxUtils.bind(this,function(E){q(E);try{EditorUi.logError(E.message,null,null,
-E)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),A=f.desc.etag,B=f.desc.modifiedDate,I=f.desc.headRevisionId,O=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var t=null,z=!1,L={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(L.mimeType))L.mimeType=this.xmlMimeType,t=f.desc,z=c=!0;else if("application/octet-stream"==L.mimeType||"1"==urlParams["override-mime"]&&L.mimeType!=this.xmlMimeType)L.mimeType=this.xmlMimeType;
-var C=mxUtils.bind(this,function(E,G,P){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));P||(null!=E||d||(E=this.placeholderThumbnail,G=this.placeholderMimeType),null!=E&&null!=G&&(L.thumbnail={image:E,mimeType:G}));var J=f.getData(),F=mxUtils.bind(this,function(V){try{if(f.saveDelay=(new Date).getTime()-
-y,f.saveLevel=11,null==V)q({message:mxResources.get("errorSavingFile")+": Empty response"});else{var M=(new Date(V.modifiedDate)).getTime()-(new Date(B)).getTime();if(0>=M||A==V.etag||c&&I==V.headRevisionId){f.saveLevel=12;var W=[];0>=M&&W.push("invalid modified time");A==V.etag&&W.push("stale etag");c&&I==V.headRevisionId&&W.push("stale revision");var U=W.join(", ");q({message:mxResources.get("errorSavingFile")+": "+U},V);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
-null,"from-"+I+"."+B+"-"+this.ui.hashValue(A)+"-to-"+V.headRevisionId+"."+V.modifiedDate+"-"+this.ui.hashValue(V.etag)+(0<U.length?"-errors-"+U:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(X){}}else if(f.saveLevel=null,m(V,J),null!=t){this.executeRequest({url:"/files/"+t.id+"/revisions/"+t.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(X){X.pinned=!0;this.executeRequest({url:"/files/"+t.id+"/revisions/"+
-t.headRevisionId,method:"PUT",params:X})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+t.id+"."+t.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(X){}}}}catch(X){x(X)}}),H=mxUtils.bind(this,function(V,M){f.saveLevel=4;try{null!=k&&(L.properties=k);var W=g||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:f.getCurrentEtag(),U=mxUtils.bind(this,function(D){f.saveLevel=5;try{var K=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,T=!0,N=null;try{N=window.setTimeout(mxUtils.bind(this,function(){T=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Q){}this.executeRequest(this.createUploadRequest(f.getId(),L,V,c||D||K,M,D?null:W,z),mxUtils.bind(this,function(Q){window.clearTimeout(N);T&&F(Q)}),mxUtils.bind(this,function(Q){window.clearTimeout(N);
-if(T){f.saveLevel=6;try{f.isConflict(Q)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(R){f.saveLevel=7;try{if(null!=R&&R.etag==W)if(p<this.staleEtagMaxRetries){p++;var Y=2*p*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(X,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",p,"delay",Y)}else{X(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
-f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&R.headRevisionId==I&&EditorUi.debug("DriveClient: Remote Etag Changed","local",W,
-"remote",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),q(Q,R)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(R){x(R)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(D){f.saveLevel=9;if(D||null==W)U(D);else{var K=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){K=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(N){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(N){window.clearTimeout(T);
-if(K){f.saveLevel=10;try{null!=N&&N.headRevisionId==I?("1"==urlParams.test&&W!=N.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",W,"to",N.etag,"rev",f.desc.headRevisionId,"response",[N],"file",[f]),W=N.etag,U(D)):q({error:{code:412}},N)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(N){window.clearTimeout(T);K&&(f.saveLevel=11,q(N))}))}});if(O&&null==E){f.saveLevel=8;var u=new Image;u.onload=mxUtils.bind(this,function(){try{var D=this.thumbnailWidth/u.width,K=document.createElement("canvas");
-K.width=this.thumbnailWidth;K.height=Math.floor(u.height*D);K.getContext("2d").drawImage(u,0,0,K.width,K.height);var T=K.toDataURL();T=T.substring(T.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");L.thumbnail={image:T,mimeType:"image/png"};X(!1)}catch(N){try{X(!1)}catch(Q){x(Q)}}});u.src="data:image/png;base64,"+V}else X(!1)}catch(D){x(D)}});if(O){var S=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(V){H(V,!0)}),q,this.ui.getCurrentFile()!=f?
-J:null,S.scale,S.border)}else H(J,!1)}catch(V){x(V)}});try{f.saveLevel=2,(d||O||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=L.mimeType&&"application/vnd.jgraph.mxfile"!=L.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(E){try{var G=null;try{null!=E&&(G=E.toDataURL("image/png")),null!=G&&(G=G.length>this.maxThumbnailSize?null:G.substring(G.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(P){G=null}C(G,"image/png")}catch(P){x(P)}})))&&
-C(null,null,f.constructor!=DriveLibrary)}catch(E){x(E)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(E){x(E)}};DriveClient.prototype.insertFile=function(f,c,m,n,v,d,g){d=null!=d?d:this.xmlMimeType;f={mimeType:d,title:f};null!=m&&(f.parents=[{kind:"drive#fileLink",id:m}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,g),mxUtils.bind(this,function(k){d==this.libraryMimeType?n(new DriveLibrary(this.ui,c,k)):0==k?null!=v&&v({message:mxResources.get("errorSavingFile")}):
+else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,p,f)):m({message:mxResources.get("notADiagramFile")});else{var q=!1;if(/\.png$/i.test(f.title)){var x=p.lastIndexOf(",");if(0<x){var y=this.ui.extractGraphModelFromPng(p);if(null!=y&&0<y.length)p=y;else try{y=p.substring(x+1);var z=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(z).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?
+q=!0:p=z}catch(K){q=!0}}}else/\.pdf$/i.test(f.title)?(y=Editor.extractGraphModelFromPdf(p),null!=y&&0<y.length&&(q=!0,p=y)):"data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)&&(z=p.substring(22),p=window.atob&&!mxClient.IS_SF?atob(z):Base64.decode(z));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,g)?this.ui.parseFileData(p,mxUtils.bind(this,function(K){try{4==K.readyState&&(200<=K.status&&299>=K.status?c(new LocalFile(this.ui,K.responseText,f.title+this.extension,
+!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}catch(P){if(null!=m)m(P);else throw P;}}),f.title):c(q?new LocalFile(this.ui,p,f.title,!0):new DriveFile(this.ui,p,f))}}catch(K){if(null!=m)m(K);else throw K;}}),mxUtils.bind(this,function(p,q){if(k<this.maxRetries&&null!=q&&403==q.getStatus())k++,window.setTimeout(l,2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=m)m(p);else throw p;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
+9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,d)});l()}}catch(p){if(null!=m)m(p);else throw p;}};DriveClient.prototype.saveFile=function(f,c,m,n,v,d,g,k,l){try{var p=0;f.saveLevel=1;var q=mxUtils.bind(this,function(C){if(null!=n)n(C);else throw C;try{if(!f.isConflict(C)){var G="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(C)||"unknown");null!=C&&null!=C.error&&null!=C.error.code&&(G+="-code_"+C.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
+f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:G,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(N){}}),x=mxUtils.bind(this,function(C){q(C);try{EditorUi.logError(C.message,null,null,
+C)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),z=f.desc.etag,A=f.desc.modifiedDate,K=f.desc.headRevisionId,P=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var L=null,u=!1,D={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,L=f.desc,u=c=!0;else if("application/octet-stream"==D.mimeType||"1"==urlParams["override-mime"]&&D.mimeType!=this.xmlMimeType)D.mimeType=this.xmlMimeType;
+var B=mxUtils.bind(this,function(C,G,N){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));N||(null!=C||d||(C=this.placeholderThumbnail,G=this.placeholderMimeType),null!=C&&null!=G&&(D.thumbnail={image:C,mimeType:G}));var I=f.getData(),F=mxUtils.bind(this,function(W){try{if(f.saveDelay=(new Date).getTime()-
+y,f.saveLevel=11,null==W)q({message:mxResources.get("errorSavingFile")+": Empty response"});else{var J=(new Date(W.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=J||z==W.etag||c&&K==W.headRevisionId){f.saveLevel=12;var V=[];0>=J&&V.push("invalid modified time");z==W.etag&&V.push("stale etag");c&&K==W.headRevisionId&&V.push("stale revision");var U=V.join(", ");q({message:mxResources.get("errorSavingFile")+": "+U},W);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
+null,"from-"+K+"."+A+"-"+this.ui.hashValue(z)+"-to-"+W.headRevisionId+"."+W.modifiedDate+"-"+this.ui.hashValue(W.etag)+(0<U.length?"-errors-"+U:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(X){}}else if(f.saveLevel=null,m(W,I),null!=L){this.executeRequest({url:"/files/"+L.id+"/revisions/"+L.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(X){X.pinned=!0;this.executeRequest({url:"/files/"+L.id+"/revisions/"+
+L.headRevisionId,method:"PUT",params:X})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+L.id+"."+L.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(X){}}}}catch(X){x(X)}}),H=mxUtils.bind(this,function(W,J){f.saveLevel=4;try{null!=k&&(D.properties=k);var V=g||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:f.getCurrentEtag(),U=mxUtils.bind(this,function(E){f.saveLevel=5;try{var M=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,T=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){T=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Q){}this.executeRequest(this.createUploadRequest(f.getId(),D,W,c||E||M,J,E?null:V,u),mxUtils.bind(this,function(Q){window.clearTimeout(O);T&&F(Q)}),mxUtils.bind(this,function(Q){window.clearTimeout(O);
+if(T){f.saveLevel=6;try{f.isConflict(Q)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(S){f.saveLevel=7;try{if(null!=S&&S.etag==V)if(p<this.staleEtagMaxRetries){p++;var Y=2*p*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(X,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",p,"delay",Y)}else{X(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&S.headRevisionId==K&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,
+"remote",S.etag,"rev",f.desc.headRevisionId,"response",[S],"file",[f]),q(Q,S)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(S){x(S)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(E){f.saveLevel=9;if(E||null==V)U(E);else{var M=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){M=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(O){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(O){window.clearTimeout(T);
+if(M){f.saveLevel=10;try{null!=O&&O.headRevisionId==K?("1"==urlParams.test&&V!=O.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",O.etag,"rev",f.desc.headRevisionId,"response",[O],"file",[f]),V=O.etag,U(E)):q({error:{code:412}},O)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(O){window.clearTimeout(T);M&&(f.saveLevel=11,q(O))}))}});if(P&&null==C){f.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var E=this.thumbnailWidth/t.width,M=document.createElement("canvas");
+M.width=this.thumbnailWidth;M.height=Math.floor(t.height*E);M.getContext("2d").drawImage(t,0,0,M.width,M.height);var T=M.toDataURL();T=T.substring(T.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:T,mimeType:"image/png"};X(!1)}catch(O){try{X(!1)}catch(Q){x(Q)}}});t.src="data:image/png;base64,"+W}else X(!1)}catch(E){x(E)}});if(P){var R=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(W){H(W,!0)}),q,this.ui.getCurrentFile()!=f?
+I:null,R.scale,R.border)}else H(I,!1)}catch(W){x(W)}});try{f.saveLevel=2,(d||P||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=D.mimeType&&"application/vnd.jgraph.mxfile"!=D.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(C){try{var G=null;try{null!=C&&(G=C.toDataURL("image/png")),null!=G&&(G=G.length>this.maxThumbnailSize?null:G.substring(G.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(N){G=null}B(G,"image/png")}catch(N){x(N)}})))&&
+B(null,null,f.constructor!=DriveLibrary)}catch(C){x(C)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(C){x(C)}};DriveClient.prototype.insertFile=function(f,c,m,n,v,d,g){d=null!=d?d:this.xmlMimeType;f={mimeType:d,title:f};null!=m&&(f.parents=[{kind:"drive#fileLink",id:m}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,g),mxUtils.bind(this,function(k){d==this.libraryMimeType?n(new DriveLibrary(this.ui,c,k)):0==k?null!=v&&v({message:mxResources.get("errorSavingFile")}):
n(new DriveFile(this.ui,c,k))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,m,n,v,d,g){v=null!=v?v:!1;var k={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=d&&(k["If-Match"]=d);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:k,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=m?v?m:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(m):Graph.base64EncodeUnicode(m):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");g&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),m=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,m){this.filePickerCallback=
@@ -12411,15 +12412,15 @@ this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(g)):n||401!==g.getSta
e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,m,n){n=null!=n?n:!1;this.executeRequest(this.getItemURL(e),mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var d=JSON.parse(v.getText()),g=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||/\.pdf$/i.test(d.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,f,c);
else{var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(p){try{if(window.clearTimeout(l),k){/\.html$/i.test(d.name)&&(p=this.removeExtraHtmlContent(p));var q=null;if(0<(g?p.lastIndexOf(","):-1)){var x=this.ui.extractGraphModelFromPng(p);null!=x&&0<x.length?p=x:q=new LocalFile(this.ui,p,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)){var y=
-p.substring(22);p=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,d["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(p,mxUtils.bind(this,function(A){try{4==A.readyState&&(200<=A.status&&299>=A.status?f(new LocalFile(this.ui,A.responseText,d.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=c)c(B);else throw B;}}),d.name):null!=q?f(q):n?f(new OneDriveLibrary(this.ui,
-p,d)):f(new OneDriveFile(this.ui,p,d))}}catch(A){if(null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(p){window.clearTimeout(l);k&&c(this.parseRequestText(p))}),g||null!=d.file&&null!=d.file.mimeType&&("image/"==d.file.mimeType.substring(0,6)&&"image/svg"!=d.file.mimeType.substring(0,9)||"application/pdf"==d.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(v))}),c)};OneDriveClient.prototype.renameFile=
+p.substring(22);p=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,d["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(p,mxUtils.bind(this,function(z){try{4==z.readyState&&(200<=z.status&&299>=z.status?f(new LocalFile(this.ui,z.responseText,d.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),d.name):null!=q?f(q):n?f(new OneDriveLibrary(this.ui,
+p,d)):f(new OneDriveFile(this.ui,p,d))}}catch(z){if(null!=c)c(z);else throw z;}}),mxUtils.bind(this,function(p){window.clearTimeout(l);k&&c(this.parseRequestText(p))}),g||null!=d.file&&null!=d.file.mimeType&&("image/"==d.file.mimeType.substring(0,6)&&"image/svg"!=d.file.mimeType.substring(0,9)||"application/pdf"==d.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(v))}),c)};OneDriveClient.prototype.renameFile=
function(e,f,c,m){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(n){n?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,m):m()})):m({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,m){f=this.getItemRef(f);var n=this.getItemRef(e);f.driveId!=n.driveId?m({message:mxResources.get("cannotMoveOneDrive",
null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,m)};OneDriveClient.prototype.insertLibrary=function(e,f,c,m,n){this.insertFile(e,f,c,m,!0,n)};OneDriveClient.prototype.insertFile=function(e,f,c,m,n,v){this.isValidFilename(e)?(n=null!=n?n:!1,this.checkExists(v,e,!0,mxUtils.bind(this,function(d){if(d){d="/me/drive/root";null!=v&&(d=this.getItemURL(v,!0));var g=mxUtils.bind(this,function(k){n?
c(new OneDriveLibrary(this.ui,f,k)):c(new OneDriveFile(this.ui,f,k))});d=this.baseUrl+d+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(d,"","PUT",null,mxUtils.bind(this,function(k){this.writeLargeFile(this.getItemURL(k.id),f,g,m)}),m):this.writeFile(d,f,"PUT",null,g,m)}else m()}))):m({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
c,m){var n="/me/drive/root";null!=e&&(n=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+n+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(v){404==v.getStatus()?m(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){m(!0)},function(){m(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){m(!1)}))}),function(v){m(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,
f,c,m){try{var n=e.getData(),v=mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(p){f(p,n)}),l=this.getItemURL(e.getId());4E6<=g.length?this.writeLargeFile(l,g,k,c,m):this.writeFile(l+"/content/",g,"PUT",null,k,c,m)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){v(this.ui.base64ToBlob(g,"image/png"))}),c,this.ui.getCurrentFile()!=e?n:null,d.scale,d.border)}else v(n)}catch(g){c(g)}};
-OneDriveClient.prototype.writeLargeFile=function(e,f,c,m,n){try{if(null!=f){var v=mxUtils.bind(this,function(g,k,l){try{l=l||0;var p=!0,q=null;q=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=f.substr(k,4194304),y=new mxXmlRequest(g,x,"PUT");y.setRequestHeaders=mxUtils.bind(this,function(A,B){A.setRequestHeader("Content-Length",x.length);A.setRequestHeader("Content-Range","bytes "+k+"-"+(k+x.length-1)+"/"+f.length)});y.send(mxUtils.bind(this,
-function(A){window.clearTimeout(q);if(p){var B=A.getStatus();200<=B&&299>=B?(B=k+x.length,B==f.length?c(JSON.parse(A.getText())):v(g,B,l)):500<=B&&599>=B&&2>l?(l++,v(g,k,l)):m(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(q);p&&m(this.parseRequestText(A))}))}catch(A){m(A)}}),d=mxUtils.bind(this,function(g){try{var k=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){k=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var p=new mxXmlRequest(e+
+OneDriveClient.prototype.writeLargeFile=function(e,f,c,m,n){try{if(null!=f){var v=mxUtils.bind(this,function(g,k,l){try{l=l||0;var p=!0,q=null;q=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=f.substr(k,4194304),y=new mxXmlRequest(g,x,"PUT");y.setRequestHeaders=mxUtils.bind(this,function(z,A){z.setRequestHeader("Content-Length",x.length);z.setRequestHeader("Content-Range","bytes "+k+"-"+(k+x.length-1)+"/"+f.length)});y.send(mxUtils.bind(this,
+function(z){window.clearTimeout(q);if(p){var A=z.getStatus();200<=A&&299>=A?(A=k+x.length,A==f.length?c(JSON.parse(z.getText())):v(g,A,l)):500<=A&&599>=A&&2>l?(l++,v(g,k,l)):m(this.parseRequestText(z),z)}}),mxUtils.bind(this,function(z){window.clearTimeout(q);p&&m(this.parseRequestText(z))}))}catch(z){m(z)}}),d=mxUtils.bind(this,function(g){try{var k=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){k=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var p=new mxXmlRequest(e+
"/createUploadSession","{}","POST");p.setRequestHeaders=mxUtils.bind(this,function(q,x){q.setRequestHeader("Content-Type","application/json");q.setRequestHeader("Authorization","Bearer "+b);null!=n&&q.setRequestHeader("If-Match",n)});p.send(mxUtils.bind(this,function(q){window.clearTimeout(l);k&&(200<=q.getStatus()&&299>=q.getStatus()?(q=JSON.parse(q.getText()),v(q.uploadUrl,0)):g||401!==q.getStatus()?m(this.parseRequestText(q),q):this.authenticate(function(){d(!0)},m,g))}),mxUtils.bind(this,function(q){window.clearTimeout(l);
k&&m(this.parseRequestText(q))}))}catch(q){m(q)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){d(!0)},m):d(!1)}else m({message:mxResources.get("unknownError")})}catch(g){m(g)}};OneDriveClient.prototype.writeFile=function(e,f,c,m,n,v,d){try{if(null!=e&&null!=f){var g=mxUtils.bind(this,function(k){try{var l=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){l=!1;v({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(x){}var q=new mxXmlRequest(e,f,c);q.setRequestHeaders=
mxUtils.bind(this,function(x,y){x.setRequestHeader("Content-Type",m||" ");x.setRequestHeader("Authorization","Bearer "+b);null!=d&&x.setRequestHeader("If-Match",d)});q.send(mxUtils.bind(this,function(x){window.clearTimeout(p);l&&(200<=x.getStatus()&&299>=x.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),n(JSON.parse(x.getText()))):k||401!==x.getStatus()?v(this.parseRequestText(x),x):this.authenticate(function(){g(!0)},v,k))}),mxUtils.bind(this,function(x){window.clearTimeout(p);
@@ -12446,33 +12447,33 @@ v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.s
mxUtils.bind(this,function(g,k){n?(window.onGitHubCallback=null,n=!1,null==g?c({message:mxResources.get("accessDenied"),retry:m}):(null!=d&&d(),b=g.access_token,this.setUser(null),v&&this.setPersistentToken("remembered"),f(),null!=k&&k.close())):null!=k&&k.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:m})}),mxUtils.bind(this,function(){n&&(window.onGitHubCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(m){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?
"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,m,n){var v=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout),p=this.authToken+" "+b;e.setRequestHeaders=function(q,x){q.setRequestHeader("Authorization",p)};e.send(mxUtils.bind(this,function(){window.clearTimeout(l);var q=
-mxUtils.bind(this,function(){var A=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){A();d()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(k)if(200<=e.getStatus()&&299>=e.getStatus()||m&&404==e.getStatus())f(e);else if(401===e.getStatus())g?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){d(!0)},c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var x=
-!1;try{var y=JSON.parse(e.getText());null!=y&&"Resource not accessible by integration"==y.message?q():(null!=y&&null!=y.errors&&0<y.errors.length&&(x="too_large"==y.errors[0].code),c({message:mxResources.get(x?"drawingTooLarge":"forbidden")}))}catch(A){c({message:mxResources.get(x?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):q():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),
+mxUtils.bind(this,function(){var z=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){z();d()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(k)if(200<=e.getStatus()&&299>=e.getStatus()||m&&404==e.getStatus())f(e);else if(401===e.getStatus())g?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){d(!0)},c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var x=
+!1;try{var y=JSON.parse(e.getText());null!=y&&"Resource not accessible by integration"==y.message?q():(null!=y&&null!=y.errors&&0<y.errors.length&&(x="too_large"==y.errors[0].code),c({message:mxResources.get(x?"drawingTooLarge":"forbidden")}))}catch(z){c({message:mxResources.get(x?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):q():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),
message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(q){window.clearTimeout(l);k&&c(q)}))}),d=mxUtils.bind(this,function(g){null==this.user?this.updateUser(function(){d(!0)},c,g):v(g)});null==b?this.authenticate(function(){d(!0)},c):d(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,m,n,v,d){var g="&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+
f+"/contents/"+c+"?ref="+m+g,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(k){try{n(k.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(l){v(l)}}),v,null,d)};GitHubClient.prototype.getFile=function(e,f,c,m,n){m=null!=m?m:!1;var v=e.split("/"),d=v[0],g=v[1],k=v[2];e=v.slice(3,v.length).join("/");v=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&v))if(null!=b){n=this.baseUrl+"/repos/"+d+"/"+g+"/contents/"+
e+"?ref="+k;var l={Authorization:"token "+b};v=e.split("/");this.ui.convertFile(n,0<v.length?v[v.length-1]:e,null,this.extension,f,c,null,l)}else c({message:mxResources.get("accessDenied")});else v="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+g+"/contents/"+e+"?ref="+k+v,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(p){try{f(this.createGitHubFile(d,g,k,JSON.parse(p.getText()),m))}catch(q){c(q)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,
c,m,n){e={org:e,repo:f,ref:c,name:m.name,path:m.path,sha:m.sha,html_url:m.html_url,download_url:m.download_url};f=m.content;"base64"===m.encoding&&(/\.jpe?g$/i.test(m.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(m.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(m.name)?(m=this.ui.extractGraphModelFromPng(f),f=null!=m&&0<m.length?m:"data:image/png;base64,"+f):f=Base64.decode(f));return n?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,
-f,c,m,n){this.insertFile(e,f,c,m,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");var g=v[0],k=v[1],l=v[2],p=v.slice(3,v.length).join("/");0<p.length&&(p+="/");p+=e;this.checkExists(g+"/"+k+"/"+l+"/"+p,!0,mxUtils.bind(this,function(q,x){q?n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(y){this.writeFile(g,k,l,p,y,f,x,mxUtils.bind(this,function(A){try{var B=JSON.parse(A.getText());c(this.createGitHubFile(g,k,l,B.content,
-n))}catch(I){m(I)}}),m)}),m)):c(new GitHubFile(this.ui,f,{org:g,repo:k,ref:l,name:e,path:p,sha:x,isNew:!0})):m()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,m){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){n();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){m()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
+f,c,m,n){this.insertFile(e,f,c,m,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");var g=v[0],k=v[1],l=v[2],p=v.slice(3,v.length).join("/");0<p.length&&(p+="/");p+=e;this.checkExists(g+"/"+k+"/"+l+"/"+p,!0,mxUtils.bind(this,function(q,x){q?n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(y){this.writeFile(g,k,l,p,y,f,x,mxUtils.bind(this,function(z){try{var A=JSON.parse(z.getText());c(this.createGitHubFile(g,k,l,A.content,
+n))}catch(K){m(K)}}),m)}),m)):c(new GitHubFile(this.ui,f,{org:g,repo:k,ref:l,name:e,path:p,sha:x,isNew:!0})):m()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,m){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){n();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){m()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
function(e,f,c,m,n,v,d,g,k){v.length>=this.maxFileSize?k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 1 MB)"}):(c={path:m,branch:decodeURIComponent(c),message:n,content:v},null!=d&&(c.sha=d),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+m,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(l){g(l)}),mxUtils.bind(this,function(l){404==l.code&&(l.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
l.code=null);k(l)})))};GitHubClient.prototype.checkExists=function(e,f,c){var m=e.split("/"),n=m[0],v=m[1],d=m[2];e=m.slice(3,m.length).join("/");this.getSha(n,v,e,d,mxUtils.bind(this,function(g){if(f){var k=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){k();c(!0,g)},function(){k();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(g){c(!0)}),
!0)};GitHubClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;f(JSON.parse(y.getText()).content.sha)}),mxUtils.bind(this,function(y){c(y)}))}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(e.meta.sha,
x)}),c,this.ui.getCurrentFile()!=e?e.getData():null,q.scale,q.border)}else l(e.meta.sha,Base64.encode(e.getData()))});m?this.getSha(v,d,k,g,mxUtils.bind(this,function(q){e.meta.sha=q;p()}),c):p()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=
function(e,f){var c=null,m=null,n=null,v=null,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.height="304px";var g=document.createElement("h3");mxUtils.write(g,mxResources.get(e?"selectFile":"selectFolder"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.border="1px solid lightgray";k.style.boxSizing="border-box";k.style.padding="4px";
k.style.overflow="auto";k.style.lineHeight="1.2em";k.style.height="274px";d.appendChild(k);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var p=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+v)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
-function(){t()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(p.container,420,370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(z,L,C,E){var G=document.createElement("a");G.setAttribute("title",z);G.style.cursor="pointer";mxUtils.write(G,z);mxEvent.addListener(G,"click",L);
-E&&(G.style.textDecoration="underline");null!=C&&(z=l.cloneNode(),z.style.padding=C,z.appendChild(G),G=z);return G}),x=mxUtils.bind(this,function(z){var L=document.createElement("div");L.style.marginBottom="8px";L.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=null;t()}),null,!0));z||(mxUtils.write(L," / "),L.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var C=v.split("/");for(z=0;z<C.length;z++)(function(E){mxUtils.write(L,
-" / ");L.appendChild(q(C[E],mxUtils.bind(this,function(){v=C.slice(0,E+1).join("/");I()}),null,!0))})(z)}k.appendChild(L)}),y=mxUtils.bind(this,function(z){this.ui.handleError(z,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,t()):this.ui.hideDialog()}),null,{})}),A=null,B=null,I=mxUtils.bind(this,function(z){null==z&&(k.innerHTML="",z=1);var L=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/contents/"+v+"?ref="+encodeURIComponent(n)+"&per_page=100&page="+
-z,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){I(z+1)});mxEvent.addListener(A,"click",C);this.executeRequest(L,mxUtils.bind(this,function(E){this.ui.spinner.stop();1==z&&(x(),
-k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,t();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");I()}}),"4px")));var G=JSON.parse(E.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var P=!0,J=0;E=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(S,V){if(F==("dir"==S.type)){V=l.cloneNode();V.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;var M=document.createElement("img");
-M.src=IMAGE_PATH+"/"+("dir"==S.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;V.appendChild(M);V.appendChild(q(S.name+("dir"==S.type?"/":""),mxUtils.bind(this,function(){"dir"==S.type?(v=S.path,I()):e&&"file"==S.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+S.path))})));k.appendChild(V);J++}})(G[H],H)});E(!0);e&&E(!1)}}),y,!0)}),O=mxUtils.bind(this,function(z,L){null==z&&(k.innerHTML="",z=1);var C=
-new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/branches?per_page=100&page="+z,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var E=mxUtils.bind(this,function(){O(z+1)});mxEvent.addListener(A,"click",
-E);this.executeRequest(C,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==z&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;t()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&L)n=G[0].name,v="",I();else{for(var P=0;P<G.length;P++)mxUtils.bind(this,function(J,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(J.name,mxUtils.bind(this,
-function(){n=J.name;v="";I()})));k.appendChild(H)})(G[P],P);100==G.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&E()},mxEvent.addListener(k,"scroll",B))}}),y)}),t=mxUtils.bind(this,function(z){null==z&&(k.innerHTML="",z=1);var L=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+z,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=B&&mxEvent.removeListener(k,"scroll",B);null!=A&&null!=
-A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){t(z+1)});mxEvent.addListener(A,"click",C);this.executeRequest(L,mxUtils.bind(this,function(E){this.ui.spinner.stop();E=JSON.parse(E.getText());if(null==E||0==E.length)mxUtils.write(k,mxResources.get("noFiles"));else{1==z&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var P=
-new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var F=J.split("/");if(1<F.length){J=F[0];var H=F[1];3>F.length?(c=J,m=H,v=n=null,O()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(F=encodeURIComponent(F.slice(2,F.length).join("/")),this.getFile(J+"/"+H+"/"+F,mxUtils.bind(this,function(S){this.ui.spinner.stop();c=S.meta.org;m=S.meta.repo;n=decodeURIComponent(S.meta.ref);v="";I()}),mxUtils.bind(this,function(S){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(P.container,300,80,!0,!1);P.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<E.length;G++)mxUtils.bind(this,function(P,J){var F=l.cloneNode();F.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(P.full_name,mxUtils.bind(this,function(){c=P.owner.login;
-m=P.name;v="";O(null,!0)})));k.appendChild(F)})(E[G],G)}100==E.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}),y)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+function(){L()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(p.container,420,370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,D,B,C){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",D);
+C&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var D=document.createElement("div");D.style.marginBottom="8px";D.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=null;L()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;P()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(C){mxUtils.write(D,
+" / ");D.appendChild(q(B[C],mxUtils.bind(this,function(){v=B.slice(0,C+1).join("/");K()}),null,!0))})(u)}k.appendChild(D)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,L()):this.ui.hideDialog()}),null,{})}),z=null,A=null,K=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/contents/"+v+"?ref="+encodeURIComponent(n)+"&per_page=100&page="+
+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){K(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();1==u&&(x(),
+k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,L();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");K()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=!0,I=0;C=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R,W){if(F==("dir"==R.type)){W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");
+J.src=IMAGE_PATH+"/"+("dir"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;W.appendChild(J);W.appendChild(q(R.name+("dir"==R.type?"/":""),mxUtils.bind(this,function(){"dir"==R.type?(v=R.path,K()):e&&"file"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+R.path))})));k.appendChild(W);I++}})(G[H],H)});C(!0);e&&C(!1)}}),y,!0)}),P=mxUtils.bind(this,function(u,D){null==u&&(k.innerHTML="",u=1);var B=
+new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){P(u+1)});mxEvent.addListener(z,"click",
+C);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;L()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",K();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,
+function(){n=I.name;v="";K()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)}),L=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&mxEvent.removeListener(k,"scroll",A);null!=z&&null!=
+z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){L(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();C=JSON.parse(C.getText());if(null==C||0==C.length)mxUtils.write(k,mxResources.get("noFiles"));else{1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=
+new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(I){if(null!=I){var F=I.split("/");if(1<F.length){I=F[0];var H=F[1];3>F.length?(c=I,m=H,v=n=null,P()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(F=encodeURIComponent(F.slice(2,F.length).join("/")),this.getFile(I+"/"+H+"/"+F,mxUtils.bind(this,function(R){this.ui.spinner.stop();c=R.meta.org;m=R.meta.repo;n=decodeURIComponent(R.meta.ref);v="";K()}),mxUtils.bind(this,function(R){this.ui.spinner.stop();
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<C.length;G++)mxUtils.bind(this,function(N,I){var F=l.cloneNode();F.style.backgroundColor=0==I%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(N.full_name,mxUtils.bind(this,function(){c=N.owner.login;
+m=N.name;v="";P(null,!0)})));k.appendChild(F)})(C[G],G)}100==C.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}),y)});L()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(m){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=m;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
function(m){this.savingFile=!1;null!=c&&c(m)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(m){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,m)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@@ -12487,12 +12488,12 @@ TrelloClient.prototype.writeFile=function(b,e,f,c,m){if(null!=b&&null!=e)if(e.le
b);var k=new XMLHttpRequest;k.responseType="json";k.onreadystatechange=mxUtils.bind(this,function(){if(4===k.readyState&&(window.clearTimeout(d),v))if(200==k.status){var l=k.response;l.compoundId=f+this.SEPARATOR+l.id;c(l)}else 401==k.status?this.authenticate(n,m,!0):m()});k.open("POST",this.baseUrl+"cards/"+f+"/attachments");k.send(g)});this.authenticate(n,m)}else m({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};
TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",m=0,n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.height="224px";var v=document.createElement("h3");mxUtils.write(v,b?mxResources.get("selectFile"):mxResources.get("selectCard"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(v);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="auto";d.style.height=
-"194px";n.appendChild(d);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var g=mxUtils.bind(this,function(y,A,B){m++;var I=document.createElement("div");I.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==m%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var O=document.createElement("a");O.style.cursor="pointer";if(null!=B){var t=document.createElement("img");
-t.src=B.url;t.width=B.width;t.height=B.height;t.style="border: 1px solid black;margin:5px;vertical-align:middle";O.appendChild(t)}mxUtils.write(O,y);mxEvent.addListener(O,"click",A);I.appendChild(O);return I}),k=mxUtils.bind(this,function(y){this.ui.handleError(y,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){m=0;d.innerHTML="";this.ui.spinner.spin(d,mxResources.get("loading"));var y=mxUtils.bind(this,function(){Trello.cards.get(f+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(A){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){x()})));mxUtils.br(d);null==A||0==A.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var B=0;B<A.length;B++)mxUtils.bind(this,function(I){d.appendChild(g(I.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+I.id)}),null!=I.previews?I.previews[0]:null))})(A[B])})()}),mxUtils.bind(this,function(A){401==
-A.status?this.authenticate(y,k,!0):null!=k&&k(A)}))});y()}),p=null,q=null,x=mxUtils.bind(this,function(y){null==y&&(m=0,d.innerHTML="",y=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",q);x(y+1)});mxEvent.addListener(p,"click",A);var B=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:y-1},mxUtils.bind(this,function(I){this.ui.spinner.stop();I=null!=I?I.cards:null;if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==y&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var t=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(z){null!=z&&(c=z,x())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(t.container,300,80,!0,!1);t.init()}))),mxUtils.br(d));for(var O=0;O<I.length;O++)mxUtils.bind(this,function(t){d.appendChild(g(t.name,mxUtils.bind(this,function(){b?(f=t.id,l()):(this.ui.hideDialog(),e(t.id))})))})(I[O]);100==I.length&&(d.appendChild(p),q=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&A()},mxEvent.addListener(d,"scroll",q))}}),mxUtils.bind(this,function(I){401==I.status?this.authenticate(B,k,!0):null!=k&&k({message:I.responseText})}))});B()});x()};
+"194px";n.appendChild(d);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var g=mxUtils.bind(this,function(y,z,A){m++;var K=document.createElement("div");K.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==m%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var P=document.createElement("a");P.style.cursor="pointer";if(null!=A){var L=document.createElement("img");
+L.src=A.url;L.width=A.width;L.height=A.height;L.style="border: 1px solid black;margin:5px;vertical-align:middle";P.appendChild(L)}mxUtils.write(P,y);mxEvent.addListener(P,"click",z);K.appendChild(P);return K}),k=mxUtils.bind(this,function(y){this.ui.handleError(y,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){m=0;d.innerHTML="";this.ui.spinner.spin(d,mxResources.get("loading"));var y=mxUtils.bind(this,function(){Trello.cards.get(f+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(z){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){x()})));mxUtils.br(d);null==z||0==z.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<z.length;A++)mxUtils.bind(this,function(K){d.appendChild(g(K.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+K.id)}),null!=K.previews?K.previews[0]:null))})(z[A])})()}),mxUtils.bind(this,function(z){401==
+z.status?this.authenticate(y,k,!0):null!=k&&k(z)}))});y()}),p=null,q=null,x=mxUtils.bind(this,function(y){null==y&&(m=0,d.innerHTML="",y=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var z=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",q);x(y+1)});mxEvent.addListener(p,"click",z);var A=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:y-1},mxUtils.bind(this,function(K){this.ui.spinner.stop();K=null!=K?K.cards:null;if(null==K||0==K.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==y&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var L=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(c=u,x())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(L.container,300,80,!0,!1);L.init()}))),mxUtils.br(d));for(var P=0;P<K.length;P++)mxUtils.bind(this,function(L){d.appendChild(g(L.name,mxUtils.bind(this,function(){b?(f=L.id,l()):(this.ui.hideDialog(),e(L.id))})))})(K[P]);100==K.length&&(d.appendChild(p),q=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&z()},mxEvent.addListener(d,"scroll",q))}}),mxUtils.bind(this,function(K){401==K.status?this.authenticate(A,k,!0):null!=k&&k({message:K.responseText})}))});A()});x()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
@@ -12504,53 +12505,53 @@ l);p.setRequestHeader("PRIVATE_TOKEN",l);p.setRequestHeader("Content-Type","appl
null!=q.errors&&0<q.errors.length&&(p="too_large"==q.errors[0].code)}catch(x){}c({message:mxResources.get(p?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(p){window.clearTimeout(k);g&&c(p)}))}),v=mxUtils.bind(this,function(d){null==this.user?this.updateUser(function(){v(!0)},
c,d):n(d)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,m,n,v){if(null!=n)c(e,n);else{var d=e.length-2,g=mxUtils.bind(this,function(){if(2>d)m({message:mxResources.get("fileNotFound")});else{var k=Math.max(d-1,0),l=e.slice(0,k).join("/");k=e[k];var p=e[d],q=e.slice(d+1,e.length).join("/");l=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+k)+"/repository/"+(f?v?"branches?per_page=1&page=1&ref="+p:"tree?path="+q+"&ref="+p:"files/"+encodeURIComponent(q)+
"?ref="+p);var x=new mxXmlRequest(l,null,"HEAD");this.executeRequest(x,mxUtils.bind(this,function(){200==x.getStatus()?c(e,d):m({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==x.getStatus()?(d--,g()):m({message:mxResources.get("fileNotFound")})}))}});g()}};GitLabClient.prototype.getFile=function(e,f,c,m,n,v){m=null!=m?m:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(d,g){var k=Math.max(g-1,0),l=d.slice(0,k).join("/"),p=d[k],q=d[g];e=d.slice(g+1,d.length).join("/");
-d=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&d))if(null!=b){k="&t="+(new Date).getTime();var x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q;d=e.split("/");this.ui.convertFile(x+k,0<d.length?d[d.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(y,A,B){y=new mxXmlRequest(y,null,"GET");this.executeRequest(y,mxUtils.bind(this,function(I){try{A(this.getFileContent(JSON.parse(I.getText())))}catch(O){B(O)}}),
-B)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q,d=new mxXmlRequest(x+k,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(y){try{f(this.createGitLabFile(l,p,q,JSON.parse(y.getText()),m,g))}catch(A){c(A)}}),c)}),c,v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
+d=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&d))if(null!=b){k="&t="+(new Date).getTime();var x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q;d=e.split("/");this.ui.convertFile(x+k,0<d.length?d[d.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(y,z,A){y=new mxXmlRequest(y,null,"GET");this.executeRequest(y,mxUtils.bind(this,function(K){try{z(this.getFileContent(JSON.parse(K.getText())))}catch(P){A(P)}}),
+A)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q,d=new mxXmlRequest(x+k,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(y){try{f(this.createGitLabFile(l,p,q,JSON.parse(y.getText()),m,g))}catch(z){c(z)}}),c)}),c,v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,m,n,v){var d=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:m.file_name,path:m.file_path,html_url:d+e+"/"+f+"/blob/"+c+"/"+m.file_path,download_url:d+e+"/"+f+"/raw/"+c+"/"+m.file_path+
-"?inline=false",last_commit_id:m.last_commit_id,refPos:v};m=this.getFileContent(m);return n?new GitLabLibrary(this.ui,m,e):new GitLabFile(this.ui,m,e)};GitLabClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(g,k){var l=Math.max(k-1,0),p=g.slice(0,l).join("/"),q=g[l],x=g[k];path=g.slice(k+1,g.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(p+"/"+q+"/"+x+"/"+path,!0,mxUtils.bind(this,function(y,A){y?
-n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(B){this.writeFile(p,q,x,path,B,f,A,mxUtils.bind(this,function(I){try{var O=JSON.parse(I.getText());c(this.createGitLabFile(p,q,x,null!=O.content?O.content:O,n,k))}catch(t){m(t)}}),m)}),m)):(y=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:p,repo:q,ref:x,name:e,path:path,html_url:y+p+"/"+q+"/blob/"+x+"/"+path,download_url:y+p+"/"+q+"/raw/"+x+"/"+path+"?inline=false",refPos:k,last_commit_id:A,isNew:!0}))):m()}))}),
+"?inline=false",last_commit_id:m.last_commit_id,refPos:v};m=this.getFileContent(m);return n?new GitLabLibrary(this.ui,m,e):new GitLabFile(this.ui,m,e)};GitLabClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(g,k){var l=Math.max(k-1,0),p=g.slice(0,l).join("/"),q=g[l],x=g[k];path=g.slice(k+1,g.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(p+"/"+q+"/"+x+"/"+path,!0,mxUtils.bind(this,function(y,z){y?
+n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(A){this.writeFile(p,q,x,path,A,f,z,mxUtils.bind(this,function(K){try{var P=JSON.parse(K.getText());c(this.createGitLabFile(p,q,x,null!=P.content?P.content:P,n,k))}catch(L){m(L)}}),m)}),m)):(y=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:p,repo:q,ref:x,name:e,path:path,html_url:y+p+"/"+q+"/blob/"+x+"/"+path,download_url:y+p+"/"+q+"/raw/"+x+"/"+path+"?inline=false",refPos:k,last_commit_id:z,isNew:!0}))):m()}))}),
m,null,4>=v.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(m){if(f){var n=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){n();c(!0,m.getCurrentEtag())},function(){n();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(m){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,
f,c,m,n,v,d,g,k){if(v.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 10 MB)"});else{var l="POST";c={path:encodeURIComponent(m),branch:decodeURIComponent(c),commit_message:n,content:v,encoding:"base64"};null!=d&&(c.last_commit_id=d,l="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(m);l=new mxXmlRequest(e,JSON.stringify(c),l);this.executeRequest(l,mxUtils.bind(this,function(p){g(p)}),
-k)}};GitLabClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;this.getFile(v+"/"+d+"/"+g+"/"+k,mxUtils.bind(this,function(A){A.getData()==e.getData()?f(A.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);
+k)}};GitLabClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;this.getFile(v+"/"+d+"/"+g+"/"+k,mxUtils.bind(this,function(z){z.getData()==e.getData()?f(z.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);
this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(e.meta.last_commit_id,x)}),c,this.ui.getCurrentFile()!=e?e.getData():null,q.scale,q.border)}else l(e.meta.last_commit_id,Base64.encode(e.getData()))});m?this.getFile(v+"/"+d+"/"+g+"/"+k,mxUtils.bind(this,function(q){e.meta.last_commit_id=q.meta.last_commit_id;p()}),c):p()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,m=null,n=null,v=null,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.height="304px";var g=document.createElement("h3");mxUtils.write(g,mxResources.get(e?"selectFile":"selectFolder"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var k=document.createElement("div");k.style.whiteSpace=
"nowrap";k.style.border="1px solid lightgray";k.style.boxSizing="border-box";k.style.padding="4px";k.style.overflow="auto";k.style.lineHeight="1.2em";k.style.height="274px";d.appendChild(k);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var p=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+v)}));this.ui.showDialog(p.container,420,
-370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(z,L,C,E){var G=document.createElement("a");G.setAttribute("title",z);G.style.cursor="pointer";mxUtils.write(G,z);mxEvent.addListener(G,"click",L);E&&(G.style.textDecoration="underline");null!=C&&(z=l.cloneNode(),z.style.padding=C,z.appendChild(G),G=z);return G}),x=mxUtils.bind(this,function(z){var L=document.createElement("div");L.style.marginBottom="8px";L.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=
-null;t()}),null,!0));z||(mxUtils.write(L," / "),L.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var C=v.split("/");for(z=0;z<C.length;z++)(function(E){mxUtils.write(L," / ");L.appendChild(q(C[E],mxUtils.bind(this,function(){v=C.slice(0,E+1).join("/");I()}),null,!0))})(z)}k.appendChild(L)}),y=mxUtils.bind(this,function(z){this.ui.handleError(z,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,
-t()):this.ui.hideDialog()}))}),A=null,B=null,I=mxUtils.bind(this,function(z){null==z&&(k.innerHTML="",z=1);var L=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/tree?path="+v+"&ref="+n+"&per_page=100&page="+z,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display=
-"block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){I(z+1)});mxEvent.addListener(A,"click",C);this.executeRequest(L,mxUtils.bind(this,function(E){this.ui.spinner.stop();1==z&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,t();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");I()}}),"4px")));var G=JSON.parse(E.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var P=
-!0,J=0;E=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(S){if(F==("tree"==S.type)){var V=l.cloneNode();V.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("tree"==S.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;V.appendChild(M);V.appendChild(q(S.name+("tree"==S.type?"/":""),mxUtils.bind(this,function(){"tree"==
-S.type?(v=S.path,I()):e&&"blob"==S.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+n+"/"+S.path))})));k.appendChild(V);J++}})(G[H])});E(!0);e&&E(!1);100==J&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}}),y,!0)}),O=mxUtils.bind(this,function(z,L){null==z&&(k.innerHTML="",z=1);var C=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/branches?per_page=100&page="+z,null,"GET");p.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var E=mxUtils.bind(this,function(){O(z+1)});mxEvent.addListener(A,"click",E);this.executeRequest(C,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==z&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,
-function(){v=null;t()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&L)n=G[0].name,v="",I();else{for(var P=0;P<G.length;P++)mxUtils.bind(this,function(J,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(J.name,mxUtils.bind(this,function(){n=encodeURIComponent(J.name);v="";I()})));k.appendChild(H)})(G[P],P);100==G.length&&(k.appendChild(A),B=function(){k.scrollTop>=
-k.scrollHeight-k.offsetHeight&&E()},mxEvent.addListener(k,"scroll",B))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var t=mxUtils.bind(this,function(z){var L=this.ui.spinner,C=0;this.ui.spinner.stop();var E=function(){L.spin(k,mxResources.get("loading"));C+=1},G=function(){--C;0===C&&L.stop()};null==z&&(k.innerHTML="",z=1);null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");
-A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var P=mxUtils.bind(this,function(){0===C&&t(z+1)});mxEvent.addListener(A,"click",P);var J=mxUtils.bind(this,function(H){E();var S=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(S,mxUtils.bind(this,function(V){H(JSON.parse(V.getText()));G()}),y)}),F=mxUtils.bind(this,function(H,S){E();var V=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(V,mxUtils.bind(this,function(M){S(H,JSON.parse(M.getText()));G()}),y)});J(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(k,mxResources.get("loggedOut"));else{E();var S=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+z,null,"GET");this.executeRequest(S,mxUtils.bind(this,function(V){V=JSON.parse(V.getText());if(null!=V&&0!=V.length||null!=H&&0!=H.length){1==z&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){if(0===C){var U=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(X){null!=X&&(X=X.split("/"),1<X.length?(c=X[0],m=X[1],n=v=null,2<X.length?(n=encodeURIComponent(X.slice(2,X.length).join("/")),I()):O(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(U.container,300,80,!0,!1);U.init()}}))),mxUtils.br(k),mxUtils.br(k));for(var M=!0,W=0;W<V.length;W++)mxUtils.bind(this,
-function(U){var X=l.cloneNode();X.style.backgroundColor=M?Editor.isDarkMode()?"#000000":"#eeeeee":"";M=!M;X.appendChild(q(U.name_with_namespace,mxUtils.bind(this,function(){0===C&&(c=U.owner.username,m=U.path,v="",O(null,!0))})));k.appendChild(X)})(V[W]);for(W=0;W<H.length;W++)E(),F(H[W],mxUtils.bind(this,function(U,X){G();for(var u=0;u<X.length;u++){var D=l.cloneNode();D.style.backgroundColor=M?"dark"==uiTheme?"#000000":"#eeeeee":"";M=!M;mxUtils.bind(this,function(K){D.appendChild(q(K.name_with_namespace,
-mxUtils.bind(this,function(){0===C&&(c=U.full_path,m=K.path,v="",O(null,!0))})));k.appendChild(D)})(X[u])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==V.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&P()},mxEvent.addListener(k,"scroll",B))}),y)}}))});b?this.user?t():this.updateUser(function(){t()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){t()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
+370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,D,B,C){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",D);C&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var D=document.createElement("div");D.style.marginBottom="8px";D.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=
+null;L()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;P()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(C){mxUtils.write(D," / ");D.appendChild(q(B[C],mxUtils.bind(this,function(){v=B.slice(0,C+1).join("/");K()}),null,!0))})(u)}k.appendChild(D)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,
+L()):this.ui.hideDialog()}))}),z=null,A=null,K=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/tree?path="+v+"&ref="+n+"&per_page=100&page="+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display=
+"block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){K(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();1==u&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,L();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");K()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=
+!0,I=0;C=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R){if(F==("tree"==R.type)){var W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");J.src=IMAGE_PATH+"/"+("tree"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;W.appendChild(J);W.appendChild(q(R.name+("tree"==R.type?"/":""),mxUtils.bind(this,function(){"tree"==
+R.type?(v=R.path,K()):e&&"blob"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+n+"/"+R.path))})));k.appendChild(W);I++}})(G[H])});C(!0);e&&C(!1);100==I&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}}),y,!0)}),P=mxUtils.bind(this,function(u,D){null==u&&(k.innerHTML="",u=1);var B=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){P(u+1)});mxEvent.addListener(z,"click",C);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,
+function(){v=null;L()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",K();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,function(){n=encodeURIComponent(I.name);v="";K()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=
+k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var L=mxUtils.bind(this,function(u){var D=this.ui.spinner,B=0;this.ui.spinner.stop();var C=function(){D.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&D.stop()};null==u&&(k.innerHTML="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");
+z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var N=mxUtils.bind(this,function(){0===B&&L(u+1)});mxEvent.addListener(z,"click",N);var I=mxUtils.bind(this,function(H){C();var R=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(R,mxUtils.bind(this,function(W){H(JSON.parse(W.getText()));G()}),y)}),F=mxUtils.bind(this,function(H,R){C();var W=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(W,mxUtils.bind(this,function(J){R(H,JSON.parse(J.getText()));G()}),y)});I(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(k,mxResources.get("loggedOut"));else{C();var R=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+u,null,"GET");this.executeRequest(R,mxUtils.bind(this,function(W){W=JSON.parse(W.getText());if(null!=W&&0!=W.length||null!=H&&0!=H.length){1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){if(0===B){var U=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(X){null!=X&&(X=X.split("/"),1<X.length?(c=X[0],m=X[1],n=v=null,2<X.length?(n=encodeURIComponent(X.slice(2,X.length).join("/")),K()):P(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(U.container,300,80,!0,!1);U.init()}}))),mxUtils.br(k),mxUtils.br(k));for(var J=!0,V=0;V<W.length;V++)mxUtils.bind(this,
+function(U){var X=l.cloneNode();X.style.backgroundColor=J?Editor.isDarkMode()?"#000000":"#eeeeee":"";J=!J;X.appendChild(q(U.name_with_namespace,mxUtils.bind(this,function(){0===B&&(c=U.owner.username,m=U.path,v="",P(null,!0))})));k.appendChild(X)})(W[V]);for(V=0;V<H.length;V++)C(),F(H[V],mxUtils.bind(this,function(U,X){G();for(var t=0;t<X.length;t++){var E=l.cloneNode();E.style.backgroundColor=J?"dark"==uiTheme?"#000000":"#eeeeee":"";J=!J;mxUtils.bind(this,function(M){E.appendChild(q(M.name_with_namespace,
+mxUtils.bind(this,function(){0===B&&(c=U.full_path,m=M.path,v="",P(null,!0))})));k.appendChild(E)})(X[t])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==W.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&N()},mxEvent.addListener(k,"scroll",A))}),y)}}))});b?this.user?L():this.updateUser(function(){L()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){L()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,m,n,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=m;this.isResolved=n;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,m){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,m,n,v,d){DrawioComment.call(this,b,e,f,c,m,n,v);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,m){b={content:b.content};c?b.verb="resolve":m&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};
DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(N,Q){Q=Q||document;return Q.querySelector(N)}function A(N,Q,R){if(null==N["@microsoft.graph.downloadUrl"])if(null==N.parentReference)R();else{c(N.id,N.parentReference.driveId,function(ea){A(ea,Q,R)},R);return}var Y=new XMLHttpRequest;Y.open("GET",N["@microsoft.graph.downloadUrl"]);var ba=N.file?"image/png"==N.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ea=Y.responseText;
-ba&&(ea="data:image/png;base64,"+Editor.base64Encode(ea),ea=Editor.extractGraphModelFromPng(ea));var Z=mxUtils.parseXml(ea),fa="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=fa){Q(fa.ownerDocument);return}}catch(aa){}R()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function B(){p&&null!=F?J.exportToCanvas(function(N){N=EditorUi.prototype.createImageDataUri(N,null,"png");v(H,N);n(H)},400,
-null,null,function(N){console.log(N)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function I(N){function Q(R){D.style.background="transparent";D.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,R);D.appendChild(Y);P.stop()}if(null!=D)if(D.style.background="transparent",D.innerHTML="",null==N||N.folder||/\.drawiolib$/.test(N.name))Q(mxResources.get("noPreview"));else try{null!=N.remoteItem&&(N=N.remoteItem),U=N,P.spin(D),A(N,function(R){P.stop();
-if(U==N)if("mxlibrary"==R.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=R.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(D,0==Y.length?R.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(R){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var N=y(".odFilesBreadcrumb");if(null!=N){N.innerHTML="";for(var Q=0;Q<M.length-1;Q++){var R=document.createElement("span");R.className="odBCFolder";R.innerHTML=
-mxUtils.htmlEntities(M[Q].name||mxResources.get("home"));N.appendChild(R);(function(ba,ea){R.addEventListener("click",function(){e(null);M=M.slice(0,ea);z(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(M[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";N.appendChild(Y)}null!=M[M.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==M.length?mxResources.get("officeSelDiag"):M[M.length-1].name||mxResources.get("home")),N.appendChild(Q))}}function t(){if(null!=
-H&&!V)if("sharepoint"==S)z("site",null,H.id,H.displayName);else if("site"==S)z("subsite",null,H.id,H.name);else{var N=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||S,R=H.id;N?z(Q,R,null,H.name):B()}}function z(N,Q,R,Y,ba){function ea(qa){P.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var Aa=null,Ha=0,Na=0;null!=qa&&Na<qa.length;Na++){var Ga=qa[Na];if(1!=fa||!Ga.webUrl||0<Ga.webUrl.indexOf("sharepoint.com/sites/")||
+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(O,Q){Q=Q||document;return Q.querySelector(O)}function z(O,Q,S){if(null==O["@microsoft.graph.downloadUrl"])if(null==O.parentReference)S();else{c(O.id,O.parentReference.driveId,function(ea){z(ea,Q,S)},S);return}var Y=new XMLHttpRequest;Y.open("GET",O["@microsoft.graph.downloadUrl"]);var ba=O.file?"image/png"==O.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ea=Y.responseText;
+ba&&(ea="data:image/png;base64,"+Editor.base64Encode(ea),ea=Editor.extractGraphModelFromPng(ea));var Z=mxUtils.parseXml(ea),fa="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=fa){Q(fa.ownerDocument);return}}catch(aa){}S()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function A(){p&&null!=F?I.exportToCanvas(function(O){O=EditorUi.prototype.createImageDataUri(O,null,"png");v(H,O);n(H)},400,
+null,null,function(O){console.log(O)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function K(O){function Q(S){E.style.background="transparent";E.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,S);E.appendChild(Y);N.stop()}if(null!=E)if(E.style.background="transparent",E.innerHTML="",null==O||O.folder||/\.drawiolib$/.test(O.name))Q(mxResources.get("noPreview"));else try{null!=O.remoteItem&&(O=O.remoteItem),U=O,N.spin(E),z(O,function(S){N.stop();
+if(U==O)if("mxlibrary"==S.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=S.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(E,0==Y.length?S.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(S){H=null,Q(mxResources.get("notADiagramFile"))}}function P(){var O=y(".odFilesBreadcrumb");if(null!=O){O.innerHTML="";for(var Q=0;Q<J.length-1;Q++){var S=document.createElement("span");S.className="odBCFolder";S.innerHTML=
+mxUtils.htmlEntities(J[Q].name||mxResources.get("home"));O.appendChild(S);(function(ba,ea){S.addEventListener("click",function(){e(null);J=J.slice(0,ea);u(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(J[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";O.appendChild(Y)}null!=J[J.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==J.length?mxResources.get("officeSelDiag"):J[J.length-1].name||mxResources.get("home")),O.appendChild(Q))}}function L(){if(null!=
+H&&!W)if("sharepoint"==R)u("site",null,H.id,H.displayName);else if("site"==R)u("subsite",null,H.id,H.name);else{var O=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||R,S=H.id;O?u(Q,S,null,H.name):A()}}function u(O,Q,S,Y,ba){function ea(qa){N.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var Aa=null,Ha=0,Na=0;null!=qa&&Na<qa.length;Na++){var Ga=qa[Na];if(1!=fa||!Ga.webUrl||0<Ga.webUrl.indexOf("sharepoint.com/sites/")||
0>Ga.webUrl.indexOf("sharepoint.com/")){var Fa=Ga.displayName||Ga.name,Ea=mxUtils.htmlEntities(Ga.description||Fa);fa&&(Ga.folder=2==fa?{isRoot:!0}:!0);var La=null!=Ga.folder;if(!g||La){var za=document.createElement("tr");za.className=Ha++%2?"odOddRow":"odEvenRow";var ta=document.createElement("td");ta.style.width="36px";var ka=document.createElement("img");ka.src="/images/"+(La?"folder.png":"file.png");ka.className="odFileImg";ta.appendChild(ka);za.appendChild(ta);ta=document.createElement("td");
-La=document.createElement("div");La.className="odFileTitle";La.innerHTML=mxUtils.htmlEntities(Fa);La.setAttribute("title",Ea);ta.appendChild(La);za.appendChild(ta);Ca.appendChild(za);null==Aa&&(Aa=za,Aa.className+=" odRowSelected",H=Ga,S=N,x||e(H));(function(oa,sa){za.addEventListener("dblclick",t);za.addEventListener("click",function(){Aa!=sa&&(Aa.className=Aa.className.replace("odRowSelected",""),Aa=sa,Aa.className+=" odRowSelected",H=oa,S=N,x||e(H))})})(Ga,za)}}}0==Ha?(qa=document.createElement("div"),
-qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(qa)):va.appendChild(Ca);O();V=!1}if(!V){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=D&&(D.innerHTML="",D.style.top="50%");var Z=V=!0,fa=0;W=arguments;var aa=setTimeout(function(){V=Z=!1;P.stop();d(mxResources.get("timeout"))},2E4),va=y(".odFilesList");va.innerHTML="";P.spin(va);switch(N){case "recent":M=[{name:mxResources.get("recent",
-null,"Recent"),driveId:N}];var ja=m()||{};var Ba=[],Da;for(Da in ja)Ba.push(ja[Da]);clearTimeout(aa);ea(Ba);return;case "shared":ja="/me/drive/sharedWithMe";M=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:N}];break;case "sharepoint":ja="/sites?search=";M=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:N}];fa=1;break;case "site":M.push({name:Y,driveId:N,folderId:Q,siteId:R});ja="/sites/"+R+"/drives";fa=2;break;case "subsite":M.push({name:Y,driveId:N,
-folderId:Q,siteId:R});ja="/drives/"+R+(Q?"/items/"+Q:"/root")+"/children";break;case "search":N=S;M=[{driveId:N,name:mxResources.get("back",null,"Back")}];ba=encodeURIComponent(ba.replace(/'/g,"\\'"));ja=N?"/drives/"+N+"/root/search(q='"+ba+"')":"/me/drive/root/search(q='"+ba+"')";break;default:null==Q?M=[{driveId:N}]:M.push({name:Y,driveId:N,folderId:Q}),ja=(N?"/drives/"+N:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}fa||(ja+=(0<ja.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
+La=document.createElement("div");La.className="odFileTitle";La.innerHTML=mxUtils.htmlEntities(Fa);La.setAttribute("title",Ea);ta.appendChild(La);za.appendChild(ta);Ca.appendChild(za);null==Aa&&(Aa=za,Aa.className+=" odRowSelected",H=Ga,R=O,x||e(H));(function(oa,sa){za.addEventListener("dblclick",L);za.addEventListener("click",function(){Aa!=sa&&(Aa.className=Aa.className.replace("odRowSelected",""),Aa=sa,Aa.className+=" odRowSelected",H=oa,R=O,x||e(H))})})(Ga,za)}}}0==Ha?(qa=document.createElement("div"),
+qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(qa)):va.appendChild(Ca);P();W=!1}if(!W){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=E&&(E.innerHTML="",E.style.top="50%");var Z=W=!0,fa=0;V=arguments;var aa=setTimeout(function(){W=Z=!1;N.stop();d(mxResources.get("timeout"))},2E4),va=y(".odFilesList");va.innerHTML="";N.spin(va);switch(O){case "recent":J=[{name:mxResources.get("recent",
+null,"Recent"),driveId:O}];var ja=m()||{};var Ba=[],Da;for(Da in ja)Ba.push(ja[Da]);clearTimeout(aa);ea(Ba);return;case "shared":ja="/me/drive/sharedWithMe";J=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:O}];break;case "sharepoint":ja="/sites?search=";J=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:O}];fa=1;break;case "site":J.push({name:Y,driveId:O,folderId:Q,siteId:S});ja="/sites/"+S+"/drives";fa=2;break;case "subsite":J.push({name:Y,driveId:O,
+folderId:Q,siteId:S});ja="/drives/"+S+(Q?"/items/"+Q:"/root")+"/children";break;case "search":O=R;J=[{driveId:O,name:mxResources.get("back",null,"Back")}];ba=encodeURIComponent(ba.replace(/'/g,"\\'"));ja=O?"/drives/"+O+"/root/search(q='"+ba+"')":"/me/drive/root/search(q='"+ba+"')";break;default:null==Q?J=[{driveId:O}]:J.push({name:Y,driveId:O,folderId:Q}),ja=(O?"/drives/"+O:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}fa||(ja+=(0<ja.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
f(ja,function(qa){if(Z){clearTimeout(aa);qa=qa.value||[];for(var Ca=x||fa?qa:[],Aa=0;!fa&&!x&&Aa<qa.length;Aa++){var Ha=qa[Aa],Na=Ha.file?Ha.file.mimeType:null;(Ha.folder||"text/html"==Na||"text/xml"==Na||"application/xml"==Na||"image/png"==Na||/\.svg$/.test(Ha.name)||/\.html$/.test(Ha.name)||/\.xml$/.test(Ha.name)||/\.png$/.test(Ha.name)||/\.drawio$/.test(Ha.name)||/\.drawiolib$/.test(Ha.name))&&Ca.push(Ha)}ea(Ca)}},function(qa){if(Z){clearTimeout(aa);var Ca=null;try{Ca=JSON.parse(qa.responseText).error.message}catch(Aa){}d(mxResources.get("errorFetchingFolder",
-null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));V=!1;P.stop()}})}}function L(N){K.className=K.className.replace("odCatSelected","");K=N;K.className+=" odCatSelected"}function C(N){V||(T=null,z("search",null,null,null,N))}var E="";null==e&&(e=I,E='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var N=null;try{N=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return N});null==n&&(n=function(N){if(null!=N){var Q=m()||{};delete N["@microsoft.graph.downloadUrl"];
-Q[N.id]=N;localStorage.setItem("mxODPickerRecentList",JSON.stringify(Q))}});E='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+
+null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));W=!1;N.stop()}})}}function D(O){M.className=M.className.replace("odCatSelected","");M=O;M.className+=" odCatSelected"}function B(O){W||(T=null,u("search",null,null,null,O))}var C="";null==e&&(e=K,C='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var O=null;try{O=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return O});null==n&&(n=function(O){if(null!=O){var Q=m()||{};delete O["@microsoft.graph.downloadUrl"];
+Q[O.id]=O;localStorage.setItem("mxODPickerRecentList",JSON.stringify(Q))}});C='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+
mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+
-E+(k?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(l?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(g?"save":"open"))+"</button>":"");var G=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();G=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+C+(k?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(l?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(g?"save":"open"))+"</button>":"");var G=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();G=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(G?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(G?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),J=new Editor,F=null,H=null,S=null,V=!1,M=[],W=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");X.appendChild(u);u.type="text/css";u.id="mxODPickerCss";u.appendChild(document.createTextNode(G))}b.innerHTML=
-E;var D=y(".odPreview"),K=y("#odFiles");b=function(N,Q){Q=Q||document;return Q.querySelectorAll(N)}(".odCatListTitle");for(E=0;E<b.length;E++)b[E].addEventListener("click",function(){H=U=null;if(!V)switch(L(this),this.id){case "odFiles":z();break;case "odRecent":z("recent");break;case "odShared":z("shared");break;case "odSharepoint":z("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(N){var Q=this;null!=T&&clearTimeout(T);13==N.keyCode?C(Q.value):T=setTimeout(function(){C(Q.value)},
-500)});y("#refreshOD").addEventListener("click",function(){null!=W&&(e(null),z.apply(this,W))});k&&y("#odBackBtn").addEventListener("click",k);l&&y("#odSubmitBtn").addEventListener("click",B);null!=q?(k=q.pop(),"sharepoint"==q[0].driveId&&L(y("#odSharepoint")),M=q,z(k.driveId,k.folderId,k.siteId,k.name)):z()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var m={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
+var N=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),I=new Editor,F=null,H=null,R=null,W=!1,J=[],V=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");X.appendChild(t);t.type="text/css";t.id="mxODPickerCss";t.appendChild(document.createTextNode(G))}b.innerHTML=
+C;var E=y(".odPreview"),M=y("#odFiles");b=function(O,Q){Q=Q||document;return Q.querySelectorAll(O)}(".odCatListTitle");for(C=0;C<b.length;C++)b[C].addEventListener("click",function(){H=U=null;if(!W)switch(D(this),this.id){case "odFiles":u();break;case "odRecent":u("recent");break;case "odShared":u("shared");break;case "odSharepoint":u("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(O){var Q=this;null!=T&&clearTimeout(T);13==O.keyCode?B(Q.value):T=setTimeout(function(){B(Q.value)},
+500)});y("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),u.apply(this,V))});k&&y("#odBackBtn").addEventListener("click",k);l&&y("#odSubmitBtn").addEventListener("click",A);null!=q?(k=q.pop(),"sharepoint"==q[0].driveId&&D(y("#odSharepoint")),J=q,u(k.driveId,k.folderId,k.siteId,k.name)):u()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var m={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"};
c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(m.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(m)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
@@ -12568,12 +12569,12 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b){navigator.serviceWorker.getRegistrations().then(function(e){if(null!=e&&0<e.length){for(var f=0;f<e.length;f++)e[f].unregister();null!=b&&b()}})};
-App.main=function(b,e){function f(l){mxUtils.getAll("1"!=urlParams.dev?[l]:[l,STYLE_PATH+"/default.xml"],function(p){function q(){var t=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.main=function(b,e){function f(l){mxUtils.getAll("1"!=urlParams.dev?[l]:[l,STYLE_PATH+"/default.xml"],function(p){function q(){var L=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(t);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[t,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(p[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var x=function(t){if(null!=t)for(var z=0;z<t.length;z++)if(!y[t[z]])throw Error(mxResources.get("invalidInput")+
-' "'+t[z])+'"';return!0},y={},A;for(A in App.pluginRegistry)y[App.pluginRegistry[A]]=!0;var B=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=B&&x(B.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(B));if(null!=B.merge){var I=localStorage.getItem(Editor.configurationKey);if(null!=I)try{var O=JSON.parse(I);for(A in B.merge)O[A]=B.merge[A];B=O}catch(t){window.location.hash="",alert(t)}else B=B.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
-(localStorage.setItem(Editor.configurationKey,JSON.stringify(B)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(t){window.location.hash="",alert(t)}1<p.length&&(Graph.prototype.defaultThemes["default-style2"]=p[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=p[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(L);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[L,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(p[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var x=function(L){if(null!=L)for(var u=0;u<L.length;u++)if(!y[L[u]])throw Error(mxResources.get("invalidInput")+
+' "'+L[u])+'"';return!0},y={},z;for(z in App.pluginRegistry)y[App.pluginRegistry[z]]=!0;var A=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=A&&x(A.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(A));if(null!=A.merge){var K=localStorage.getItem(Editor.configurationKey);if(null!=K)try{var P=JSON.parse(K);for(z in A.merge)P[z]=A.merge[z];A=P}catch(L){window.location.hash="",alert(L)}else A=A.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+(localStorage.setItem(Editor.configurationKey,JSON.stringify(A)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(L){window.location.hash="",alert(L)}1<p.length&&(Graph.prototype.defaultThemes["default-style2"]=p[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=p[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
q))},function(p){p=document.getElementById("geStatus");null!=p&&(p.innerHTML="Error loading page. <a>Please try refreshing.</a>",p.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var l=
parseInt(mxSettings.settings.autosaveDelay);!isNaN(l)&&0<l?(DrawioFile.prototype.autosaveDelay=l,EditorUi.debug("Setting autosaveDelay",l)):EditorUi.debug("Invalid autosaveDelay",l)}null!=mxSettings.settings.defaultEdgeLength&&(l=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(l)&&0<l?(Graph.prototype.defaultEdgeLength=l,EditorUi.debug("Using defaultEdgeLength",l)):EditorUi.debug("Invalid defaultEdgeLength",l))}}catch(q){null!=window.console&&console.error(q)}if(null!=Menus.prototype.defaultFonts)for(l=
0;l<Menus.prototype.defaultFonts.length;l++){var p=Menus.prototype.defaultFonts[l];"string"!==typeof p&&null!=p.fontFamily&&null!=p.fontUrl&&Graph.addFont(p.fontFamily,p.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(l,p,q,x,y){EditorUi.logError("Global: "+(null!=l?l:""),p,q,x,y,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||
@@ -12634,9 +12635,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
App.prototype.getThumbnail=function(b,e){var f=!1;try{var c=!0,m=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),n=mxUtils.bind(this,function(G){window.clearTimeout(m);c&&e(G)});null==this.thumbImageCache&&(this.thumbImageCache={});var v=this.editor.graph,d=v.backgroundImage,g=null!=v.themes&&"darkTheme"==v.defaultThemeName;if(null!=this.pages&&(g||this.currentPage!=this.pages[0])){var k=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());v.setBackgroundImage=
this.editor.graph.setBackgroundImage;var l=this.pages[0];this.currentPage==l?v.setBackgroundImage(d):null!=l.viewState&&null!=l.viewState&&(d=l.viewState.backgroundImage,v.setBackgroundImage(d));v.getGlobalVariable=function(G){return"page"==G?l.getName():"pagenumber"==G?1:k.apply(this,arguments)};v.getGlobalVariable=k;document.body.appendChild(v.container);v.model.setRoot(l.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{v!=this.editor.graph&&
-null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(P){G=null}n(G)}),b,this.thumbImageCache,"#ffffff",function(){n()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=v.getGraphBounds(),x=v.view.translate,y=v.view.scale;null!=d&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((x.x+d.x)*y,(x.y+d.y)*y,d.width*y,d.height*y)));var A=b/q.width;
-A=Math.min(1,Math.min(3*b/(4*q.height),A));var B=Math.floor(q.x),I=Math.floor(q.y);p.setAttribute("width",Math.ceil(A*(q.width+4)));p.setAttribute("height",Math.ceil(A*(q.height+4)));var O=p.getContext("2d");O.scale(A,A);O.translate(-B,-I);var t=v.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";O.save();O.fillStyle=t;O.fillRect(B,I,Math.ceil(q.width+4),Math.ceil(q.height+4));O.restore();if(null!=d){var z=new Image;z.src=d.src;O.drawImage(z,d.x*A,d.y*A,d.width*A,d.height*A)}var L=new mxJsCanvas(p),
-C=new mxAsyncCanvas(this.thumbImageCache);L.images=this.thumbImageCache.images;var E=new mxImageExport;E.drawShape=function(G,P){G.shape instanceof mxShape&&G.shape.checkBounds()&&(P.save(),P.translate(.5,.5),G.shape.paint(P),P.translate(-.5,-.5),P.restore())};E.drawText=function(G,P){};E.drawState(v.getView().getState(v.model.root),C);C.finish(mxUtils.bind(this,function(){try{E.drawState(v.getView().getState(v.model.root),L),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p=
+null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(N){G=null}n(G)}),b,this.thumbImageCache,"#ffffff",function(){n()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=v.getGraphBounds(),x=v.view.translate,y=v.view.scale;null!=d&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((x.x+d.x)*y,(x.y+d.y)*y,d.width*y,d.height*y)));var z=b/q.width;
+z=Math.min(1,Math.min(3*b/(4*q.height),z));var A=Math.floor(q.x),K=Math.floor(q.y);p.setAttribute("width",Math.ceil(z*(q.width+4)));p.setAttribute("height",Math.ceil(z*(q.height+4)));var P=p.getContext("2d");P.scale(z,z);P.translate(-A,-K);var L=v.background;if(null==L||""==L||L==mxConstants.NONE)L="#ffffff";P.save();P.fillStyle=L;P.fillRect(A,K,Math.ceil(q.width+4),Math.ceil(q.height+4));P.restore();if(null!=d){var u=new Image;u.src=d.src;P.drawImage(u,d.x*z,d.y*z,d.width*z,d.height*z)}var D=new mxJsCanvas(p),
+B=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var C=new mxImageExport;C.drawShape=function(G,N){G.shape instanceof mxShape&&G.shape.checkBounds()&&(N.save(),N.translate(.5,.5),G.shape.paint(N),N.translate(-.5,-.5),N.restore())};C.drawText=function(G,N){};C.drawState(v.getView().getState(v.model.root),B);B.finish(mxUtils.bind(this,function(){try{C.drawState(v.getView().getState(v.model.root),D),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p=
null}n(p)}));f=!0}}catch(G){f=!1,null!=v&&v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}f||window.clearTimeout(m);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var m=new Date;m.setYear(m.getFullYear()+1);document.cookie="MODE="+e+"; expires="+m.toUTCString()}}catch(n){}}})();
@@ -12710,26 +12711,26 @@ this.drive.insertFile(b,e,v,mxUtils.bind(this,function(p){k();this.fileCreated(p
function(p,q){var x=new LocalFile(this,e,q.name,null,p,q);x.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,f,n,m,g)}),l,!0)}),mxUtils.bind(this,function(p){"AbortError"!=p.name&&l(p)}),this.createFileSystemOptions(b))):(k(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,m,g))}catch(p){k(),this.handleError(p)}}};
App.prototype.fileCreated=function(b,e,f,c,m){var n=window.location.pathname;null!=e&&0<e.length&&(n+="?libs="+e);null!=m&&0<m.length&&(n+="?clibs="+m);n=this.getUrl(n);b.getMode()!=App.MODE_DEVICE&&(n+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var v=b.getData();v=0<v.length?this.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0):null;var d=window.location.protocol+"//"+window.location.hostname+n,g=v,k=null;null!=v&&/\.svg$/i.test(b.getTitle())&&
(k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(k.container),g=this.decodeNodeIntoGraph(g,k));b.setData(this.createFileData(v,k,b,d));null!=k&&k.container.parentNode.removeChild(k.container);var l=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){l();var q=this.getCurrentFile();null==f&&null!=q&&(f=!q.isModified()&&null==q.getMode());var x=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=m){for(var A=[],B=m.split(";"),I=0;I<B.length;I++)A.push(decodeURIComponent(B[I]));this.loadLibraries(A)}}),y=mxUtils.bind(this,function(){f||null==q||!q.isModified()?x():this.confirm(mxResources.get("allChangesLost"),null,x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?y():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null!=e&&this.sidebar.showEntries(e);if(null!=m){for(var z=[],A=m.split(";"),K=0;K<A.length;K++)z.push(decodeURIComponent(A[K]));this.loadLibraries(z)}}),y=mxUtils.bind(this,function(){f||null==q||!q.isModified()?x():this.confirm(mxResources.get("allChangesLost"),null,x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?y():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),null!=c&&c(),window.openWindow(n,null,y))});b.constructor==LocalFile?p():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(q){l();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
App.prototype.loadFile=function(b,e,f,c,m){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var n=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var g=mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var y=this.getCurrentFile();
window.location.hash=null!=y?y.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(x){null!=x?(this.fileLoaded(new StorageFile(this,x,b)),null!=c&&c()):g({message:mxResources.get("fileNotFound")})}),g)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}));else if(null!=f)this.spinner.stop(),
this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var k=decodeURIComponent(b.substring(1));"<"!=k.charAt(0)&&(k=Graph.decompress(k));k=new LocalFile(this,k,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);k.getHash=function(){return b};this.fileLoaded(k);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(x,y){this.spinner.stop();this.fileLoaded(new EmbedFile(this,x,y));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var l=decodeURIComponent(b.substring(1)),p=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=l.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var x=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var y=l.substring(31,l.lastIndexOf("&ex"));this.loadFile("G"+y,e,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
-!this.editor.editable&&(A.getHash=function(){return"G"+y},window.location.hash="#"+A.getHash());null!=c&&c()}));return!0}return!1});!x()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",x);return!0});this.loadTemplate(l,mxUtils.bind(this,function(x){this.spinner.stop();if(null!=x&&0<x.length){var y=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=l,B=l.lastIndexOf("."),I=A.lastIndexOf("/");B>I&&0<I&&(A=A.substring(I+1,B),B=l.substring(B),
-this.useCanvasForExport||".png"!=B||(B=".drawio"),".svg"===B||".xml"===B||".html"===B||".png"===B||".drawio"===B)&&(y=A+B)}x=new LocalFile(this,x,null!=urlParams.title?decodeURIComponent(urlParams.title):y,!0);x.getHash=function(){return b};this.fileLoaded(x,!0)?null!=c&&c():p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var l=decodeURIComponent(b.substring(1)),p=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=l.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var x=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var y=l.substring(31,l.lastIndexOf("&ex"));this.loadFile("G"+y,e,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
+!this.editor.editable&&(z.getHash=function(){return"G"+y},window.location.hash="#"+z.getHash());null!=c&&c()}));return!0}return!1});!x()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",x);return!0});this.loadTemplate(l,mxUtils.bind(this,function(x){this.spinner.stop();if(null!=x&&0<x.length){var y=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=l,A=l.lastIndexOf("."),K=z.lastIndexOf("/");A>K&&0<K&&(z=z.substring(K+1,A),A=l.substring(A),
+this.useCanvasForExport||".png"!=A||(A=".drawio"),".svg"===A||".xml"===A||".html"===A||".png"===A||".drawio"===A)&&(y=z+A)}x=new LocalFile(this,x,null!=urlParams.title?decodeURIComponent(urlParams.title):y,!0);x.getHash=function(){return b};this.fileLoaded(x,!0)?null!=c&&c():p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){p()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(k=null,"G"==b.charAt(0)?k=this.drive:"D"==b.charAt(0)?k=this.dropbox:"W"==b.charAt(0)?k=this.oneDrive:"H"==b.charAt(0)?k=this.gitHub:"A"==b.charAt(0)?k=this.gitLab:"T"==b.charAt(0)&&(k=this.trello),null==k)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));k.getFile(b,mxUtils.bind(this,function(x){this.spinner.stop();this.fileLoaded(x);var y=this.getCurrentFile();null==y?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(y.getHash=function(){return q+b},window.location.hash="#"+y.getHash()):x==y&&null==x.getMode()&&
-(x=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(x){null!=window.console&&null!=x&&console.log("error in loadFile:",b,x);var y=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==x||"AbortError"!=x.name?this.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null,y,null,null,"#"+q+b):y()}))}}),
+(x=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(x){null!=window.console&&null!=x&&console.log("error in loadFile:",b,x);var y=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==x||"AbortError"!=x.name?this.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null,y,null,null,"#"+q+b):y()}))}}),
v=this.getCurrentFile(),d=mxUtils.bind(this,function(){m||null==v||!v.isModified()?n():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=v&&(window.location.hash=v.getHash())}),n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?d():null==v||e?d():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,d)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};
App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(k,l){l||mxSettings.removeCustomLibrary(k);delete this.loadedLibraries[k]}),c=0,m=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,v=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var k=b.length-1;0<=k;k--)null!=m[k]&&this.loadLibrary(m[k],k<=n);null!=e&&e()}});if(null!=b)for(var d=0;d<b.length;d++){var g=encodeURIComponent(decodeURIComponent(b[d]));
-mxUtils.bind(this,function(k,l){if(null!=k&&0<k.length&&null==this.loadedLibraries[k]&&null==this.sidebar.palettes[k]){this.loadedLibraries[k]=!0;c++;var p=mxUtils.bind(this,function(I){m[l]=I;c--;v()}),q=mxUtils.bind(this,function(I){f(k,I);c--;v()}),x=k.substring(0,1);if("L"==x)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var I=decodeURIComponent(k.substring(1));StorageFile.getFileContent(this,I,mxUtils.bind(this,function(O){".scratchpad"==I&&null==
-O&&(O=this.emptyLibraryXml);null!=O?p(new StorageLibrary(this,O,I)):q()}),q)}catch(O){q()}}),0);else if("U"==x){var y=decodeURIComponent(k.substring(1));this.isOffline()||this.loadTemplate(y,mxUtils.bind(this,function(I){null!=I&&0<I.length?p(new UrlLibrary(this,I,y)):q()}),function(){q()},null,!0)}else if("R"==x){x=decodeURIComponent(k.substring(1));try{x=JSON.parse(x);var A={id:x[0],title:x[1],downloadUrl:x[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(I){try{p(new RemoteLibrary(this,
-I,A))}catch(O){q()}}),function(){q()})}catch(I){q()}}else if("S"==x&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(k.substring(1)),function(I){p(I)},q)}catch(I){q()}else{var B=null;"G"==x?null!=this.drive&&null!=this.drive.user&&(B=this.drive):"H"==x?null!=this.gitHub&&null!=this.gitHub.getUser()&&(B=this.gitHub):"T"==x?null!=this.trello&&this.trello.isAuthorized()&&(B=this.trello):"D"==x?null!=this.dropbox&&null!=this.dropbox.getUser()&&(B=this.dropbox):"W"==x&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(B=this.oneDrive);null!=B?B.getLibrary(decodeURIComponent(k.substring(1)),mxUtils.bind(this,function(I){try{p(I)}catch(O){q()}}),function(I){q()}):q(!0)}}})(g,d)}v()}};
+mxUtils.bind(this,function(k,l){if(null!=k&&0<k.length&&null==this.loadedLibraries[k]&&null==this.sidebar.palettes[k]){this.loadedLibraries[k]=!0;c++;var p=mxUtils.bind(this,function(K){m[l]=K;c--;v()}),q=mxUtils.bind(this,function(K){f(k,K);c--;v()}),x=k.substring(0,1);if("L"==x)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var K=decodeURIComponent(k.substring(1));StorageFile.getFileContent(this,K,mxUtils.bind(this,function(P){".scratchpad"==K&&null==
+P&&(P=this.emptyLibraryXml);null!=P?p(new StorageLibrary(this,P,K)):q()}),q)}catch(P){q()}}),0);else if("U"==x){var y=decodeURIComponent(k.substring(1));this.isOffline()||this.loadTemplate(y,mxUtils.bind(this,function(K){null!=K&&0<K.length?p(new UrlLibrary(this,K,y)):q()}),function(){q()},null,!0)}else if("R"==x){x=decodeURIComponent(k.substring(1));try{x=JSON.parse(x);var z={id:x[0],title:x[1],downloadUrl:x[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(K){try{p(new RemoteLibrary(this,
+K,z))}catch(P){q()}}),function(){q()})}catch(K){q()}}else if("S"==x&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(k.substring(1)),function(K){p(K)},q)}catch(K){q()}else{var A=null;"G"==x?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==x?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==x?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==x?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==x&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(k.substring(1)),mxUtils.bind(this,function(K){try{p(K)}catch(P){q()}}),function(K){q()}):q(!0)}}})(g,d)}v()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight=
"10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=
@@ -12759,7 +12760,7 @@ window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))
App.prototype.showAuthDialog=function(b,e,f,c){var m=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(n){try{null!=f&&f(n,mxUtils.bind(this,function(){this.hideDialog();m()}))}catch(v){this.editor.setStatus(mxUtils.htmlEntities(v.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(n){null!=c&&c(n);n&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(b,e,f,c,m,n,v,d){var g=e;/\.svg$/i.test(g)||(g=g.substring(0,e.lastIndexOf("."))+c);var k=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(k=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var l=new XMLHttpRequest;l.open("GET",b,!0);k||(l.responseType="blob");if(d)for(var p in d)l.setRequestHeader(p,d[p]);l.onload=mxUtils.bind(this,function(){if(200<=
l.status&&299>=l.status){var x=null;k?(x=JSON.parse(l.responseText),x=this.base64ToBlob(x.content,"application/octet-stream")):x=new Blob([l.response],{type:"application/octet-stream"});this.importVisio(x,mxUtils.bind(this,function(y){m(new LocalFile(this,y,g,!0))}),n,e)}else null!=n&&n({message:mxResources.get("errorLoadingFile")})});l.onerror=n;l.send()}else{var q=mxUtils.bind(this,function(x){try{if(/\.pdf$/i.test(e)){var y=Editor.extractGraphModelFromPdf(x);null!=y&&0<y.length&&m(new LocalFile(this,
-y,g,!0))}else/\.png$/i.test(e)?(y=this.extractGraphModelFromPng(x),null!=y?m(new LocalFile(this,y,g,!0)):m(new LocalFile(this,x,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(x,b)?this.parseFileData(x,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?m(new LocalFile(this,A.responseText,g,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):m(new LocalFile(this,x,g,!0))}catch(A){null!=n&&n(A)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
+y,g,!0))}else/\.png$/i.test(e)?(y=this.extractGraphModelFromPng(x),null!=y?m(new LocalFile(this,y,g,!0)):m(new LocalFile(this,x,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(x,b)?this.parseFileData(x,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?m(new LocalFile(this,z.responseText,g,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):m(new LocalFile(this,x,g,!0))}catch(z){null!=n&&n(z)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);k?mxUtils.get(b,mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus()){if(null!=m){x=JSON.parse(x.getText());var y=x.content;"base64"===x.encoding&&(y=/\.png$/i.test(e)?"data:image/png;base64,"+y:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+y:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y));q(y)}}else null!=n&&n({code:App.ERROR_UNKNOWN})}),function(){null!=n&&n({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=n&&n({code:App.ERROR_TIMEOUT,retry:fn})},d):null!=v?v(b,q,n,f):this.editor.loadUrl(b,q,n,f,null,null,null,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="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
@@ -12793,8 +12794,8 @@ p.setAttribute("height","50");p.setAttribute("border","0");p.setAttribute("src",
this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(y){this.handleError(y)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(x)})));return k});c=!0;var v=document.createElement("table");v.style.borderSpacing="0";v.style.fontSize="10pt";v.style.width="100%";v.style.padding="10px";for(var d=0;d<m.length;d++)v.appendChild(f(m[d]));this.userPanel.appendChild(v);f=document.createElement("div");f.style.textAlign=
"left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";v=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){n(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));v.className="geBtn";v.style.float="right";f.appendChild(v);v=mxUtils.button(mxResources.get("addAccount"),
mxUtils.bind(this,function(){var g=this.drive.createAuthWin();g.blur();window.focus();n(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(k){this.handleError(k)}),!0,g)}),mxResources.get("closingFile")+"...")}));v.className="geBtn";v.style.margin="0px";f.appendChild(v);this.userPanel.appendChild(f)}}f=mxUtils.bind(this,function(g,k,l,p){if(null!=g){c&&this.userPanel.appendChild(document.createElement("hr"));
-c=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var x=document.createElement("tbody"),y=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=k){var B=document.createElement("img");B.setAttribute("width","40");B.setAttribute("height","40");B.setAttribute("border","0");B.setAttribute("src",k);B.style.marginRight="6px";A.appendChild(B)}y.appendChild(A);
-A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,g.displayName);null!=g.email&&(mxUtils.br(A),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,g.email),A.appendChild(k));null!=p&&(g=document.createElement("div"),g.style.marginTop="4px",k=document.createElement("i"),mxUtils.write(k,p),g.appendChild(k),A.appendChild(g));y.appendChild(A);x.appendChild(y);
+c=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var x=document.createElement("tbody"),y=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=k){var A=document.createElement("img");A.setAttribute("width","40");A.setAttribute("height","40");A.setAttribute("border","0");A.setAttribute("src",k);A.style.marginRight="6px";z.appendChild(A)}y.appendChild(z);
+z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,g.displayName);null!=g.email&&(mxUtils.br(z),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,g.email),z.appendChild(k));null!=p&&(g=document.createElement("div"),g.style.marginTop="4px",k=document.createElement("i"),mxUtils.write(k,p),g.appendChild(k),z.appendChild(g));y.appendChild(z);x.appendChild(y);
q.appendChild(x);this.userPanel.appendChild(q);g=document.createElement("div");g.style.textAlign="center";g.style.padding="10px";g.style.whiteSpace="nowrap";null!=l&&(l=mxUtils.button(mxResources.get("signOut"),l),l.className="geBtn",g.appendChild(l));this.userPanel.appendChild(g)}});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var g=this.getCurrentFile();if(null!=g&&g.constructor==DropboxFile){var k=mxUtils.bind(this,function(){this.dropbox.logout();
window.location.hash=""});g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&f(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var g=this.getCurrentFile();if(null!=g&&g.constructor==OneDriveFile){var k=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
""});g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&f(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var g=this.getCurrentFile();if(null!=g&&g.constructor==GitHubFile){var k=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});g.isModified()?this.confirm(mxResources.get("allChangesLost"),
@@ -12808,157 +12809,158 @@ null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.use
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);c.appendChild(m);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(n){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(n)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&f.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var e=Menus.prototype.init;
-Menus.prototype.init=function(){function f(t,z,L){this.ui=t;this.previousExtFonts=this.extFonts=z;this.prevCustomFonts=this.customFonts=L}e.apply(this,arguments);var c=this.editorUi,m=c.editor.graph,n=mxUtils.bind(m,m.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),d=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Menus.prototype.init=function(){function f(u,D,B){this.ui=u;this.previousExtFonts=this.extFonts=D;this.prevCustomFonts=this.customFonts=B}e.apply(this,arguments);var c=this.editorUi,m=c.editor.graph,n=mxUtils.bind(m,m.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),d=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),g=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),k="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(t){return"file"!=t}));c.actions.addAction("new...",function(){var t=c.isOffline();if(t||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var z=new NewDialog(c,t,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(z.container,t?350:620,t?70:460,!0,!0,function(C){c.sidebar.hideTooltip();C&&null==c.getCurrentFile()&&c.showSplash()});
-z.init()}else{var L=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};t=new TemplatesDialog(c,function(C,E,G){var P=G.libs,J=G.clibs;c.pickFolder(c.mode,function(F){c.createFile(E,C,null!=P&&0<P.length?P:null,null,function(){c.hideDialog()},null,F,null,null!=J&&0<J.length?J:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(C,E,G){var P=new Date;P.setDate(P.getDate()-
-7);c.drive.listFiles(null,P,G?!0:!1,function(J){for(var F=[],H=0;H<J.items.length;H++)F.push(L(J.items[H]));C(F)},E)},function(C,E,G,P){c.drive.listFiles(C,null,P?!0:!1,function(J){for(var F=[],H=0;H<J.items.length;H++)F.push(L(J.items[H]));E(F)},G)},function(C,E,G){c.drive.getFile(C.id,function(P){E(P.data)},G)},null,null,!1,!1);c.showDialog(t.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
-!m.isCellLocked(m.getDefaultParent())){var t=new NewDialog(c,null,!1,function(z){c.hideDialog();if(null!=z){var L=c.editor.graph.getFreeInsertPoint();m.setSelectionCells(c.importXml(z,Math.max(L.x,20),Math.max(L.y,20),!0,null,null,!0));m.scrollCellToVisible(m.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(t.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});t.init()}})).isEnabled=n;var l=c.actions.addAction("shareCursor",
+c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(u){return"file"!=u}));c.actions.addAction("new...",function(){var u=c.isOffline();if(u||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var D=new NewDialog(c,u,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(D.container,u?350:620,u?70:460,!0,!0,function(C){c.sidebar.hideTooltip();C&&null==c.getCurrentFile()&&c.showSplash()});
+D.init()}else{var B=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};u=new TemplatesDialog(c,function(C,G,N){var I=N.libs,F=N.clibs;c.pickFolder(c.mode,function(H){c.createFile(G,C,null!=I&&0<I.length?I:null,null,function(){c.hideDialog()},null,H,null,null!=F&&0<F.length?F:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(C,G,N){var I=new Date;I.setDate(I.getDate()-
+7);c.drive.listFiles(null,I,N?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));C(H)},G)},function(C,G,N,I){c.drive.listFiles(C,null,I?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));G(H)},N)},function(C,G,N){c.drive.getFile(C.id,function(I){G(I.data)},N)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
+!m.isCellLocked(m.getDefaultParent())){var u=new NewDialog(c,null,!1,function(D){c.hideDialog();if(null!=D){var B=c.editor.graph.getFreeInsertPoint();m.setSelectionCells(c.importXml(D,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));m.scrollCellToVisible(m.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(u.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});u.init()}})).isEnabled=n;var l=c.actions.addAction("shareCursor",
function(){c.setShareCursorPosition(!c.isShareCursorPosition())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShareCursorPosition()});l=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShowRemoteCursors()});l=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==
mxConstants.POINTS});l=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});l=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});l=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
-l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,["points","inches","millimeters","meters"],z)})));l=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});l.setEnabled(c.canvasSupported&&9!=document.documentMode);
+l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,["points","inches","millimeters","meters"],D)})));l=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});l.setEnabled(c.canvasSupported&&9!=document.documentMode);
l.setToggleAction(!0);l.setSelectedCallback(function(){return null!=c.ruler});l=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});l.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;l.setToggleAction(!0);l.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var t=new FilePropertiesDialog(c);c.showDialog(t.container,320,120,!0,!0);t.init()}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(t){m.isEnabled()&&(null==this.freehandWindow&&(t=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,t?120:84,t)),m.freehand.isDrawing()?
-m.freehand.stopDrawing():m.freehand.startDrawing(),this.freehandWindow.window.setVisible(m.freehand.isDrawing()))})).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=null==c.pages||1>=c.pages.length,L=document.createElement("h3");mxUtils.write(L,mxResources.get("formatXml"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-t.appendChild(L);var C=c.addCheckbox(t,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),E=c.addCheckbox(t,mxResources.get("compressed"),!0),G=c.addCheckbox(t,mxResources.get("allPages"),!z,z);G.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?G.setAttribute("disabled","disabled"):G.removeAttribute("disabled")});t=new CustomDialog(c,t,mxUtils.bind(this,function(){c.downloadFile("xml",!E.checked,null,!C.checked,z||!G.checked)}),null,mxResources.get("export"));c.showDialog(t.container,
-300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(t,z,L,C,E,G,P,J,F){P=[];F&&P.push("tags=%7B%7D");t=new EmbedDialog(c,c.createLink(t,z,L,C,E,G,null,!0,P));c.showDialog(t.container,450,240,!0,!0);t.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
-function(t){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,t,function(z,L,C,E,G,P,J,F,H,S,V){c.createHtml(z,L,C,E,G,P,J,F,H,S,V,mxUtils.bind(this,function(M,W){var U=c.getBaseFilename(J);M='\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(U)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+M+"\n"+W+"\n</body>\n</html>";c.saveData(U+(".drawio"==U.substring(U.lenth-7)?"":".drawio")+
-".html","html",M,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var t=null==c.pages||1>=c.pages.length,z=document.createElement("div");z.style.whiteSpace="nowrap";var L=document.createElement("h3");mxUtils.write(L,mxResources.get("formatPdf"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(L);var C=function(){J!=this&&this.checked?
-(W.removeAttribute("disabled"),W.checked=!m.pageVisible):(W.setAttribute("disabled","disabled"),W.checked=!1)};L=200;var E=1,G=null;if(c.pdfPageExport&&!t){var P=function(){V.value=Math.max(1,Math.min(E,Math.max(parseInt(V.value),parseInt(H.value))));H.value=Math.max(1,Math.min(E,Math.min(parseInt(V.value),parseInt(H.value))))},J=c.addRadiobox(z,"pages",mxResources.get("allPages"),!0),F=c.addRadiobox(z,"pages",mxResources.get("pages")+":",!1,null,!0),H=document.createElement("input");H.style.cssText=
-"margin:0 8px 0 8px;";H.setAttribute("value","1");H.setAttribute("type","number");H.setAttribute("min","1");H.style.width="50px";z.appendChild(H);var S=document.createElement("span");mxUtils.write(S,mxResources.get("to"));z.appendChild(S);var V=H.cloneNode(!0);z.appendChild(V);mxEvent.addListener(H,"focus",function(){F.checked=!0});mxEvent.addListener(V,"focus",function(){F.checked=!0});mxEvent.addListener(H,"change",P);mxEvent.addListener(V,"change",P);if(null!=c.pages&&(E=c.pages.length,null!=c.currentPage))for(P=
-0;P<c.pages.length;P++)if(c.currentPage==c.pages[P]){G=P+1;H.value=G;V.value=G;break}H.setAttribute("max",E);V.setAttribute("max",E);mxUtils.br(z);var M=c.addRadiobox(z,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),W=c.addCheckbox(z,mxResources.get("crop"),!1,!0),U=c.addCheckbox(z,mxResources.get("grid"),!1,!1);mxEvent.addListener(J,"change",C);mxEvent.addListener(F,"change",C);mxEvent.addListener(M,"change",C);L+=64}else M=c.addCheckbox(z,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
-W=c.addCheckbox(z,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),U=c.addCheckbox(z,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(M,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var X=null,u=null;if(EditorUi.isElectronApp||C)u=c.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),L+=30;C&&(X=c.addCheckbox(z,mxResources.get("transparentBackground"),!1),L+=30);z=new CustomDialog(c,
-z,mxUtils.bind(this,function(){var D=null;if(!t){D=parseInt(H.value);var K=parseInt(V.value);D=J.checked||D==G&&K==G?null:{from:Math.max(0,Math.min(E-1,D-1)),to:Math.max(0,Math.min(E-1,K-1))}}c.downloadFile("pdf",null,null,!M.checked,t?!0:!J.checked&&null==D,!W.checked,null!=X&&X.checked,null,null,U.checked,null!=u&&u.checked,D)}),null,mxResources.get("export"));c.showDialog(z.container,300,L,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
-c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function t(){null!=z&&z.removeDraft();c.fileLoaded(null)}var z=c.getCurrentFile();null!=z&&z.isModified()?c.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){m.getSelectionCells();if(1==m.getSelectionCount()){var t=
-m.getSelectionCell(),z=m.view.getState(t);null!=z&&null!=z.shape&&null!=z.shape.stencil&&(t=new EditShapeDialog(c,t,mxResources.get("editShape")+":",630,400),c.showDialog(t.container,640,480,!0,!1),t.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(t,z){c.spinner.stop();t=new RevisionDialog(c,t,z);c.showDialog(t.container,640,480,!0,!0);t.init()}),mxUtils.bind(this,
-function(t){c.handleError(t)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");l=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(l.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var t=c.getCurrentFile();null!=t&&(window.drawdata=
-c.getFileData(),t=null!=t.getTitle()?t.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(t),null,!0))});"undefined"!==typeof MathJax&&(l=c.actions.addAction("mathematicalTypesetting",function(){var t=new ChangePageSetup(c);t.ignoreColor=!0;t.ignoreImage=!0;t.mathEnabled=!c.isMathEnabled();m.model.execute(t)}),l.setToggleAction(!0),l.setSelectedCallback(function(){return c.isMathEnabled()}),
-l.isEnabled=n);isLocalStorage&&(l=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var t=
-m.getSelectionCells(),z=[],L=0;L<t.length;L++)m.getModel().isVertex(t[L])&&z.push(t[L]);0<z.length&&(t=new EditGeometryDialog(c,z),c.showDialog(t.container,200,270,!0,!0),t.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;c.actions.addAction("copyStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&(q=m.copyStyle(m.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&null!=q&&m.pasteStyle(q,m.getSelectionCells())},
-null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var t=new BackgroundImageDialog(c,function(z){c.setBackgroundImage(z)});c.showDialog(t.container,400,170,!0,!0);t.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(t,z,L,C,E,G,P,J,F,H,S,V,M,W,U){F=parseInt(t);!isNaN(F)&&0<F&&(U?c.downloadFile("remoteSvg",null,null,L,null,J,z,t,P,null,E):c.exportSvg(F/100,z,L,C,E,G,P,!J,!1,H,V,M,W))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,z,L,C,E,G,P,J,F,H,S,V,M){t=parseInt(t);!isNaN(t)&&
-0<t&&c.exportImage(t/100,z,L,C,E,P,!J,!1,null,S,null,V,M)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,z,L,C,E){c.downloadFile(z?"xmlpng":"png",null,null,t,null,null,L,C,E)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(t,z,L,C,E,G,P,J,F,H,S,V,M){t=parseInt(t);!isNaN(t)&&0<t&&c.exportImage(t/100,!1,L,C,!1,P,!J,!1,"jpeg",S,null,V,M)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,z,L,C,E){c.downloadFile("jpeg",null,null,t,null,null,null,C,E)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var t=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
-z=mxUtils.getXml(0==t.length?c.editor.getGraphXml():m.encodeCells(t));c.copyImage(t,z)}));l.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;l=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){m.setShadowVisible(!m.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return m.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||
+Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var u=new FilePropertiesDialog(c);c.showDialog(u.container,320,120,!0,!0);u.init()}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(u){m.isEnabled()&&(null==this.freehandWindow&&(u=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,u?120:84,u)),m.freehand.isDrawing()?
+m.freehand.stopDrawing():m.freehand.startDrawing(),this.freehandWindow.window.setVisible(m.freehand.isDrawing()))})).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var u=document.createElement("div");u.style.whiteSpace="nowrap";var D=null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+u.appendChild(B);var C=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),G=c.addCheckbox(u,mxResources.get("compressed"),!0),N=c.addCheckbox(u,mxResources.get("allPages"),!D,D);N.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?N.setAttribute("disabled","disabled"):N.removeAttribute("disabled")});u=new CustomDialog(c,u,mxUtils.bind(this,function(){c.downloadFile("xml",!G.checked,null,!C.checked,D||!N.checked)}),null,mxResources.get("export"));c.showDialog(u.container,
+300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(u,D,B,C,G,N,I,F,H){I=[];H&&I.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,null,!0,I));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(D,B,C,G,N,I,F,H,R,W,J){c.createHtml(D,B,C,G,N,I,F,H,R,W,J,mxUtils.bind(this,function(V,U){var X=c.getBaseFilename(F);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+U+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+
+".html","html",V,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,D=document.createElement("div");D.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatPdf"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(B);var C=function(){F!=this&&this.checked?
+(U.removeAttribute("disabled"),U.checked=!m.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};B=200;var G=1,N=null;if(c.pdfPageExport&&!u){var I=function(){J.value=Math.max(1,Math.min(G,Math.max(parseInt(J.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(J.value),parseInt(R.value))))},F=c.addRadiobox(D,"pages",mxResources.get("allPages"),!0),H=c.addRadiobox(D,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
+"margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("type","number");R.setAttribute("min","1");R.style.width="50px";D.appendChild(R);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));D.appendChild(W);var J=R.cloneNode(!0);D.appendChild(J);mxEvent.addListener(R,"focus",function(){H.checked=!0});mxEvent.addListener(J,"focus",function(){H.checked=!0});mxEvent.addListener(R,"change",I);mxEvent.addListener(J,"change",I);if(null!=c.pages&&(G=c.pages.length,null!=c.currentPage))for(I=
+0;I<c.pages.length;I++)if(c.currentPage==c.pages[I]){N=I+1;R.value=N;J.value=N;break}R.setAttribute("max",G);J.setAttribute("max",G);mxUtils.br(D);var V=c.addRadiobox(D,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),U=c.addCheckbox(D,mxResources.get("crop"),!1,!0),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",C);mxEvent.addListener(H,"change",C);mxEvent.addListener(V,"change",C);B+=64}else V=c.addCheckbox(D,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
+U=c.addCheckbox(D,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(V,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var t=null,E=null;if(EditorUi.isElectronApp||C)E=c.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;C&&(t=c.addCheckbox(D,mxResources.get("transparentBackground"),!1),B+=30);D=new CustomDialog(c,
+D,mxUtils.bind(this,function(){var M=null;if(!u){M=parseInt(R.value);var T=parseInt(J.value);M=F.checked||M==N&&T==N?null:{from:Math.max(0,Math.min(G-1,M-1)),to:Math.max(0,Math.min(G-1,T-1))}}c.downloadFile("pdf",null,null,!V.checked,u?!0:!F.checked&&null==M,!U.checked,null!=t&&t.checked,null,null,X.checked,null!=E&&E.checked,M)}),null,mxResources.get("export"));c.showDialog(D.container,300,B,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
+c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function u(){null!=D&&D.removeDraft();c.fileLoaded(null)}var D=c.getCurrentFile();null!=D&&D.isModified()?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){m.getSelectionCells();if(1==m.getSelectionCount()){var u=
+m.getSelectionCell(),D=m.view.getState(u);null!=D&&null!=D.shape&&null!=D.shape.stencil&&(u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(u,D){c.spinner.stop();u=new RevisionDialog(c,u,D);c.showDialog(u.container,640,480,!0,!0);u.init()}),mxUtils.bind(this,
+function(u){c.handleError(u)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");l=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(l.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var u=c.getCurrentFile();null!=u&&(window.drawdata=
+c.getFileData(),u=null!=u.getTitle()?u.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(u),null,!0))});"undefined"!==typeof MathJax&&(l=c.actions.addAction("mathematicalTypesetting",function(){var u=new ChangePageSetup(c);u.ignoreColor=!0;u.ignoreImage=!0;u.mathEnabled=!c.isMathEnabled();m.model.execute(u)}),l.setToggleAction(!0),l.setSelectedCallback(function(){return c.isMathEnabled()}),
+l.isEnabled=n);isLocalStorage&&(l=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var u=
+m.getSelectionCells(),D=[],B=0;B<u.length;B++)m.getModel().isVertex(u[B])&&D.push(u[B]);0<D.length&&(u=new EditGeometryDialog(c,D),c.showDialog(u.container,200,270,!0,!0),u.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;c.actions.addAction("copyStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&(q=m.copyStyle(m.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&null!=q&&m.pasteStyle(q,m.getSelectionCells())},
+null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var u=new BackgroundImageDialog(c,function(D){c.setBackgroundImage(D)});c.showDialog(u.container,400,170,!0,!0);u.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
+function(u,D,B,C,G,N,I,F,H,R,W,J,V,U,X){H=parseInt(u);!isNaN(H)&&0<H&&(X?c.downloadFile("remoteSvg",null,null,B,null,F,D,u,I,null,G):c.exportSvg(H/100,D,B,C,G,N,I,!F,!1,R,J,V,U))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,D,B,C,G,N,I,F,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&
+0<u&&c.exportImage(u/100,D,B,C,G,I,!F,!1,null,W,null,J,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile(D?"xmlpng":"png",null,null,u,null,null,B,C,G)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(u,D,B,C,G,N,I,F,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,B,C,!1,I,!F,!1,"jpeg",W,null,J,V)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile("jpeg",null,null,u,null,null,null,C,G)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
+D=mxUtils.getXml(0==u.length?c.editor.getGraphXml():m.encodeCells(u));c.copyImage(u,D)}));l.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;l=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){m.setShadowVisible(!m.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return m.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",
-function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var t=new FeedbackDialog(c);c.showDialog(t.container,610,360,!0,!1);t.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):
+function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var u=new FeedbackDialog(c);c.showDialog(u.container,610,360,!0,!1);u.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):
c.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});l=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),
-this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));l=c.actions.addAction("findReplace...",mxUtils.bind(this,function(t,z){var L=(t=m.isEnabled()&&(null==z||!mxEvent.isShiftDown(z)))?"findReplace":"find";z=L+"Window";if(null==this[z]){var C=t?"min"==uiTheme?330:
-300:240;this[z]=new FindWindow(c,document.body.offsetWidth-(C+20),100,C,t?"min"==uiTheme?304:288:170,t);this[z].window.addListener("show",function(){c.fireEvent(new mxEventObject(L))});this[z].window.addListener("hide",function(){c.fireEvent(new mxEventObject(L))});this[z].window.setVisible(!0)}else this[z].window.setVisible(!this[z].window.isVisible())}),null,null,Editor.ctrlKey+"+F");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){var t=m.isEnabled()?"findReplaceWindow":
-"findWindow";return null!=this[t]&&this[t].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var t=null==c.pages||1>=c.pages.length;if(t)c.exportVisio();else{var z=document.createElement("div");z.style.whiteSpace="nowrap";var L=document.createElement("h3");mxUtils.write(L,mxResources.get("formatVsdx"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(L);var C=c.addCheckbox(z,mxResources.get("allPages"),
-!t,t);C.style.marginBottom="16px";t=new CustomDialog(c,z,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(t.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";t.checked=mxSettings.getShowStartScreen();t.defaultChecked=t.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var z=
-document.createElement("span");z.style["float"]="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-4px";z.appendChild(t);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(E){mxEvent.getSource(E)!=t&&(t.checked=!t.checked)});header=z}var L=localStorage.getItem(Editor.configurationKey);z=[[mxResources.get("reset"),function(E,G){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(E)?(localStorage.removeItem(Editor.settingsKey),
-localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(P){c.handleError(P)}})},"Shift+Click to Reset Settings"]];var C=c.actions.get("plugins");null!=C&&"1"==urlParams.sketch&&z.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||z.push([mxResources.get("share"),function(E,G){if(0<G.value.length)try{var P=JSON.parse(G.value),J=window.location.protocol+"//"+window.location.host+
-"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(P)),F=new EmbedDialog(c,J);c.showDialog(F.container,450,240,!0);F.init()}catch(H){c.handleError(H)}else c.handleError({message:mxResources.get("invalidInput")})}]);z=new TextareaDialog(c,mxResources.get("configuration")+":",null!=L?JSON.stringify(JSON.parse(L),null,2):"",function(E){if(null!=E)try{if(null!=t.parentNode&&(mxSettings.setShowStartScreen(t.checked),mxSettings.save()),E==L)c.hideDialog();else{if(0<E.length){var G=JSON.parse(E);
-localStorage.setItem(Editor.configurationKey,JSON.stringify(G))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(P){c.handleError(P)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",z,t.parentNode);c.showDialog(z.container,620,460,!0,!1);z.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(t,z){var L=mxUtils.bind(this,
-function(E){var G=""==E?mxResources.get("automatic"):mxLanguageMap[E],P=null;""!=G&&(P=t.addItem(G,null,mxUtils.bind(this,function(){mxSettings.setLanguage(E);mxSettings.save();mxClient.language=E;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),z),(E==mxLanguage||""==E&&null==mxLanguage)&&t.addCheckmark(P,Editor.checkmarkImage));return P});L("");t.addSeparator(z);for(var C in mxLanguageMap)L(C)})));var x=Menus.prototype.createMenubar;
-Menus.prototype.createMenubar=function(t){var z=x.apply(this,arguments);if(null!=z&&"1"!=urlParams.noLangIcon){var L=this.get("language");if(null!=L){L=z.addMenu("",L.funct);L.setAttribute("title",mxResources.get("language"));L.style.width="16px";L.style.paddingTop="2px";L.style.paddingLeft="4px";L.style.zIndex="1";L.style.position="absolute";L.style.display="block";L.style.cursor="pointer";L.style.right="17px";"atlas"==uiTheme?(L.style.top="6px",L.style.right="15px"):L.style.top="min"==uiTheme?"2px":
-"0px";var C=document.createElement("div");C.style.backgroundImage="url("+Editor.globeImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="19px 19px";C.style.position="absolute";C.style.height="19px";C.style.width="19px";C.style.marginTop="2px";C.style.zIndex="1";L.appendChild(C);mxUtils.setOpacity(L,40);"1"==urlParams.winCtrls&&(L.style.right="95px",L.style.width="19px",L.style.height="19px",L.style.webkitAppRegion="no-drag",C.style.webkitAppRegion=
-"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)L.style.opacity="0.85",L.style.filter="invert(100%)";document.body.appendChild(L);z.langIcon=L}}return z}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var t=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(z){if(0<z.length)try{var L=JSON.parse(z);
-c.executeLayoutList(L);c.customLayoutConfig=L}catch(C){c.handleError(C),null!=window.console&&console.error(C)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(t.container,620,460,!0,!0);t.init()});l=this.get("layout");var y=l.funct;l.funct=function(t,z){y.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){function L(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?J():c.spinner.spin(document.body,
-mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",J)})})}):mxscript("js/extensions.min.js",J))}var C=null,E=20,G=20,P=!0,J=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&P){var X=c.editor.graph,u=new mxOrgChartLayout(X,C,
-E,G),D=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(D=X.getSelectionCell());u.execute(D);P=!1}},F=document.createElement("div"),H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("orgChartType")+": ");F.appendChild(H);var S=document.createElement("select");S.style.width="200px";S.style.boxSizing="border-box";H=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
-mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var V=0;V<H.length;V++){var M=document.createElement("option");mxUtils.write(M,H[V]);M.value=V;2==V&&M.setAttribute("selected","selected");S.appendChild(M)}mxEvent.addListener(S,"change",function(){C=S.value});F.appendChild(S);H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,
-mxResources.get("parentChildSpacing")+": ");F.appendChild(H);var W=document.createElement("input");W.type="number";W.value=E;W.style.width="200px";W.style.boxSizing="border-box";F.appendChild(W);mxEvent.addListener(W,"change",function(){E=W.value});H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("siblingSpacing")+": ");F.appendChild(H);var U=document.createElement("input");U.type="number";U.value=G;U.style.width=
-"200px";U.style.boxSizing="border-box";F.appendChild(U);mxEvent.addListener(U,"change",function(){G=U.value});F=new CustomDialog(c,F,function(){null==C&&(C=2);L()});c.showDialog(F.container,355,140,!0,!0)},z,null,n());t.addSeparator(z);t.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var L=new mxParallelEdgeLayout(m);L.checkOverlap=!0;L.spacing=20;c.executeLayout(function(){L.execute(m.getDefaultParent(),m.isSelectionEmpty()?null:m.getSelectionCells())},!1)}),z);t.addSeparator(z);
-c.menus.addMenuItem(t,"runLayout",z,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(t,z){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(t,["about"],z);else{var L=t.addItem("Search:",null,null,z,null,null,!1);L.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";L.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.marginLeft="8px";mxEvent.addListener(C,
-"keydown",mxUtils.bind(this,function(E){var G=mxUtils.trim(C.value);13==E.keyCode&&0<G.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(G)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:G}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==E.keyCode&&(C.value="")}));L.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,
-function(E){document.activeElement!=C&&C.focus();mxEvent.consume(E)},function(E){mxEvent.consume(E)},function(E){mxEvent.consume(E)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(t,"- keyboardShortcuts quickStart website support -".split(" "),z),"1"!=urlParams.disableUpdate&&this.addMenuItems(t,["check4Updates",
-"-"],z),this.addMenuItems(t,["forkme","-","about"],z)):this.addMenuItems(t,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),z)}"1"==urlParams.test&&(t.addSeparator(z),this.addSubmenu("testDevelop",t,z))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var t=prompt("Language Code",Graph.diagramLanguage||"");null!=t&&(Graph.diagramLanguage=0<t.length?t:null,m.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
+this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));l=c.actions.addAction("findReplace...",mxUtils.bind(this,function(u,D){var B=(u=m.isEnabled()&&(null==D||!mxEvent.isShiftDown(D)))?"findReplace":"find";D=B+"Window";if(null==this[D]){var C=u?"min"==uiTheme?330:
+300:240;this[D]=new FindWindow(c,document.body.offsetWidth-(C+20),100,C,u?"min"==uiTheme?304:288:170,u);this[D].window.addListener("show",function(){c.fireEvent(new mxEventObject(B))});this[D].window.addListener("hide",function(){c.fireEvent(new mxEventObject(B))});this[D].window.setVisible(!0)}else this[D].window.setVisible(!this[D].window.isVisible())}),null,null,Editor.ctrlKey+"+F");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){var u=m.isEnabled()?"findReplaceWindow":
+"findWindow";return null!=this[u]&&this[u].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var u=null==c.pages||1>=c.pages.length;if(u)c.exportVisio();else{var D=document.createElement("div");D.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(B);var C=c.addCheckbox(D,mxResources.get("allPages"),
+!u,u);C.style.marginBottom="16px";u=new CustomDialog(c,D,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";u.checked=mxSettings.getShowStartScreen();u.defaultChecked=u.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var D=
+document.createElement("span");D.style["float"]="right";D.style.cursor="pointer";D.style.userSelect="none";D.style.marginTop="-4px";D.appendChild(u);mxUtils.write(D,mxResources.get("showStartScreen"));mxEvent.addListener(D,"click",function(G){mxEvent.getSource(G)!=u&&(u.checked=!u.checked)});header=D}var B=localStorage.getItem(Editor.configurationKey);D=[[mxResources.get("reset"),function(G,N){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),
+localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(I){c.handleError(I)}})},"Shift+Click to Reset Settings"]];var C=c.actions.get("plugins");null!=C&&"1"==urlParams.sketch&&D.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||D.push([mxResources.get("share"),function(G,N){if(0<N.value.length)try{var I=JSON.parse(N.value),F=window.location.protocol+"//"+window.location.host+
+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(I)),H=new EmbedDialog(c,F);c.showDialog(H.container,450,240,!0);H.init()}catch(R){c.handleError(R)}else c.handleError({message:mxResources.get("invalidInput")})}]);D=new TextareaDialog(c,mxResources.get("configuration")+":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(G){if(null!=G)try{if(null!=u.parentNode&&(mxSettings.setShowStartScreen(u.checked),mxSettings.save()),G==B)c.hideDialog();else{if(0<G.length){var N=JSON.parse(G);
+localStorage.setItem(Editor.configurationKey,JSON.stringify(N))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(I){c.handleError(I)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",D,u.parentNode);c.showDialog(D.container,620,460,!0,!1);D.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(u,D){var B=mxUtils.bind(this,
+function(G){var N=""==G?mxResources.get("automatic"):mxLanguageMap[G],I=null;""!=N&&(I=u.addItem(N,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),D),(G==mxLanguage||""==G&&null==mxLanguage)&&u.addCheckmark(I,Editor.checkmarkImage));return I});B("");u.addSeparator(D);for(var C in mxLanguageMap)B(C)})));var x=Menus.prototype.createMenubar;
+Menus.prototype.createMenubar=function(u){var D=x.apply(this,arguments);if(null!=D&&"1"!=urlParams.noLangIcon){var B=this.get("language");if(null!=B){B=D.addMenu("",B.funct);B.setAttribute("title",mxResources.get("language"));B.style.width="16px";B.style.paddingTop="2px";B.style.paddingLeft="4px";B.style.zIndex="1";B.style.position="absolute";B.style.display="block";B.style.cursor="pointer";B.style.right="17px";"atlas"==uiTheme?(B.style.top="6px",B.style.right="15px"):B.style.top="min"==uiTheme?"2px":
+"0px";var C=document.createElement("div");C.style.backgroundImage="url("+Editor.globeImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="19px 19px";C.style.position="absolute";C.style.height="19px";C.style.width="19px";C.style.marginTop="2px";C.style.zIndex="1";B.appendChild(C);mxUtils.setOpacity(B,40);"1"==urlParams.winCtrls&&(B.style.right="95px",B.style.width="19px",B.style.height="19px",B.style.webkitAppRegion="no-drag",C.style.webkitAppRegion=
+"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)B.style.opacity="0.85",B.style.filter="invert(100%)";document.body.appendChild(B);D.langIcon=B}}return D}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var u=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(D){if(0<D.length)try{var B=JSON.parse(D);
+c.executeLayoutList(B);c.customLayoutConfig=B}catch(C){c.handleError(C),null!=window.console&&console.error(C)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,620,460,!0,!0);u.init()});l=this.get("layout");var y=l.funct;l.funct=function(u,D){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){function B(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?F():c.spinner.spin(document.body,
+mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F)})})}):mxscript("js/extensions.min.js",F))}var C=null,G=20,N=20,I=!0,F=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&I){var t=c.editor.graph,E=new mxOrgChartLayout(t,C,
+G,N),M=t.getDefaultParent();1<t.model.getChildCount(t.getSelectionCell())&&(M=t.getSelectionCell());E.execute(M);I=!1}},H=document.createElement("div"),R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,mxResources.get("orgChartType")+": ");H.appendChild(R);var W=document.createElement("select");W.style.width="200px";W.style.boxSizing="border-box";R=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var J=0;J<R.length;J++){var V=document.createElement("option");mxUtils.write(V,R[J]);V.value=J;2==J&&V.setAttribute("selected","selected");W.appendChild(V)}mxEvent.addListener(W,"change",function(){C=W.value});H.appendChild(W);R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,
+mxResources.get("parentChildSpacing")+": ");H.appendChild(R);var U=document.createElement("input");U.type="number";U.value=G;U.style.width="200px";U.style.boxSizing="border-box";H.appendChild(U);mxEvent.addListener(U,"change",function(){G=U.value});R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,mxResources.get("siblingSpacing")+": ");H.appendChild(R);var X=document.createElement("input");X.type="number";X.value=N;X.style.width=
+"200px";X.style.boxSizing="border-box";H.appendChild(X);mxEvent.addListener(X,"change",function(){N=X.value});H=new CustomDialog(c,H,function(){null==C&&(C=2);B()});c.showDialog(H.container,355,140,!0,!0)},D,null,n());u.addSeparator(D);u.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(m);B.checkOverlap=!0;B.spacing=20;c.executeLayout(function(){B.execute(m.getDefaultParent(),m.isSelectionEmpty()?null:m.getSelectionCells())},!1)}),D);u.addSeparator(D);
+c.menus.addMenuItem(u,"runLayout",D,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(u,D){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(u,["about"],D);else{var B=u.addItem("Search:",null,null,D,null,null,!1);B.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.marginLeft="8px";mxEvent.addListener(C,
+"keydown",mxUtils.bind(this,function(G){var N=mxUtils.trim(C.value);13==G.keyCode&&0<N.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(N)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:N}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(C.value="")}));B.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,
+function(G){document.activeElement!=C&&C.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(u,"- keyboardShortcuts quickStart website support -".split(" "),D),"1"!=urlParams.disableUpdate&&this.addMenuItems(u,["check4Updates",
+"-"],D),this.addMenuItems(u,["forkme","-","about"],D)):this.addMenuItems(u,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),D)}"1"==urlParams.test&&(u.addSeparator(D),this.addSubmenu("testDevelop",u,D))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var u=prompt("Language Code",Graph.diagramLanguage||"");null!=u&&(Graph.diagramLanguage=0<u.length?u:null,m.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,
-function(){if(!m.isSelectionEmpty()){var t=m.cloneCells(m.getSelectionCells()),z=m.getBoundingBoxFromGeometry(t);t=m.moveCells(t,-z.x,-z.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+z.width+", "+z.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(m.encodeCells(t)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var t=m.getGraphBounds(),z=m.view.translate,L=m.view.scale;m.insertVertex(m.getDefaultParent(),null,"",t.x/L-z.x,t.y/L-
-z.y,t.width/L,t.height/L,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";t=new TextareaDialog(c,"Paste Data:",t,function(z){if(0<z.length)try{var L=function(J){function F(K){if(null==D[K]){if(D[K]=!0,null!=V[K]){for(;0<V[K].length;){var T=V[K].pop();F(T)}delete V[K]}}else mxLog.debug(H+": Visited: "+K)}var H=J.parentNode.id,S=J.childNodes;J={};
-for(var V={},M=null,W={},U=0;U<S.length;U++){var X=S[U];if(null!=X.id&&0<X.id.length)if(null==J[X.id]){J[X.id]=X.id;var u=X.getAttribute("parent");null==u?null!=M?mxLog.debug(H+": Multiple roots: "+X.id):M=X.id:(null==V[u]&&(V[u]=[]),V[u].push(X.id))}else W[X.id]=X.id}S=Object.keys(W);0<S.length?(S=H+": "+S.length+" Duplicates: "+S.join(", "),mxLog.debug(S+" (see console)")):mxLog.debug(H+": Checked");var D={};null==M?mxLog.debug(H+": No root"):(F(M),Object.keys(D).length!=Object.keys(J).length&&
-(mxLog.debug(H+": Invalid tree: (see console)"),console.log(H+": Invalid tree",V)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var C=mxUtils.parseXml(z),E=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=E&&0<E.length)try{var G=c.getHashValueForPages(E);mxLog.debug("Checksum: ",G)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var P=C.getElementsByTagName("root");for(z=0;z<P.length;z++)L(P[z]);
-mxLog.show()}catch(J){c.handleError(J),null!=window.console&&console.error(J)}});c.showDialog(t.container,620,460,!0,!0);t.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var t=new TextareaDialog(c,"Diff/Sync:","",function(z){var L=c.getCurrentFile();if(0<z.length&&null!=L)try{var C=JSON.parse(z);L.patch([C],null,!0);c.hideDialog()}catch(E){c.handleError(E)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(z,L){A=c.getPagesForXml(c.getFileData(!0));
-t.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(z,L){try{t.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),t.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)):t.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2);c.showDialog(t.container,620,460,!0,!0);t.init()}else c.alert("No pages")}));
-c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var t=c.getCurrentFile();console.log("editorUi",c,"file",t);if(null!=t&&t.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(t.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(t.theirPages));console.log("diff ownPages/theirPages",c.diffPages(t.ownPages,t.theirPages));var z=t.getShadowPages();null!=z&&(console.log("Checksum shadowPages",c.getHashValueForPages(z)),console.log("diff shadowPages/ownPages",
-c.diffPages(z,t.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(t.ownPages,z)),console.log("diff theirPages/shadowPages",c.diffPages(t.theirPages,z)));null!=t.sync&&null!=t.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(t.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(t.ownPages,t.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(t.theirPages,t.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(t.sync.snapshot,
-c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(t.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(t.theirPages,c.pages)))}null!=t&&console.log("Shadow pages",[c.getXmlForPages(t.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var t=c.getCurrentFile();null!=t&&t.isRealtime()&&null!=t.shadowPages&&
-(console.log("patching actualPages to shadowPages",t.patch([c.diffPages(t.shadowPages,c.pages)])),t.ownPages=c.clonePages(c.pages),t.theirPages=c.clonePages(c.pages),t.shadowPages=c.clonePages(c.pages),null!=t.sync&&(t.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,m.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var t=new mxImageExport,z=m.getGraphBounds(),L=m.view.scale,C=mxUtils.createXmlDocument(),
-E=C.createElement("output");C.appendChild(E);C=new mxXmlCanvas2D(E);C.translate(Math.floor((1-z.x)/L),Math.floor((1-z.y)/L));C.scale(1/L);var G=0,P=C.save;C.save=function(){G++;P.apply(this,arguments)};var J=C.restore;C.restore=function(){G--;J.apply(this,arguments)};var F=t.drawShape;t.drawShape=function(H){mxLog.debug("entering shape",H,G);F.apply(this,arguments);mxLog.debug("leaving shape",H,G)};t.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(E));mxLog.debug("stateCounter",
-G)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),z)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,
-!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(t){m.isEnabled()&&(t=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),t.vertex=!0,t=new EditShapeDialog(c,t,mxResources.get("editShape")+":",630,400),c.showDialog(t.container,640,480,!0,!1),t.init())})).isEnabled=n;c.actions.put("embedHtml",
-new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(t){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",t,function(z,L,C,E,G,P,J,F,H,S,V){c.createHtml(z,L,C,E,G,P,J,F,H,S,V,mxUtils.bind(this,function(M,W){var U=new EmbedDialog(c,M+"\n"+W,null,null,function(){var X=window.open(),u=X.document;if(null!=u){"CSS1Compat"===document.compatMode&&
-u.writeln("<!DOCTYPE html>");u.writeln("<html>");u.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');u.writeln("<body>");u.writeln(M);var D=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;D&&u.writeln(W);u.writeln("</body>");u.writeln("</html>");u.close();if(!D){var K=X.document.createElement("div");K.marginLeft="26px";K.marginTop="26px";mxUtils.write(K,mxResources.get("updatingDocument"));D=X.document.createElement("img");
-D.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");D.style.marginLeft="6px";K.appendChild(D);X.document.body.insertBefore(K,X.document.body.firstChild);window.setTimeout(function(){var T=document.createElement("script");T.type="text/javascript";T.src=/<script.*?src="(.*?)"/.exec(W)[1];u.body.appendChild(T);K.parentNode.removeChild(K)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(U.container,450,240,!0,
-!0);U.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var t=c.getCurrentFile();null!=t&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(z){c.spinner.stop();null!=z?(z=new EmbedDialog(c,'<img src="'+(t.constructor!=DriveFile?z:"https://drive.google.com/uc?id="+t.getId())+'"/>'),c.showDialog(z.container,450,240,!0,!0),z.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",
-new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(t,z,L,C,E,G){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(t,z,L,C,E,G,function(P){c.spinner.stop();P=new EmbedDialog(c,P);c.showDialog(P.container,450,240,!0,!0);P.init()},function(P){c.spinner.stop();c.handleError(P)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(t,
-z,L,C,E,G){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(t,z,L,C,E,G,function(P){c.spinner.stop();P=new EmbedDialog(c,P);c.showDialog(P.container,450,240,!0,!0);P.init()},function(P){c.spinner.stop();c.handleError(P)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var t=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),
-null,"100%",Math.ceil(t.height/m.view.scale)+2,function(z,L,C,E,G,P,J,F,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(S){c.spinner.stop();var V=[];H&&V.push("tags=%7B%7D");S=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+J+";height:"+F+';" src="'+c.createLink(z,L,C,E,G,P,S,null,V)+'"></iframe>');c.showDialog(S.container,450,240,!0,!0);S.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var t=
-document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.textAlign="center";t.style.width="100%";t.style.left="0px";var z=document.createElement("a");z.setAttribute("href","javascript:void(0);");z.setAttribute("target","_blank");z.style.cursor="pointer";mxUtils.write(z,mxResources.get("getNotionChromeExtension"));t.appendChild(z);mxEvent.addListener(z,"click",function(L){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(L)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(L,C,E,G,P,J,F,H,S){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var M=["border=0"];S&&M.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(L,C,E,G,P,J,V,null,M,!0));c.showDialog(V.container,450,240,!0,!0);V.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",t)}));c.actions.put("publishLink",new Action(mxResources.get("link")+
-"...",function(){c.showPublishLinkDialog(null,null,null,null,function(t,z,L,C,E,G,P,J,F){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(H){c.spinner.stop();var S=[];F&&S.push("tags=%7B%7D");H=new EmbedDialog(c,c.createLink(t,z,L,C,E,G,H,null,S));c.showDialog(H.container,450,240,!0,!0);H.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});
-c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(t){c.spinner.stop();t=new GoogleSitesDialog(c,t);c.showDialog(t.container,420,256,!0,!0);t.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=c.actions.addAction("scratchpad",
-function(){c.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});l=c.actions.addAction("search",function(){var t=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!t);isLocalStorage&&(mxSettings.settings.search=!t,mxSettings.save())});l.label=mxResources.get("searchShapes");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(c.actions.get("save").funct=function(t){m.isEditing()&&m.stopEditing();var z="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var L=c.createLoadMessage("save");L.xml=z;t&&(L.exit=!0);z=JSON.stringify(L)}(window.opener||window.parent).postMessage(z,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));t=c.getCurrentFile();null==t||t.constructor==
-EmbedFile||t.constructor==LocalFile&&null==t.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var t=function(){c.editor.modified=!1;var z="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(z,
-"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(t,z){c.isExportToCanvas()?(this.addMenuItems(t,["exportPng"],z),c.jpgSupported&&this.addMenuItems(t,["exportJpg"],z)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPng","exportJpg"],z);this.addMenuItems(t,["exportSvg","-"],z);c.isOffline()||c.printPdfExport?this.addMenuItems(t,
-["exportPdf"],z):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],z);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(t,["exportVsdx"],z);this.addMenuItems(t,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(t.addSeparator(z),this.addMenuItem(t,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,z){function L(G){G.pickFile(function(P){c.spinner.spin(document.body,
-mxResources.get("loading"))&&G.getFile(P,function(J){var F="data:image/"==J.getData().substring(0,11)?E(J.getTitle()):"text/xml";/\.svg$/i.test(J.getTitle())&&!c.editor.isDataSvg(J.getData())&&(J.setData(Editor.createSvgDataUri(J.getData())),F="image/svg+xml");C(J.getData(),F,J.getTitle())},function(J){c.handleError(J,null!=J?mxResources.get("errorLoadingFile"):null)},G==c.drive)},!0)}var C=mxUtils.bind(this,function(G,P,J){var F=m.view,H=m.getGraphBounds(),S=m.snap(Math.ceil(Math.max(0,H.x/F.scale-
-F.translate.x)+4*m.gridSize)),V=m.snap(Math.ceil(Math.max(0,(H.y+H.height)/F.scale-F.translate.y)+4*m.gridSize));"data:image/"==G.substring(0,11)?c.loadImage(G,mxUtils.bind(this,function(M){var W=!0,U=mxUtils.bind(this,function(){c.resizeImage(M,G,mxUtils.bind(this,function(X,u,D){X=W?Math.min(1,Math.min(c.maxImageSize/u,c.maxImageSize/D)):1;c.importFile(G,P,S,V,Math.round(u*X),Math.round(D*X),J,function(K){c.spinner.stop();m.setSelectionCells(K);m.scrollCellToVisible(m.getSelectionCell())})}),W)});
-G.length>c.resampleThreshold?c.confirmImageResize(function(X){W=X;U()}):U()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(G,P,S,V,0,0,J,function(M){c.spinner.stop();m.setSelectionCells(M);m.scrollCellToVisible(m.getSelectionCell())})}),E=mxUtils.bind(this,function(G){var P="text/xml";/\.png$/i.test(G)?P="image/png":/\.jpe?g$/i.test(G)?P="image/jpg":/\.gif$/i.test(G)?P="image/gif":/\.pdf$/i.test(G)&&(P="application/pdf");return P});"undefined"!=
-typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){L(c.drive)},z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){L(c.oneDrive)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){L(c.dropbox)},z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){L(c.gitHub)},z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){L(c.gitLab)},z);null!=c.trello?t.addItem(mxResources.get("trello")+
-"...",null,function(){L(c.trello)},z):k&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},z);c.isOffline()||(t.addSeparator(z),t.addItem(mxResources.get("url")+
-"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("import"),function(P){if(null!=P&&0<P.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var J=/(\.png)($|\?)/i.test(P)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(P),function(F){C(F,J,P)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==J)}},mxResources.get("url"));c.showDialog(G.container,300,80,!0,!0);G.init()},z))}))).isEnabled=n;
-this.put("theme",new Menu(mxUtils.bind(this,function(t,z){var L="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=t.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},z);"kennedy"!=L&&"atlas"!=L&&"dark"!=L&&"min"!=L&&"sketch"!=L&&t.addCheckmark(C,Editor.checkmarkImage);t.addSeparator(z);C=t.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},
-z);"kennedy"==L&&t.addCheckmark(C,Editor.checkmarkImage);C=t.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},z);"min"==L&&t.addCheckmark(C,Editor.checkmarkImage);C=t.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},z);"atlas"==L&&t.addCheckmark(C,Editor.checkmarkImage);if("dark"==L||!mxClient.IS_IE&&!mxClient.IS_IE11)C=t.addItem(mxResources.get("dark"),
-null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},z),"dark"==L&&t.addCheckmark(C,Editor.checkmarkImage);t.addSeparator(z);C=t.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},z);"sketch"==L&&t.addCheckmark(C,Editor.checkmarkImage)})));l=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var t=this.editorUi.getCurrentFile();if(null!=t)if(t.constructor==
-LocalFile&&null!=t.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(L,C){t.invalidFileHandle=null;t.fileHandle=L;t.title=C.name;t.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(t.getTitle()));else{var z=null!=t.getTitle()?t.getTitle():this.editorUi.defaultFilename;z=new FilenameDialog(this.editorUi,z,mxResources.get("rename"),mxUtils.bind(this,function(L){null!=L&&0<L.length&&null!=t&&L!=t.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&t.rename(L,
-mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),t.constructor==DriveFile||t.constructor==StorageFile?mxResources.get("diagramName"):null,function(L){if(null!=L&&0<L.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(z.container,340,96,!0,
-!0);z.init()}}));l.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};l.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var t=c.getCurrentFile();if(null!=t){var z=c.getCopyFilename(t);t.constructor==DriveFile?(z=new CreateDialog(c,z,mxUtils.bind(this,function(L,C){"_blank"==C?c.editor.editAsNew(c.getFileData(),L):("download"==C&&(C=App.MODE_GOOGLE),null!=L&&0<L.length&&(C==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&
-t.saveAs(L,mxUtils.bind(this,function(E){t.desc=E;t.save(!1,mxUtils.bind(this,function(){c.spinner.stop();t.setModified(!1);t.addAllSavedStatus()}),mxUtils.bind(this,function(G){c.handleError(G)}))}),mxUtils.bind(this,function(E){c.handleError(E)})):c.createFile(L,c.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(z.container,420,380,!0,!0),
-z.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),z)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var t=c.getCurrentFile();if(t.getMode()==App.MODE_GOOGLE||t.getMode()==App.MODE_ONEDRIVE){var z=!1;if(t.getMode()==App.MODE_GOOGLE&&null!=t.desc.parents)for(var L=0;L<t.desc.parents.length;L++)if(t.desc.parents[L].isRoot){z=!0;break}c.pickFolder(t.getMode(),mxUtils.bind(this,function(C){c.spinner.spin(document.body,mxResources.get("moving"))&&t.move(C,mxUtils.bind(this,
-function(E){c.spinner.stop()}),mxUtils.bind(this,function(E){c.handleError(E)}))}),null,!0,z)}}));this.put("publish",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,["publishLink"],z)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
-function(){try{var t=c.getCurrentFile();null!=t&&t.share()}catch(z){c.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,function(t,z){var L=c.getCurrentFile();null==L||L.getMode()!=App.MODE_GOOGLE&&L.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(L.getTitle())||this.addMenuItems(t,["liveImage","-"],z);this.addMenuItems(t,["embedImage","embedSvg","-","embedHtml"],z);navigator.standalone||c.isOffline()||this.addMenuItems(t,["embedIframe"],z);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(t,
-"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),z)})));c.addInsertItem=function(t,z,L,C){("plantUml"!=C||EditorUi.enablePlantUml&&!c.isOffline())&&t.addItem(L,null,mxUtils.bind(this,function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var E=new ParseDialog(c,L,C);c.showDialog(E.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else E=new CreateGraphDialog(c,L,C),c.showDialog(E.container,620,420,!0,!1);E.init()}),z,null,n())};
-var B=function(t,z,L,C){var E=new mxCell(t,new mxGeometry(0,0,z,L),C);E.vertex=!0;t=m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([E],!0));E.geometry.x=t.x;E.geometry.y=t.y;m.getModel().beginUpdate();try{E=m.addCell(E),m.fireEvent(new mxEventObject("cellsInserted","cells",[E]))}finally{m.getModel().endUpdate()}m.scrollCellToVisible(E);m.setSelectionCell(E);m.container.focus();m.editAfterInsert&&m.startEditing(E);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(m.view.getState(E))},
-0);return E};c.actions.put("insertText",new Action(mxResources.get("text"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&m.startEditingAtCell(B("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&B("",120,60,
-"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&B("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&B("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=n;c.addInsertMenuItems=
-mxUtils.bind(this,function(t,z,L){for(var C=0;C<L.length;C++)"-"==L[C]?t.addSeparator(z):c.addInsertItem(t,z,mxResources.get(L[C])+"...",L[C])});this.put("insert",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),z);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(t,["insertTemplate"],z);t.addSeparator(z);this.addSubmenu("insertLayout",t,z,mxResources.get("layout"));
-this.addSubmenu("insertAdvanced",t,z,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){c.addInsertMenuItems(t,z,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(t,z){c.addInsertMenuItems(t,z,["fromText","plantUml","mermaid","-","formatSql"]);t.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},z,null,n())})));
-this.put("openRecent",new Menu(function(t,z){var L=c.getRecent();if(null!=L){for(var C=0;C<L.length;C++)(function(E){var G=E.mode;G==App.MODE_GOOGLE?G="googleDrive":G==App.MODE_ONEDRIVE&&(G="oneDrive");t.addItem(E.title+" ("+mxResources.get(G)+")",null,function(){c.loadFile(E.id)},z)})(L[C]);t.addSeparator(z)}t.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},z)}));this.put("openFrom",new Menu(function(t,z){null!=c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},
-z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},
-z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},z);null!=c.trello?t.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},z):k&&"function"===
-typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},z);c.isOffline()||(t.addSeparator(z),t.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,
-"",mxResources.get("open"),function(C){null!=C&&0<C.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(C):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(C)))},mxResources.get("url"));c.showDialog(L.container,300,80,!0,!0);L.init()},z))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(t,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
-c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
-z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},z);null!=c.trello?t.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},z):k&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+
-"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},z)})),this.put("openLibraryFrom",new Menu(function(t,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},z);null!=c.trello?t.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},z):k&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},z);c.isOffline()||(t.addSeparator(z),t.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,"",mxResources.get("open"),function(C){if(null!=C&&0<C.length&&c.spinner.spin(document.body,
-mxResources.get("loading"))){var E=C;c.editor.isCorsEnabledForUrl(C)||(E=PROXY_URL+"?url="+encodeURIComponent(C));mxUtils.get(E,function(G){if(200<=G.getStatus()&&299>=G.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,G.getText(),C))}catch(P){c.handleError(P,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
-c.showDialog(L.container,300,80,!0,!0);L.init()},z));"1"==urlParams.confLib&&(t.addSeparator(z),t.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},z))})));this.put("edit",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-l=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var t=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(t);this.commentsWindow.refreshCommentsTime();t&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));l=this.get("viewPanels");var I=l.funct;l.funct=
-function(t,z){I.apply(this,arguments);c.menus.addMenuItems(t,["tags"],z);c.commentsSupported()&&c.menus.addMenuItems(t,["comments"],z)};this.put("view",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(t,["-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP){var L=this.addMenuItem(t,"scratchpad",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(L,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(t,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",t,z);this.addMenuItems(t,"- scrollbars tooltips ruler - grid guides".split(" "),z);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(t,"shadowVisible",z);this.addMenuItems(t,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),z);"1"!=urlParams.sketch&&this.addMenuItems(t,
-["-","fullscreen"],z)})));if(EditorUi.isElectronApp){var O="1"==urlParams.enableSpellCheck;l=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();O=!O;c.alert(mxResources.get("restartForChangeRequired"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return O});c.actions.addAction("openDevTools",function(){c.openDevTools()})}this.put("extras",new Menu(mxUtils.bind(this,function(t,z){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",t,z),t.addSeparator(z));"1"!=urlParams.embed&&
-(this.addSubmenu("theme",t,z),t.addSeparator(z));if("undefined"!==typeof MathJax){var L=this.addMenuItem(t,"mathematicalTypesetting",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(L,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(t,["spellCheck"],z);this.addMenuItems(t,["copyConnect","collapseExpand","-"],z);"1"!=urlParams.embed&&(L=c.getCurrentFile(),null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&this.addMenuItems(t,
-["showRemoteCursors","shareCursor"],z),this.addMenuItems(t,["autosave"],z));t.addSeparator(z);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(t,"plugins",z);this.addMenuItems(t,["-","editDiagram"],z);Graph.translateDiagram&&this.addMenuItems(t,["diagramLanguage"]);t.addSeparator(z);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(t,["showStartScreen"],z);this.addMenuItems(t,["configuration"],z);EditorUi.isElectronApp&&this.addMenuItems(t,["openDevTools"],z);t.addSeparator(z);
-"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function C(G){return{id:G.id,isExt:!0,url:G.downloadUrl,title:G.title,imgUrl:G.thumbnailLink,changedBy:G.lastModifyingUserName,lastModifiedOn:G.modifiedDate}}var E=new TemplatesDialog(c,function(G){console.log(arguments)},null,null,null,"user",function(G,P,J){var F=new Date;F.setDate(F.getDate()-7);c.drive.listFiles(null,F,J?!0:!1,function(H){for(var S=[],V=0;V<H.items.length;V++)S.push(C(H.items[V]));G(S)},P)},function(G,P,J,
-F){c.drive.listFiles(G,null,F?!0:!1,function(H){for(var S=[],V=0;V<H.items.length;V++)S.push(C(H.items[V]));P(S)},J)},function(G,P,J){c.drive.getFile(G.id,function(F){P(F.data)},J)},null,function(G){G({Test:[]},1)},!0,!1);c.showDialog(E.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(t,"templates",z))})));this.put("file",new Menu(mxUtils.bind(this,function(t,z){if("1"==urlParams.embed)this.addSubmenu("importFrom",t,z),this.addSubmenu("exportAs",t,z),this.addSubmenu("embed",
-t,z),"1"==urlParams.libraries&&(this.addMenuItems(t,["-"],z),this.addSubmenu("newLibrary",t,z),this.addSubmenu("openLibraryFrom",t,z)),c.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],z),this.addMenuItems(t,["-","pageSetup","print","-","rename"],z),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],z):(this.addMenuItems(t,["save"],z),"1"==urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],z))),"1"!=
-urlParams.noExitBtn&&this.addMenuItems(t,["exit"],z);else{var L=this.editorUi.getCurrentFile();if(null!=L&&L.constructor==DriveFile){L.isRestricted()&&this.addMenuItems(t,["exportOptionsDisabled"],z);this.addMenuItems(t,["save","-","share"],z);var C=this.addMenuItem(t,"synchronize",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize");t.addSeparator(z)}else this.addMenuItems(t,["new"],z);this.addSubmenu("openFrom",
-t,z);isLocalStorage&&this.addSubmenu("openRecent",t,z);null!=L&&L.constructor==DriveFile?this.addMenuItems(t,["new","-","rename","makeCopy","moveToFolder"],z):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==L||L.constructor==LocalFile&&null==L.fileHandle||(t.addSeparator(z),C=this.addMenuItem(t,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(t,["-","save","saveAs","-"],z),
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==L||this.addMenuItems(t,["share","-"],z),this.addMenuItems(t,["rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],z):(this.addMenuItems(t,["makeCopy"],z),null!=L&&L.constructor==OneDriveFile&&this.addMenuItems(t,["moveToFolder"],z)));t.addSeparator(z);this.addSubmenu("importFrom",t,z);this.addSubmenu("exportAs",t,z);t.addSeparator(z);
-this.addSubmenu("embed",t,z);this.addSubmenu("publish",t,z);t.addSeparator(z);this.addSubmenu("newLibrary",t,z);this.addSubmenu("openLibraryFrom",t,z);c.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],z);null!=L&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=L.getTitle()?L.getTitle():c.defaultFilename,(L.constructor==DriveFile&&null!=L.sync&&L.sync.isConnected()||!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C))&&this.addMenuItems(t,["-","properties"]));this.addMenuItems(t,
-["-","pageSetup"],z);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["print"],z);this.addMenuItems(t,["-","close"])}})));f.prototype.execute=function(){var t=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var z=t.extFonts,L=0;null!=z&&L<z.length;L++){var C=document.getElementById("extFont_"+z[L].name);
-null!=C&&C.parentNode.removeChild(C)}t.extFonts=[];for(L=0;null!=this.previousExtFonts&&L<this.previousExtFonts.length;L++)this.ui.editor.graph.addExtFont(this.previousExtFonts[L].name,this.previousExtFonts[L].url);this.previousExtFonts=z};this.put("fontFamily",new Menu(mxUtils.bind(this,function(t,z){for(var L=mxUtils.bind(this,function(V,M,W,U,X){var u=c.editor.graph;U=this.styleChange(t,U||V,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[V,null!=M?encodeURIComponent(M):null,null]:[V],null,z,function(){"1"!=urlParams["ext-fonts"]?u.setFont(V,M):(document.execCommand("fontname",!1,V),u.addExtFont(V,M));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[V,null!=M?encodeURIComponent(M):null,null]:[V],"cells",[u.cellEditor.getEditingCell()]))},function(){u.updateLabelElements(u.getSelectionCells(),
-function(D){D.removeAttribute("face");D.style.fontFamily=null;"PRE"==D.nodeName&&u.replaceElement(D,"div")});"1"==urlParams["ext-fonts"]&&u.addExtFont(V,M)});W&&(W=document.createElement("span"),W.className="geSprite geSprite-delete",W.style.cursor="pointer",W.style.display="inline-block",U.firstChild.nextSibling.nextSibling.appendChild(W),mxEvent.addListener(W,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(D){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[V.toLowerCase()];
-for(var K=0;K<this.customFonts.length;K++)if(this.customFonts[K].name==V&&this.customFonts[K].url==M){this.customFonts.splice(K,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var T=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=T&&0<T.length)for(K=0;K<T.length;K++)if(T[K].name==V){T.splice(K,1);break}var N=mxUtils.clone(this.customFonts);for(K=0;K<N.length;K++)if(N[K].name==V){N.splice(K,1);break}K=new f(this.editorUi,T,N);this.editorUi.editor.graph.model.execute(K)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(D)})));Graph.addFont(V,M);U.firstChild.nextSibling.style.fontFamily=V;null!=X&&U.setAttribute("title",X)}),C={},E=0;E<this.defaultFonts.length;E++){var G=this.defaultFonts[E];"string"===typeof G?L(G):null!=G.fontFamily&&null!=G.fontUrl&&(C[encodeURIComponent(G.fontFamily)+"@"+encodeURIComponent(G.fontUrl)]=!0,L(G.fontFamily,G.fontUrl))}t.addSeparator(z);if("1"!=urlParams["ext-fonts"]){G=function(V){var M=encodeURIComponent(V.name)+(null==V.url?"":"@"+encodeURIComponent(V.url));if(!C[M]){for(var W=
-V.name,U=0;null!=J[W.toLowerCase()];)W=V.name+" ("+ ++U+")";null==P[M]&&(F.push({name:V.name,url:V.url,label:W,title:V.url}),J[W.toLowerCase()]=V,P[M]=V)}};var P={},J={},F=[];for(E=0;E<this.customFonts.length;E++)G(this.customFonts[E]);for(var H in Graph.recentCustomFonts)G(Graph.recentCustomFonts[H]);F.sort(function(V,M){return V.label<M.label?-1:V.label>M.label?1:0});if(0<F.length){for(E=0;E<F.length;E++)L(F[E].name,F[E].url,!0,F[E].label,F[E].url);t.addSeparator(z)}t.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),z);t.addSeparator(z)}else{H=this.editorUi.editor.graph.extFonts;if(null!=H&&0<H.length){G={};var S=!1;for(E=0;E<this.customFonts.length;E++)G[this.customFonts[E].name]=!0;for(E=0;E<H.length;E++)G[H[E].name]||(this.customFonts.push(H[E]),S=!0);S&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(E=
-0;E<this.customFonts.length;E++)H=this.customFonts[E].name,G=this.customFonts[E].url,L(H,G,!0),this.editorUi.editor.graph.addExtFont(H,G,!0);t.addSeparator(z);t.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var V=new f(this.editorUi,[],[]);c.editor.graph.model.execute(V)}),z);t.addSeparator(z)}}t.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var V=this.editorUi.editor.graph,M=V.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],W=
-"s",U=null;if("1"!=urlParams["ext-fonts"]&&V.isEditing()){var X=V.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&(M=Graph.stripQuotes(X.fontFamily),U=Graph.getFontUrl(M,null),null!=U&&(Graph.isGoogleFontUrl(U)?(U=null,W="g"):W="w")))}else X=V.getView().getState(V.getSelectionCell()),null!=X&&(M=X.style[mxConstants.STYLE_FONTFAMILY]||M,"1"!=urlParams["ext-fonts"]?(X=X.style.fontSource,null!=X&&(X=decodeURIComponent(X),Graph.isGoogleFontUrl(X)?W="g":(W="w",U=X))):(W=X.style.FType||
-W,"w"==W&&(U=this.editorUi.editor.graph.extFonts,X=null,null!=U&&(X=U.find(function(D){return D.name==M})),U=null!=X?X.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var u=null;document.activeElement==V.cellEditor.textarea&&(u=V.cellEditor.saveSelection());W=new FontDialog(this.editorUi,M,U,W,mxUtils.bind(this,function(D,K,T){null!=u&&(V.cellEditor.restoreSelection(u),u=null);
-if(null!=D&&0<D.length)if("1"!=urlParams["ext-fonts"]&&V.isEditing())V.setFont(D,K);else{V.getModel().beginUpdate();try{V.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,D),V.setCellStyles("fontSource",null!=K?encodeURIComponent(K):null),V.setCellStyles("FType",null)):(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,D),"s"!=T&&(V.setCellStyles("FType",T),0==K.indexOf("http://")&&(K=PROXY_URL+"?url="+encodeURIComponent(K)),this.editorUi.editor.graph.addExtFont(D,
-K)));T=!0;for(var N=0;N<this.customFonts.length;N++)if(this.customFonts[N].name==D){T=!1;break}T&&(this.customFonts.push({name:D,url:K}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+function(){if(!m.isSelectionEmpty()){var u=m.cloneCells(m.getSelectionCells()),D=m.getBoundingBoxFromGeometry(u);u=m.moveCells(u,-D.x,-D.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+D.width+", "+D.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(m.encodeCells(u)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var u=m.getGraphBounds(),D=m.view.translate,B=m.view.scale;m.insertVertex(m.getDefaultParent(),null,"",u.x/B-D.x,u.y/B-
+D.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var u=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";u=new TextareaDialog(c,"Paste Data:",u,function(D){if(0<D.length)try{var B=function(F){function H(T){if(null==M[T]){if(M[T]=!0,null!=J[T]){for(;0<J[T].length;){var O=J[T].pop();H(O)}delete J[T]}}else mxLog.debug(R+": Visited: "+T)}var R=F.parentNode.id,W=F.childNodes;F={};
+for(var J={},V=null,U={},X=0;X<W.length;X++){var t=W[X];if(null!=t.id&&0<t.id.length)if(null==F[t.id]){F[t.id]=t.id;var E=t.getAttribute("parent");null==E?null!=V?mxLog.debug(R+": Multiple roots: "+t.id):V=t.id:(null==J[E]&&(J[E]=[]),J[E].push(t.id))}else U[t.id]=t.id}W=Object.keys(U);0<W.length?(W=R+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(R+": Checked");var M={};null==V?mxLog.debug(R+": No root"):(H(V),Object.keys(M).length!=Object.keys(F).length&&
+(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",J)))};"<"!=D.charAt(0)&&(D=Graph.decompress(D),mxLog.debug("See console for uncompressed XML"),console.log("xml",D));var C=mxUtils.parseXml(D),G=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var N=c.getHashValueForPages(G);mxLog.debug("Checksum: ",N)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var I=C.getElementsByTagName("root");for(D=0;D<I.length;D++)B(I[D]);
+mxLog.show()}catch(F){c.handleError(F),null!=window.console&&console.error(F)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var z=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(D){var B=c.getCurrentFile();if(0<D.length&&null!=B)try{var C=JSON.parse(D);B.patch([C],null,!0);c.hideDialog()}catch(G){c.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(D,B){z=c.getPagesForXml(c.getFileData(!0));
+u.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)}],["Diff",function(D,B){try{u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==z?(z=c.getPagesForXml(c.getFileData(!0)),u.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)):u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2);c.showDialog(u.container,620,460,!0,!0);u.init()}else c.alert("No pages")}));
+c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var u=c.getCurrentFile();console.log("editorUi",c,"file",u);if(null!=u&&u.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(u.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(u.theirPages));console.log("diff ownPages/theirPages",c.diffPages(u.ownPages,u.theirPages));var D=u.getShadowPages();null!=D&&(console.log("Checksum shadowPages",c.getHashValueForPages(D)),console.log("diff shadowPages/ownPages",
+c.diffPages(D,u.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(u.ownPages,D)),console.log("diff theirPages/shadowPages",c.diffPages(u.theirPages,D)));null!=u.sync&&null!=u.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(u.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(u.ownPages,u.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(u.theirPages,u.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(u.sync.snapshot,
+c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(u.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(u.theirPages,c.pages)))}null!=u&&console.log("Shadow pages",[c.getXmlForPages(u.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var u=c.getCurrentFile();null!=u&&u.isRealtime()&&null!=u.shadowPages&&
+(console.log("patching actualPages to shadowPages",u.patch([c.diffPages(u.shadowPages,c.pages)])),u.ownPages=c.clonePages(c.pages),u.theirPages=c.clonePages(c.pages),u.shadowPages=c.clonePages(c.pages),null!=u.sync&&(u.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,m.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var u=new mxImageExport,D=m.getGraphBounds(),B=m.view.scale,C=mxUtils.createXmlDocument(),
+G=C.createElement("output");C.appendChild(G);C=new mxXmlCanvas2D(G);C.translate(Math.floor((1-D.x)/B),Math.floor((1-D.y)/B));C.scale(1/B);var N=0,I=C.save;C.save=function(){N++;I.apply(this,arguments)};var F=C.restore;C.restore=function(){N--;F.apply(this,arguments)};var H=u.drawShape;u.drawShape=function(R){mxLog.debug("entering shape",R,N);H.apply(this,arguments);mxLog.debug("leaving shape",R,N)};u.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",
+N)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),D)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,
+!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(u){m.isEnabled()&&(u=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),u.vertex=!0,u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())})).isEnabled=n;c.actions.put("embedHtml",
+new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(D,B,C,G,N,I,F,H,R,W,J){c.createHtml(D,B,C,G,N,I,F,H,R,W,J,mxUtils.bind(this,function(V,U){var X=new EmbedDialog(c,V+"\n"+U,null,null,function(){var t=window.open(),E=t.document;if(null!=E){"CSS1Compat"===document.compatMode&&
+E.writeln("<!DOCTYPE html>");E.writeln("<html>");E.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');E.writeln("<body>");E.writeln(V);var M=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;M&&E.writeln(U);E.writeln("</body>");E.writeln("</html>");E.close();if(!M){var T=t.document.createElement("div");T.marginLeft="26px";T.marginTop="26px";mxUtils.write(T,mxResources.get("updatingDocument"));M=t.document.createElement("img");
+M.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");M.style.marginLeft="6px";T.appendChild(M);t.document.body.insertBefore(T,t.document.body.firstChild);window.setTimeout(function(){var O=document.createElement("script");O.type="text/javascript";O.src=/<script.*?src="(.*?)"/.exec(U)[1];E.body.appendChild(O);T.parentNode.removeChild(T)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,
+!0);X.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var u=c.getCurrentFile();null!=u&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(D){c.spinner.stop();null!=D?(D=new EmbedDialog(c,'<img src="'+(u.constructor!=DriveFile?D:"https://drive.google.com/uc?id="+u.getId())+'"/>'),c.showDialog(D.container,450,240,!0,!0),D.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",
+new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(u,D,B,C,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(u,D,B,C,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(u,
+D,B,C,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(u,D,B,C,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),
+null,"100%",Math.ceil(u.height/m.view.scale)+2,function(D,B,C,G,N,I,F,H,R){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var J=[];R&&J.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+H+';" src="'+c.createLink(D,B,C,G,N,I,W,null,J)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var u=
+document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.textAlign="center";u.style.width="100%";u.style.left="0px";var D=document.createElement("a");D.setAttribute("href","javascript:void(0);");D.setAttribute("target","_blank");D.style.cursor="pointer";mxUtils.write(D,mxResources.get("getNotionChromeExtension"));u.appendChild(D);mxEvent.addListener(D,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(B)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(B,C,G,N,I,F,H,R,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(J){c.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(B,C,G,N,I,F,J,null,V,!0));c.showDialog(J.container,450,240,!0,!0);J.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+
+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,D,B,C,G,N,I,F,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(R){c.spinner.stop();var W=[];H&&W.push("tags=%7B%7D");R=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,R,null,W));c.showDialog(R.container,450,240,!0,!0);R.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});
+c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();u=new GoogleSitesDialog(c,u);c.showDialog(u.container,420,256,!0,!0);u.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=c.actions.addAction("scratchpad",
+function(){c.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});l=c.actions.addAction("search",function(){var u=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!u);isLocalStorage&&(mxSettings.settings.search=!u,mxSettings.save())});l.label=mxResources.get("searchShapes");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(c.actions.get("save").funct=function(u){m.isEditing()&&m.stopEditing();var D="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var B=c.createLoadMessage("save");B.xml=D;u&&(B.exit=!0);D=JSON.stringify(B)}(window.opener||window.parent).postMessage(D,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));u=c.getCurrentFile();null==u||u.constructor==
+EmbedFile||u.constructor==LocalFile&&null==u.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var u=function(){c.editor.modified=!1;var D="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(D,
+"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(u,D){c.isExportToCanvas()?(this.addMenuItems(u,["exportPng"],D),c.jpgSupported&&this.addMenuItems(u,["exportJpg"],D)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPng","exportJpg"],D);this.addMenuItems(u,["exportSvg","-"],D);c.isOffline()||c.printPdfExport?this.addMenuItems(u,
+["exportPdf"],D):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPdf"],D);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(u,["exportVsdx"],D);this.addMenuItems(u,["-","exportHtml","exportXml","exportUrl"],D);c.isOffline()||(u.addSeparator(D),this.addMenuItem(u,"export",D).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(u,D){function B(N){N.pickFile(function(I){c.spinner.spin(document.body,
+mxResources.get("loading"))&&N.getFile(I,function(F){var H="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!c.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),H="image/svg+xml");C(F.getData(),H,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},N==c.drive)},!0)}var C=mxUtils.bind(this,function(N,I,F){var H=m.view,R=m.getGraphBounds(),W=m.snap(Math.ceil(Math.max(0,R.x/H.scale-
+H.translate.x)+4*m.gridSize)),J=m.snap(Math.ceil(Math.max(0,(R.y+R.height)/H.scale-H.translate.y)+4*m.gridSize));"data:image/"==N.substring(0,11)?c.loadImage(N,mxUtils.bind(this,function(V){var U=!0,X=mxUtils.bind(this,function(){c.resizeImage(V,N,mxUtils.bind(this,function(t,E,M){t=U?Math.min(1,Math.min(c.maxImageSize/E,c.maxImageSize/M)):1;c.importFile(N,I,W,J,Math.round(E*t),Math.round(M*t),F,function(T){c.spinner.stop();m.setSelectionCells(T);m.scrollCellToVisible(m.getSelectionCell())})}),U)});
+N.length>c.resampleThreshold?c.confirmImageResize(function(t){U=t;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(N,I,W,J,0,0,F,function(V){c.spinner.stop();m.setSelectionCells(V);m.scrollCellToVisible(m.getSelectionCell())})}),G=mxUtils.bind(this,function(N){var I="text/xml";/\.png$/i.test(N)?I="image/png":/\.jpe?g$/i.test(N)?I="image/jpg":/\.gif$/i.test(N)?I="image/gif":/\.pdf$/i.test(N)&&(I="application/pdf");return I});"undefined"!=
+typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},D);null!=c.trello?u.addItem(mxResources.get("trello")+
+"...",null,function(){B(c.trello)},D):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+
+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("import"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(I)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(I),function(H){C(H,F,I)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},D))}))).isEnabled=n;
+this.put("theme",new Menu(mxUtils.bind(this,function(u,D){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=u.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"!=B&&"atlas"!=B&&"dark"!=B&&"min"!=B&&"sketch"!=B&&u.addCheckmark(C,Editor.checkmarkImage);u.addSeparator(D);C=u.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},
+D);"kennedy"==B&&u.addCheckmark(C,Editor.checkmarkImage);C=u.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},D);"min"==B&&u.addCheckmark(C,Editor.checkmarkImage);C=u.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},D);"atlas"==B&&u.addCheckmark(C,Editor.checkmarkImage);if("dark"==B||!mxClient.IS_IE&&!mxClient.IS_IE11)C=u.addItem(mxResources.get("dark"),
+null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},D),"dark"==B&&u.addCheckmark(C,Editor.checkmarkImage);u.addSeparator(D);C=u.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},D);"sketch"==B&&u.addCheckmark(C,Editor.checkmarkImage)})));l=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var u=this.editorUi.getCurrentFile();if(null!=u)if(u.constructor==
+LocalFile&&null!=u.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(B,C){u.invalidFileHandle=null;u.fileHandle=B;u.title=C.name;u.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(u.getTitle()));else{var D=null!=u.getTitle()?u.getTitle():this.editorUi.defaultFilename;D=new FilenameDialog(this.editorUi,D,mxResources.get("rename"),mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=u&&B!=u.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&u.rename(B,
+mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),u.constructor==DriveFile||u.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(D.container,340,96,!0,
+!0);D.init()}}));l.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};l.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(null!=u){var D=c.getCopyFilename(u);u.constructor==DriveFile?(D=new CreateDialog(c,D,mxUtils.bind(this,function(B,C){"_blank"==C?c.editor.editAsNew(c.getFileData(),B):("download"==C&&(C=App.MODE_GOOGLE),null!=B&&0<B.length&&(C==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&
+u.saveAs(B,mxUtils.bind(this,function(G){u.desc=G;u.save(!1,mxUtils.bind(this,function(){c.spinner.stop();u.setModified(!1);u.addAllSavedStatus()}),mxUtils.bind(this,function(N){c.handleError(N)}))}),mxUtils.bind(this,function(G){c.handleError(G)})):c.createFile(B,c.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(D.container,420,380,!0,!0),
+D.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),D)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(u.getMode()==App.MODE_GOOGLE||u.getMode()==App.MODE_ONEDRIVE){var D=!1;if(u.getMode()==App.MODE_GOOGLE&&null!=u.desc.parents)for(var B=0;B<u.desc.parents.length;B++)if(u.desc.parents[B].isRoot){D=!0;break}c.pickFolder(u.getMode(),mxUtils.bind(this,function(C){c.spinner.spin(document.body,mxResources.get("moving"))&&u.move(C,mxUtils.bind(this,
+function(G){c.spinner.stop()}),mxUtils.bind(this,function(G){c.handleError(G)}))}),null,!0,D)}}));this.put("publish",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,["publishLink"],D)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
+function(){try{var u=c.getCurrentFile();null!=u&&u.share()}catch(D){c.handleError(D)}}));this.put("embed",new Menu(mxUtils.bind(this,function(u,D){var B=c.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(u,["liveImage","-"],D);this.addMenuItems(u,["embedImage","embedSvg","-","embedHtml"],D);navigator.standalone||c.isOffline()||this.addMenuItems(u,["embedIframe"],D);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(u,
+"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),D)})));c.addInsertItem=function(u,D,B,C){("plantUml"!=C||EditorUi.enablePlantUml&&!c.isOffline())&&u.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var G=new ParseDialog(c,B,C);c.showDialog(G.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(c,B,C),c.showDialog(G.container,620,420,!0,!1);G.init()}),D,null,n())};
+var A=function(u,D,B,C){var G=new mxCell(u,new mxGeometry(0,0,D,B),C);G.vertex=!0;u=m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([G],!0));G.geometry.x=u.x;G.geometry.y=u.y;m.getModel().beginUpdate();try{G=m.addCell(G),m.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{m.getModel().endUpdate()}m.scrollCellToVisible(G);m.setSelectionCell(G);m.container.focus();m.editAfterInsert&&m.startEditing(G);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(m.view.getState(G))},
+0);return G};c.actions.put("insertText",new Action(mxResources.get("text"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&m.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",120,60,
+"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=n;c.addInsertMenuItems=
+mxUtils.bind(this,function(u,D,B){for(var C=0;C<B.length;C++)"-"==B[C]?u.addSeparator(D):c.addInsertItem(u,D,mxResources.get(B[C])+"...",B[C])});this.put("insert",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),D);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(u,["insertTemplate"],D);u.addSeparator(D);this.addSubmenu("insertLayout",u,D,mxResources.get("layout"));
+this.addSubmenu("insertAdvanced",u,D,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,D){c.addInsertMenuItems(u,D,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(u,D){c.addInsertMenuItems(u,D,["fromText","plantUml","mermaid","-","formatSql"]);u.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},D,null,n())})));
+this.put("openRecent",new Menu(function(u,D){var B=c.getRecent();if(null!=B){for(var C=0;C<B.length;C++)(function(G){var N=G.mode;N==App.MODE_GOOGLE?N="googleDrive":N==App.MODE_ONEDRIVE&&(N="oneDrive");u.addItem(G.title+" ("+mxResources.get(N)+")",null,function(){c.loadFile(G.id)},D)})(B[C]);u.addSeparator(D)}u.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},D)}));this.put("openFrom",new Menu(function(u,D){null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},
+D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},
+D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},D);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},D):k&&"function"===
+typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,
+"",mxResources.get("open"),function(C){null!=C&&0<C.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(C):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(C)))},mxResources.get("url"));c.showDialog(B.container,300,80,!0,!0);B.init()},D))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(u,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
+c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
+D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},D);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},D):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+
+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},D)})),this.put("openLibraryFrom",new Menu(function(u,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},D);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},D):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,"",mxResources.get("open"),function(C){if(null!=C&&0<C.length&&c.spinner.spin(document.body,
+mxResources.get("loading"))){var G=C;c.editor.isCorsEnabledForUrl(C)||(G=PROXY_URL+"?url="+encodeURIComponent(C));mxUtils.get(G,function(N){if(200<=N.getStatus()&&299>=N.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,N.getText(),C))}catch(I){c.handleError(I,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
+c.showDialog(B.container,300,80,!0,!0);B.init()},D));"1"==urlParams.confLib&&(u.addSeparator(D),u.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},D))})));this.put("edit",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+l=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var u=!this.commentsWindow.window.isVisible();
+this.commentsWindow.window.setVisible(u);this.commentsWindow.refreshCommentsTime();u&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));l=this.get("viewPanels");var K=l.funct;l.funct=
+function(u,D){K.apply(this,arguments);c.menus.addMenuItems(u,["tags"],D);c.commentsSupported()&&c.menus.addMenuItems(u,["comments"],D)};this.put("view",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(u,["-","search"],D);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=this.addMenuItem(u,"scratchpad",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(u,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",u,D);this.addMenuItems(u,"- scrollbars tooltips ruler - grid guides".split(" "),D);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(u,"shadowVisible",D);this.addMenuItems(u,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),D);"1"!=urlParams.sketch&&this.addMenuItems(u,
+["-","fullscreen"],D)})));if(EditorUi.isElectronApp){var P="1"==urlParams.enableSpellCheck;l=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();P=!P;c.alert(mxResources.get("restartForChangeRequired"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return P});var L="1"==urlParams.enableStoreBkp;l=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();L=!L});l.setToggleAction(!0);l.setSelectedCallback(function(){return L});c.actions.addAction("openDevTools",function(){c.openDevTools()})}this.put("extras",
+new Menu(mxUtils.bind(this,function(u,D){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",u,D),u.addSeparator(D));"1"!=urlParams.embed&&(this.addSubmenu("theme",u,D),u.addSeparator(D));if("undefined"!==typeof MathJax){var B=this.addMenuItem(u,"mathematicalTypesetting",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(u,["spellCheck","autoBkp"],D);this.addMenuItems(u,
+["copyConnect","collapseExpand","-"],D);"1"!=urlParams.embed&&(B=c.getCurrentFile(),null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(u,["showRemoteCursors","shareCursor"],D),this.addMenuItems(u,["autosave"],D));u.addSeparator(D);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(u,"plugins",D);this.addMenuItems(u,["-","editDiagram"],D);Graph.translateDiagram&&this.addMenuItems(u,["diagramLanguage"]);u.addSeparator(D);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&
+this.addMenuItems(u,["showStartScreen"],D);this.addMenuItems(u,["configuration"],D);EditorUi.isElectronApp&&this.addMenuItems(u,["openDevTools"],D);u.addSeparator(D);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function C(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var G=new TemplatesDialog(c,function(N){console.log(arguments)},null,null,null,"user",function(N,I,F){var H=
+new Date;H.setDate(H.getDate()-7);c.drive.listFiles(null,H,F?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));N(W)},I)},function(N,I,F,H){c.drive.listFiles(N,null,H?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));I(W)},F)},function(N,I,F){c.drive.getFile(N.id,function(H){I(H.data)},F)},null,function(N){N({Test:[]},1)},!0,!1);c.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(u,"templates",D))})));
+this.put("file",new Menu(mxUtils.bind(this,function(u,D){if("1"==urlParams.embed)this.addSubmenu("importFrom",u,D),this.addSubmenu("exportAs",u,D),this.addSubmenu("embed",u,D),"1"==urlParams.libraries&&(this.addMenuItems(u,["-"],D),this.addSubmenu("newLibrary",u,D),this.addSubmenu("openLibraryFrom",u,D)),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],D),this.addMenuItems(u,["-","pageSetup","print","-","rename"],D),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?
+"0"!=urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],D):(this.addMenuItems(u,["save"],D),"1"==urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],D))),"1"!=urlParams.noExitBtn&&this.addMenuItems(u,["exit"],D);else{var B=this.editorUi.getCurrentFile();if(null!=B&&B.constructor==DriveFile){B.isRestricted()&&this.addMenuItems(u,["exportOptionsDisabled"],D);this.addMenuItems(u,["save","-","share"],D);var C=this.addMenuItem(u,"synchronize",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
+this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize");u.addSeparator(D)}else this.addMenuItems(u,["new"],D);this.addSubmenu("openFrom",u,D);isLocalStorage&&this.addSubmenu("openRecent",u,D);null!=B&&B.constructor==DriveFile?this.addMenuItems(u,["new","-","rename","makeCopy","moveToFolder"],D):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(u.addSeparator(D),C=this.addMenuItem(u,"synchronize",D),(!c.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(u,["-","save","saveAs","-"],D),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(u,["share","-"],D),this.addMenuItems(u,["rename"],D),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],D):(this.addMenuItems(u,["makeCopy"],D),null!=B&&B.constructor==OneDriveFile&&
+this.addMenuItems(u,["moveToFolder"],D)));u.addSeparator(D);this.addSubmenu("importFrom",u,D);this.addSubmenu("exportAs",u,D);u.addSeparator(D);this.addSubmenu("embed",u,D);this.addSubmenu("publish",u,D);u.addSeparator(D);this.addSubmenu("newLibrary",u,D);this.addSubmenu("openLibraryFrom",u,D);c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],D);null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&
+null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C))&&this.addMenuItems(u,["-","properties"]));this.addMenuItems(u,["-","pageSetup"],D);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["print"],D);this.addMenuItems(u,["-","close"])}})));f.prototype.execute=function(){var u=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));
+this.extFonts=this.previousExtFonts;for(var D=u.extFonts,B=0;null!=D&&B<D.length;B++){var C=document.getElementById("extFont_"+D[B].name);null!=C&&C.parentNode.removeChild(C)}u.extFonts=[];for(B=0;null!=this.previousExtFonts&&B<this.previousExtFonts.length;B++)this.ui.editor.graph.addExtFont(this.previousExtFonts[B].name,this.previousExtFonts[B].url);this.previousExtFonts=D};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,D){for(var B=mxUtils.bind(this,function(J,V,U,X,t){var E=c.editor.graph;
+X=this.styleChange(u,X||J,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],null,D,function(){"1"!=urlParams["ext-fonts"]?E.setFont(J,V):(document.execCommand("fontname",!1,J),E.addExtFont(J,V));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values",
+"1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],"cells",[E.cellEditor.getEditingCell()]))},function(){E.updateLabelElements(E.getSelectionCells(),function(M){M.removeAttribute("face");M.style.fontFamily=null;"PRE"==M.nodeName&&E.replaceElement(M,"div")});"1"==urlParams["ext-fonts"]&&E.addExtFont(J,V)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",X.firstChild.nextSibling.nextSibling.appendChild(U),
+mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(M){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[J.toLowerCase()];for(var T=0;T<this.customFonts.length;T++)if(this.customFonts[T].name==J&&this.customFonts[T].url==V){this.customFonts.splice(T,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var O=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=O&&0<O.length)for(T=0;T<O.length;T++)if(O[T].name==J){O.splice(T,
+1);break}var Q=mxUtils.clone(this.customFonts);for(T=0;T<Q.length;T++)if(Q[T].name==J){Q.splice(T,1);break}T=new f(this.editorUi,O,Q);this.editorUi.editor.graph.model.execute(T)}this.editorUi.hideCurrentMenu();mxEvent.consume(M)})));Graph.addFont(J,V);X.firstChild.nextSibling.style.fontFamily=J;null!=t&&X.setAttribute("title",t)}),C={},G=0;G<this.defaultFonts.length;G++){var N=this.defaultFonts[G];"string"===typeof N?B(N):null!=N.fontFamily&&null!=N.fontUrl&&(C[encodeURIComponent(N.fontFamily)+"@"+
+encodeURIComponent(N.fontUrl)]=!0,B(N.fontFamily,N.fontUrl))}u.addSeparator(D);if("1"!=urlParams["ext-fonts"]){N=function(J){var V=encodeURIComponent(J.name)+(null==J.url?"":"@"+encodeURIComponent(J.url));if(!C[V]){for(var U=J.name,X=0;null!=F[U.toLowerCase()];)U=J.name+" ("+ ++X+")";null==I[V]&&(H.push({name:J.name,url:J.url,label:U,title:J.url}),F[U.toLowerCase()]=J,I[V]=J)}};var I={},F={},H=[];for(G=0;G<this.customFonts.length;G++)N(this.customFonts[G]);for(var R in Graph.recentCustomFonts)N(Graph.recentCustomFonts[R]);
+H.sort(function(J,V){return J.label<V.label?-1:J.label>V.label?1:0});if(0<H.length){for(G=0;G<H.length;G++)B(H[G].name,H[G].url,!0,H[G].label,H[G].url);u.addSeparator(D)}u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),D);u.addSeparator(D)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){N={};var W=!1;for(G=0;G<this.customFonts.length;G++)N[this.customFonts[G].name]=
+!0;for(G=0;G<R.length;G++)N[R[G].name]||(this.customFonts.push(R[G]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=0;G<this.customFonts.length;G++)R=this.customFonts[G].name,N=this.customFonts[G].url,B(R,N,!0),this.editorUi.editor.graph.addExtFont(R,N,!0);u.addSeparator(D);u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var J=new f(this.editorUi,[],[]);c.editor.graph.model.execute(J)}),
+D);u.addSeparator(D)}}u.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var J=this.editorUi.editor.graph,V=J.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",X=null;if("1"!=urlParams["ext-fonts"]&&J.isEditing()){var t=J.getSelectedEditingElement();null!=t&&(t=mxUtils.getCurrentStyle(t),null!=t&&(V=Graph.stripQuotes(t.fontFamily),X=Graph.getFontUrl(V,null),null!=X&&(Graph.isGoogleFontUrl(X)?(X=null,U="g"):U="w")))}else t=J.getView().getState(J.getSelectionCell()),
+null!=t&&(V=t.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(t=t.style.fontSource,null!=t&&(t=decodeURIComponent(t),Graph.isGoogleFontUrl(t)?U="g":(U="w",X=t))):(U=t.style.FType||U,"w"==U&&(X=this.editorUi.editor.graph.extFonts,t=null,null!=X&&(t=X.find(function(M){return M.name==V})),X=null!=t?t.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=X&&X.substring(0,PROXY_URL.length)==PROXY_URL&&(X=decodeURIComponent(X.substr((PROXY_URL+"?url=").length)));var E=null;
+document.activeElement==J.cellEditor.textarea&&(E=J.cellEditor.saveSelection());U=new FontDialog(this.editorUi,V,X,U,mxUtils.bind(this,function(M,T,O){null!=E&&(J.cellEditor.restoreSelection(E),E=null);if(null!=M&&0<M.length)if("1"!=urlParams["ext-fonts"]&&J.isEditing())J.setFont(M,T);else{J.getModel().beginUpdate();try{J.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,M),J.setCellStyles("fontSource",null!=T?encodeURIComponent(T):null),J.setCellStyles("FType",
+null)):(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,M),"s"!=O&&(J.setCellStyles("FType",O),0==T.indexOf("http://")&&(T=PROXY_URL+"?url="+encodeURIComponent(T)),this.editorUi.editor.graph.addExtFont(M,T)));O=!0;for(var Q=0;Q<this.customFonts.length;Q++)if(this.customFonts[Q].name==M){O=!1;break}O&&(this.customFonts.push({name:M,url:T}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{J.getModel().endUpdate()}}}));this.editorUi.showDialog(U.container,
+380,Editor.enableWebFonts?250:180,!0,!0);U.init()}),D,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,f){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=f&&(e.viewState=f,this.neverShown=!1))}
@@ -13012,7 +13014,7 @@ EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.s
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(f){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(f))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(f){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(f)})));return e};
EditorUi.prototype.createControlTab=function(b,e,f){f=this.createTab(null!=f?f:!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=b+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=e;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.marginTop="5px";f.style.width="21px";f.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
-var m=new mxPopupMenu(mxUtils.bind(this,function(d,g){var k=mxUtils.bind(this,function(){for(var x=0;x<this.pages.length;x++)mxUtils.bind(this,function(y){var A=d.addItem(this.pages[y].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[y])}),g),B=this.pages[y].getId();A.setAttribute("title",this.pages[y].getName()+" ("+(y+1)+"/"+this.pages.length+")"+(null!=B?" ["+B+"]":""));this.pages[y]==this.currentPage&&d.addCheckmark(A,Editor.checkmarkImage)})(x)}),l=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
+var m=new mxPopupMenu(mxUtils.bind(this,function(d,g){var k=mxUtils.bind(this,function(){for(var x=0;x<this.pages.length;x++)mxUtils.bind(this,function(y){var z=d.addItem(this.pages[y].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[y])}),g),A=this.pages[y].getId();z.setAttribute("title",this.pages[y].getName()+" ("+(y+1)+"/"+this.pages.length+")"+(null!=A?" ["+A+"]":""));this.pages[y]==this.currentPage&&d.addCheckmark(z,Editor.checkmarkImage)})(x)}),l=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
null,mxUtils.bind(this,function(){this.insertPage()}),g)});e||k();if(this.editor.graph.isEnabled()){e||(d.addSeparator(g),l());var p=this.currentPage;if(null!=p){d.addSeparator(g);var q=p.getName();d.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(p)}),g);d.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(p,p.getName())}),g);e||d.addSeparator(g);d.addItem(mxResources.get("duplicateIt",[q]),null,mxUtils.bind(this,function(){this.duplicatePage(p,
mxResources.get("copyOf",[p.getName()]))}),g)}}e&&(d.addSeparator(g),l(),d.addSeparator(g),k())}));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var n=mxEvent.getClientX(c),v=mxEvent.getClientY(c);m.popup(n,v,null,c);this.setCurrentMenu(m);mxEvent.consume(c)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.insertPage();mxEvent.consume(f)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
@@ -13030,35 +13032,35 @@ g=new EmbedDialog(this,this.getLinkForPage(b,n,g));this.showDialog(g.container,4
c));return c};b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var m=f.ownerDocument.createElement("diagram");m.setAttribute("id",f.getAttribute("relatedPage"));m.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(m);m=f.getAttribute("viewState");null!=m&&(c.relatedPage.viewState=JSON.parse(m),f.removeAttribute("viewState"));f=f.cloneNode(!0);m=f.firstChild;if(null!=m)for(c.relatedPage.root=e.decodeCell(m,
!1),c=m.nextSibling,m.parentNode.removeChild(m),m=c;null!=m;){c=m.nextSibling;if(m.nodeType==mxConstants.NODETYPE_ELEMENT){var n=m.getAttribute("id");null==e.lookup(n)&&e.decodeCell(m)}m.parentNode.removeChild(m);m=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,m,n,v,d){m=null!=m?m:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var g=n.slice(),k=0;k<n.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[k]),"treeFolding","0")&&this.foldTreeCell(c,n[k]);n=g;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
function(c,m){this.model.beginUpdate();try{var n=[];this.traverse(m,!0,mxUtils.bind(this,function(d,g){var k=null!=g&&this.isTreeEdge(g);k&&n.push(g);d==m||null!=g&&!k||n.push(d);return(null==g||k)&&(d==m||!this.model.isCollapsed(d))}));this.model.setCollapsed(m,c);for(var v=0;v<n.length;v++)this.model.setVisible(n[v],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,m,n,v,d,g){return this.model.filterCells(this.getEdges(c,
-m,n,v,d,g),mxUtils.bind(this,function(k){return this.isTreeEdge(k)}))};Graph.prototype.getIncomingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return A.isVertex(H)&&n(H)}function m(H){var S=
-!1;null!=H&&(S="1"==y.getCurrentCellStyle(H).treeMoving);return S}function n(H){var S=!1;null!=H&&(H=A.getParent(H),S=y.view.getState(H),S="tree"==(null!=S?S.style:y.getCellStyle(H)).containerType);return S}function v(H){var S=!1;null!=H&&(H=A.getParent(H),S=y.view.getState(H),y.view.getState(H),S=null!=(null!=S?S.style:y.getCellStyle(H)).childLayout);return S}function d(H){H=y.view.getState(H);if(null!=H){var S=y.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=y.view.getState(S[0]),null!=S&&(S=S.absolutePoints,
-null!=S&&0<S.length&&(S=S[S.length-1],null!=S)))){if(S.y==H.y&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(S.y==H.y+H.height&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(S.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(H,S){S=null!=S?S:!0;y.model.beginUpdate();try{var V=y.model.getParent(H),M=y.getIncomingTreeEdges(H),W=y.cloneCells([M[0],H]);y.model.setTerminal(W[0],y.model.getTerminal(M[0],
-!0),!0);var U=d(H),X=V.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=S?H.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=S?H.geometry.height+10:-W[1].geometry.height-10;y.view.currentRoot!=V&&(W[1].geometry.x-=X.x,W[1].geometry.y-=X.y);var u=y.view.getState(H),D=y.view.scale;if(null!=u){var K=mxRectangle.fromRectangle(u);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?K.x+=(S?H.geometry.width+10:-W[1].geometry.width-10)*D:K.y+=(S?
-H.geometry.height+10:-W[1].geometry.height-10)*D;var T=y.getOutgoingTreeEdges(y.model.getTerminal(M[0],!0));if(null!=T){for(var N=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,Q=X=M=0;Q<T.length;Q++){var R=y.model.getTerminal(T[Q],!1);if(U==d(R)){var Y=y.view.getState(R);R!=H&&null!=Y&&(N&&S!=Y.getCenterX()<u.getCenterX()||!N&&S!=Y.getCenterY()<u.getCenterY())&&mxUtils.intersects(K,Y)&&(M=10+Math.max(M,(Math.min(K.x+K.width,Y.x+Y.width)-Math.max(K.x,Y.x))/D),X=10+Math.max(X,(Math.min(K.y+
-K.height,Y.y+Y.height)-Math.max(K.y,Y.y))/D))}}N?X=0:M=0;for(Q=0;Q<T.length;Q++)if(R=y.model.getTerminal(T[Q],!1),U==d(R)&&(Y=y.view.getState(R),R!=H&&null!=Y&&(N&&S!=Y.getCenterX()<u.getCenterX()||!N&&S!=Y.getCenterY()<u.getCenterY()))){var ba=[];y.traverse(Y.cell,!0,function(ea,Z){var fa=null!=Z&&y.isTreeEdge(Z);fa&&ba.push(Z);(null==Z||fa)&&ba.push(ea);return null==Z||fa});y.moveCells(ba,(S?1:-1)*M,(S?1:-1)*X)}}}return y.addCells(W,V)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate();
-try{var S=d(H),V=y.getIncomingTreeEdges(H),M=y.cloneCells([V[0],H]);y.model.setTerminal(V[0],M[1],!1);y.model.setTerminal(M[0],M[1],!0);y.model.setTerminal(M[0],H,!1);var W=y.model.getParent(H),U=W.geometry,X=[];y.view.currentRoot!=W&&(M[1].geometry.x-=U.x,M[1].geometry.y-=U.y);y.traverse(H,!0,function(K,T){var N=null!=T&&y.isTreeEdge(T);N&&X.push(T);(null==T||N)&&X.push(K);return null==T||N});var u=H.geometry.width+40,D=H.geometry.height+40;S==mxConstants.DIRECTION_SOUTH?u=0:S==mxConstants.DIRECTION_NORTH?
-(u=0,D=-D):S==mxConstants.DIRECTION_WEST?(u=-u,D=0):S==mxConstants.DIRECTION_EAST&&(D=0);y.moveCells(X,u,D);return y.addCells(M,W)}finally{y.model.endUpdate()}}function l(H,S){y.model.beginUpdate();try{var V=y.model.getParent(H),M=y.getIncomingTreeEdges(H),W=d(H);0==M.length&&(M=[y.createEdge(V,null,"",null,null,y.createCurrentEdgeStyle())],W=S);var U=y.cloneCells([M[0],H]);y.model.setTerminal(U[0],H,!0);if(null==y.model.getTerminal(U[0],!1)){y.model.setTerminal(U[0],U[1],!1);var X=y.getCellStyle(U[1]).newEdgeStyle;
-if(null!=X)try{var u=JSON.parse(X),D;for(D in u)y.setCellStyles(D,u[D],[U[0]]),"edgeStyle"==D&&"elbowEdgeStyle"==u[D]&&y.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}M=y.getOutgoingTreeEdges(H);var K=V.geometry;S=[];y.view.currentRoot==V&&(K=new mxRectangle);for(X=0;X<M.length;X++){var T=y.model.getTerminal(M[X],!1);null!=T&&S.push(T)}var N=y.view.getBounds(S),Q=y.view.translate,R=y.view.scale;W==mxConstants.DIRECTION_SOUTH?
-(U[1].geometry.x=null==N?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(N.x+N.width)/R-Q.x-K.x+10,U[1].geometry.y+=U[1].geometry.height-K.y+40):W==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==N?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(N.x+N.width)/R-Q.x+-K.x+10,U[1].geometry.y-=U[1].geometry.height+K.y+40):(U[1].geometry.x=W==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+K.x+40):U[1].geometry.x+(U[1].geometry.width-K.x+40),U[1].geometry.y=null==N?H.geometry.y+
-(H.geometry.height-U[1].geometry.height)/2:(N.y+N.height)/R-Q.y+-K.y+10);return y.addCells(U,V)}finally{y.model.endUpdate()}}function p(H,S,V){H=y.getOutgoingTreeEdges(H);V=y.view.getState(V);var M=[];if(null!=V&&null!=H){for(var W=0;W<H.length;W++){var U=y.view.getState(y.model.getTerminal(H[W],!1));null!=U&&(!S&&Math.min(U.x+U.width,V.x+V.width)>=Math.max(U.x,V.x)||S&&Math.min(U.y+U.height,V.y+V.height)>=Math.max(U.y,V.y))&&M.push(U)}M.sort(function(X,u){return S?X.x+X.width-u.x-u.width:X.y+X.height-
-u.y-u.height})}return M}function q(H,S){var V=d(H),M=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==M&&V!=S?x.actions.get("selectParent").funct():V==S?(S=y.getOutgoingTreeEdges(H),null!=S&&0<S.length&&y.setSelectionCell(y.model.getTerminal(S[0],!1))):(V=y.getIncomingTreeEdges(H),null!=V&&0<V.length&&(M=p(y.model.getTerminal(V[0],!0),M,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(M,H),0<=H&&(H+=S==mxConstants.DIRECTION_NORTH||
-S==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=M.length-1&&y.setSelectionCell(M[H].cell)))))}var x=this,y=x.editor.graph,A=y.getModel(),B=x.menus.createPopupMenu;x.menus.createPopupMenu=function(H,S,V){B.apply(this,arguments);if(1==y.getSelectionCount()){S=y.getSelectionCell();var M=y.getOutgoingTreeEdges(S);H.addSeparator();0<M.length&&(c(y.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,V),this.addMenuItems(H,["selectDescendants"],null,V));c(y.getSelectionCell())?(H.addSeparator(),
-0<y.getIncomingTreeEdges(S).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,V)):0<y.model.getEdgeCount(S)&&this.addMenuItems(H,["selectConnections"],null,V)}};x.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getOutgoingTreeEdges(H);if(null!=H){for(var S=[],V=0;V<H.length;V++)S.push(y.model.getTerminal(H[V],!1));y.setSelectionCells(S)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
-1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=y.getOutgoingTreeEdges(y.model.getTerminal(H[0],!0)),null!=H)){for(var S=[],V=0;V<H.length;V++)S.push(y.model.getTerminal(H[V],!1));y.setSelectionCells(S)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);null!=H&&0<H.length&&y.setSelectionCell(y.model.getTerminal(H[0],
-!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(H,S){H=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(H)){if(null!=S&&mxEvent.isAltDown(S))y.setSelectionCells(y.model.getTreeEdges(H,null==S||!mxEvent.isShiftDown(S),null==S||!mxEvent.isControlDown(S)));else{var V=[];y.traverse(H,!0,function(M,W){var U=null!=W&&y.isTreeEdge(W);U&&V.push(W);null!=W&&!U||null!=S&&mxEvent.isShiftDown(S)||V.push(M);return null==W||U})}y.setSelectionCells(V)}},null,null,"Alt+Shift+D");
-var I=y.removeCells;y.removeCells=function(H,S){S=null!=S?S:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));S&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var V=[],M=0;M<H.length;M++){var W=H[M];A.isEdge(W)&&n(W)&&(V.push(W),W=A.getTerminal(W,!1));if(c(W)){var U=[];y.traverse(W,!0,function(X,u){var D=null!=u&&y.isTreeEdge(u);D&&U.push(u);(null==u||D)&&U.push(X);return null==u||D});0<U.length&&(V=V.concat(U),W=y.getIncomingTreeEdges(H[M]),H=H.concat(W))}else null!=W&&V.push(H[M])}H=
-V;return I.apply(this,arguments)};x.hoverIcons.getStateAt=function(H,S,V){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(S,V))};var O=y.duplicateCells;y.duplicateCells=function(H,S){H=null!=H?H:this.getSelectionCells();for(var V=H.slice(0),M=0;M<V.length;M++){var W=y.view.getState(V[M]);if(null!=W&&c(W.cell)){var U=y.getIncomingTreeEdges(W.cell);for(W=0;W<U.length;W++)mxUtils.remove(U[W],H)}}this.model.beginUpdate();try{var X=O.call(this,H,S);if(X.length==H.length)for(M=0;M<H.length;M++)if(c(H[M])){var u=
-y.getIncomingTreeEdges(X[M]);U=y.getIncomingTreeEdges(H[M]);if(0==u.length&&0<U.length){var D=this.cloneCell(U[0]);this.addEdge(D,y.getDefaultParent(),this.model.getTerminal(U[0],!0),X[M])}}}finally{this.model.endUpdate()}return X};var t=y.moveCells;y.moveCells=function(H,S,V,M,W,U,X){var u=null;this.model.beginUpdate();try{var D=W,K=this.getCurrentCellStyle(W);if(null!=H&&c(W)&&"1"==mxUtils.getValue(K,"treeFolding","0")){for(var T=0;T<H.length;T++)if(c(H[T])||y.model.isEdge(H[T])&&null==y.model.getTerminal(H[T],
-!0)){W=y.model.getParent(H[T]);break}if(null!=D&&W!=D&&null!=this.view.getState(H[0])){var N=y.getIncomingTreeEdges(H[0]);if(0<N.length){var Q=y.view.getState(y.model.getTerminal(N[0],!0));if(null!=Q){var R=y.view.getState(D);null!=R&&(S=(R.getCenterX()-Q.getCenterX())/y.view.scale,V=(R.getCenterY()-Q.getCenterY())/y.view.scale)}}}}u=t.apply(this,arguments);if(null!=u&&null!=H&&u.length==H.length)for(T=0;T<u.length;T++)if(this.model.isEdge(u[T]))c(D)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[T],
-!0))&&this.model.setTerminal(u[T],D,!0);else if(c(H[T])&&(N=y.getIncomingTreeEdges(H[T]),0<N.length))if(!M)c(D)&&0>mxUtils.indexOf(H,this.model.getTerminal(N[0],!0))&&this.model.setTerminal(N[0],D,!0);else if(0==y.getIncomingTreeEdges(u[T]).length){K=D;if(null==K||K==y.model.getParent(H[T]))K=y.model.getTerminal(N[0],!0);M=this.cloneCell(N[0]);this.addEdge(M,y.getDefaultParent(),K,u[T])}}finally{this.model.endUpdate()}return u};if(null!=x.sidebar){var z=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
-function(H,S,V,M){var W=y.model,U=null;W.beginUpdate();try{if(U=z.apply(this,arguments),c(H))for(var X=0;X<U.length;X++)if(W.isEdge(U[X])&&null==W.getTerminal(U[X],!0)){W.setTerminal(U[X],H,!0);var u=y.getCellGeometry(U[X]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return U}}var L={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},C=x.onKeyDown;x.onKeyDown=function(H){try{if(y.isEnabled()&&
-!y.isEditing()&&c(y.getSelectionCell())&&1==y.getSelectionCount()){var S=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==H.which?S=mxEvent.isShiftDown(H)?k(y.getSelectionCell()):l(y.getSelectionCell()):13==H.which&&(S=g(y.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=S&&0<S.length)1==S.length&&y.model.isEdge(S[0])?y.setSelectionCell(y.model.getTerminal(S[0],!1)):y.setSelectionCell(S[S.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(y.view.getState(y.getSelectionCell())),
-y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var V=L[H.keyCode];null!=V&&(V.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(H))}}catch(M){x.handleError(M)}mxEvent.isConsumed(H)||C.apply(this,arguments)};var E=y.connectVertex;y.connectVertex=function(H,S,V,M,W,U,X){var u=y.getIncomingTreeEdges(H);if(c(H)){var D=d(H),K=D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return D==S||0==u.length?l(H,S):K==T?k(H):g(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return E.apply(this,arguments)};y.getSubtree=function(H){var S=
-[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(V,M){var W=null!=M&&y.isTreeEdge(M);W&&0>mxUtils.indexOf(S,M)&&S.push(M);(null==M||W)&&0>mxUtils.indexOf(S,V)&&S.push(V);return null==M||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+m,n,v,d,g),mxUtils.bind(this,function(k){return this.isTreeEdge(k)}))};Graph.prototype.getIncomingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return z.isVertex(H)&&n(H)}function m(H){var R=
+!1;null!=H&&(R="1"==y.getCurrentCellStyle(H).treeMoving);return R}function n(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),R="tree"==(null!=R?R.style:y.getCellStyle(H)).containerType);return R}function v(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),y.view.getState(H),R=null!=(null!=R?R.style:y.getCellStyle(H)).childLayout);return R}function d(H){H=y.view.getState(H);if(null!=H){var R=y.getIncomingTreeEdges(H.cell);if(0<R.length&&(R=y.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
+null!=R&&0<R.length&&(R=R[R.length-1],null!=R)))){if(R.y==H.y&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==H.y+H.height&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(H,R){R=null!=R?R:!0;y.model.beginUpdate();try{var W=y.model.getParent(H),J=y.getIncomingTreeEdges(H),V=y.cloneCells([J[0],H]);y.model.setTerminal(V[0],y.model.getTerminal(J[0],
+!0),!0);var U=d(H),X=W.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=R?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=R?H.geometry.height+10:-V[1].geometry.height-10;y.view.currentRoot!=W&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);var t=y.view.getState(H),E=y.view.scale;if(null!=t){var M=mxRectangle.fromRectangle(t);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?M.x+=(R?H.geometry.width+10:-V[1].geometry.width-10)*E:M.y+=(R?
+H.geometry.height+10:-V[1].geometry.height-10)*E;var T=y.getOutgoingTreeEdges(y.model.getTerminal(J[0],!0));if(null!=T){for(var O=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,Q=X=J=0;Q<T.length;Q++){var S=y.model.getTerminal(T[Q],!1);if(U==d(S)){var Y=y.view.getState(S);S!=H&&null!=Y&&(O&&R!=Y.getCenterX()<t.getCenterX()||!O&&R!=Y.getCenterY()<t.getCenterY())&&mxUtils.intersects(M,Y)&&(J=10+Math.max(J,(Math.min(M.x+M.width,Y.x+Y.width)-Math.max(M.x,Y.x))/E),X=10+Math.max(X,(Math.min(M.y+
+M.height,Y.y+Y.height)-Math.max(M.y,Y.y))/E))}}O?X=0:J=0;for(Q=0;Q<T.length;Q++)if(S=y.model.getTerminal(T[Q],!1),U==d(S)&&(Y=y.view.getState(S),S!=H&&null!=Y&&(O&&R!=Y.getCenterX()<t.getCenterX()||!O&&R!=Y.getCenterY()<t.getCenterY()))){var ba=[];y.traverse(Y.cell,!0,function(ea,Z){var fa=null!=Z&&y.isTreeEdge(Z);fa&&ba.push(Z);(null==Z||fa)&&ba.push(ea);return null==Z||fa});y.moveCells(ba,(R?1:-1)*J,(R?1:-1)*X)}}}return y.addCells(V,W)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate();
+try{var R=d(H),W=y.getIncomingTreeEdges(H),J=y.cloneCells([W[0],H]);y.model.setTerminal(W[0],J[1],!1);y.model.setTerminal(J[0],J[1],!0);y.model.setTerminal(J[0],H,!1);var V=y.model.getParent(H),U=V.geometry,X=[];y.view.currentRoot!=V&&(J[1].geometry.x-=U.x,J[1].geometry.y-=U.y);y.traverse(H,!0,function(M,T){var O=null!=T&&y.isTreeEdge(T);O&&X.push(T);(null==T||O)&&X.push(M);return null==T||O});var t=H.geometry.width+40,E=H.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?t=0:R==mxConstants.DIRECTION_NORTH?
+(t=0,E=-E):R==mxConstants.DIRECTION_WEST?(t=-t,E=0):R==mxConstants.DIRECTION_EAST&&(E=0);y.moveCells(X,t,E);return y.addCells(J,V)}finally{y.model.endUpdate()}}function l(H,R){y.model.beginUpdate();try{var W=y.model.getParent(H),J=y.getIncomingTreeEdges(H),V=d(H);0==J.length&&(J=[y.createEdge(W,null,"",null,null,y.createCurrentEdgeStyle())],V=R);var U=y.cloneCells([J[0],H]);y.model.setTerminal(U[0],H,!0);if(null==y.model.getTerminal(U[0],!1)){y.model.setTerminal(U[0],U[1],!1);var X=y.getCellStyle(U[1]).newEdgeStyle;
+if(null!=X)try{var t=JSON.parse(X),E;for(E in t)y.setCellStyles(E,t[E],[U[0]]),"edgeStyle"==E&&"elbowEdgeStyle"==t[E]&&y.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}J=y.getOutgoingTreeEdges(H);var M=W.geometry;R=[];y.view.currentRoot==W&&(M=new mxRectangle);for(X=0;X<J.length;X++){var T=y.model.getTerminal(J[X],!1);null!=T&&R.push(T)}var O=y.view.getBounds(R),Q=y.view.translate,S=y.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(U[1].geometry.x=null==O?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(O.x+O.width)/S-Q.x-M.x+10,U[1].geometry.y+=U[1].geometry.height-M.y+40):V==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==O?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(O.x+O.width)/S-Q.x+-M.x+10,U[1].geometry.y-=U[1].geometry.height+M.y+40):(U[1].geometry.x=V==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+M.x+40):U[1].geometry.x+(U[1].geometry.width-M.x+40),U[1].geometry.y=null==O?H.geometry.y+
+(H.geometry.height-U[1].geometry.height)/2:(O.y+O.height)/S-Q.y+-M.y+10);return y.addCells(U,W)}finally{y.model.endUpdate()}}function p(H,R,W){H=y.getOutgoingTreeEdges(H);W=y.view.getState(W);var J=[];if(null!=W&&null!=H){for(var V=0;V<H.length;V++){var U=y.view.getState(y.model.getTerminal(H[V],!1));null!=U&&(!R&&Math.min(U.x+U.width,W.x+W.width)>=Math.max(U.x,W.x)||R&&Math.min(U.y+U.height,W.y+W.height)>=Math.max(U.y,W.y))&&J.push(U)}J.sort(function(X,t){return R?X.x+X.width-t.x-t.width:X.y+X.height-
+t.y-t.height})}return J}function q(H,R){var W=d(H),J=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST)==J&&W!=R?x.actions.get("selectParent").funct():W==R?(R=y.getOutgoingTreeEdges(H),null!=R&&0<R.length&&y.setSelectionCell(y.model.getTerminal(R[0],!1))):(W=y.getIncomingTreeEdges(H),null!=W&&0<W.length&&(J=p(y.model.getTerminal(W[0],!0),J,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(J,H),0<=H&&(H+=R==mxConstants.DIRECTION_NORTH||
+R==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=J.length-1&&y.setSelectionCell(J[H].cell)))))}var x=this,y=x.editor.graph,z=y.getModel(),A=x.menus.createPopupMenu;x.menus.createPopupMenu=function(H,R,W){A.apply(this,arguments);if(1==y.getSelectionCount()){R=y.getSelectionCell();var J=y.getOutgoingTreeEdges(R);H.addSeparator();0<J.length&&(c(y.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,W),this.addMenuItems(H,["selectDescendants"],null,W));c(y.getSelectionCell())?(H.addSeparator(),
+0<y.getIncomingTreeEdges(R).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,W)):0<y.model.getEdgeCount(R)&&this.addMenuItems(H,["selectConnections"],null,W)}};x.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getOutgoingTreeEdges(H);if(null!=H){for(var R=[],W=0;W<H.length;W++)R.push(y.model.getTerminal(H[W],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
+1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=y.getOutgoingTreeEdges(y.model.getTerminal(H[0],!0)),null!=H)){for(var R=[],W=0;W<H.length;W++)R.push(y.model.getTerminal(H[W],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);null!=H&&0<H.length&&y.setSelectionCell(y.model.getTerminal(H[0],
+!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(H,R){H=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(H)){if(null!=R&&mxEvent.isAltDown(R))y.setSelectionCells(y.model.getTreeEdges(H,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var W=[];y.traverse(H,!0,function(J,V){var U=null!=V&&y.isTreeEdge(V);U&&W.push(V);null!=V&&!U||null!=R&&mxEvent.isShiftDown(R)||W.push(J);return null==V||U})}y.setSelectionCells(W)}},null,null,"Alt+Shift+D");
+var K=y.removeCells;y.removeCells=function(H,R){R=null!=R?R:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));R&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var W=[],J=0;J<H.length;J++){var V=H[J];z.isEdge(V)&&n(V)&&(W.push(V),V=z.getTerminal(V,!1));if(c(V)){var U=[];y.traverse(V,!0,function(X,t){var E=null!=t&&y.isTreeEdge(t);E&&U.push(t);(null==t||E)&&U.push(X);return null==t||E});0<U.length&&(W=W.concat(U),V=y.getIncomingTreeEdges(H[J]),H=H.concat(V))}else null!=V&&W.push(H[J])}H=
+W;return K.apply(this,arguments)};x.hoverIcons.getStateAt=function(H,R,W){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,W))};var P=y.duplicateCells;y.duplicateCells=function(H,R){H=null!=H?H:this.getSelectionCells();for(var W=H.slice(0),J=0;J<W.length;J++){var V=y.view.getState(W[J]);if(null!=V&&c(V.cell)){var U=y.getIncomingTreeEdges(V.cell);for(V=0;V<U.length;V++)mxUtils.remove(U[V],H)}}this.model.beginUpdate();try{var X=P.call(this,H,R);if(X.length==H.length)for(J=0;J<H.length;J++)if(c(H[J])){var t=
+y.getIncomingTreeEdges(X[J]);U=y.getIncomingTreeEdges(H[J]);if(0==t.length&&0<U.length){var E=this.cloneCell(U[0]);this.addEdge(E,y.getDefaultParent(),this.model.getTerminal(U[0],!0),X[J])}}}finally{this.model.endUpdate()}return X};var L=y.moveCells;y.moveCells=function(H,R,W,J,V,U,X){var t=null;this.model.beginUpdate();try{var E=V,M=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(M,"treeFolding","0")){for(var T=0;T<H.length;T++)if(c(H[T])||y.model.isEdge(H[T])&&null==y.model.getTerminal(H[T],
+!0)){V=y.model.getParent(H[T]);break}if(null!=E&&V!=E&&null!=this.view.getState(H[0])){var O=y.getIncomingTreeEdges(H[0]);if(0<O.length){var Q=y.view.getState(y.model.getTerminal(O[0],!0));if(null!=Q){var S=y.view.getState(E);null!=S&&(R=(S.getCenterX()-Q.getCenterX())/y.view.scale,W=(S.getCenterY()-Q.getCenterY())/y.view.scale)}}}}t=L.apply(this,arguments);if(null!=t&&null!=H&&t.length==H.length)for(T=0;T<t.length;T++)if(this.model.isEdge(t[T]))c(E)&&0>mxUtils.indexOf(t,this.model.getTerminal(t[T],
+!0))&&this.model.setTerminal(t[T],E,!0);else if(c(H[T])&&(O=y.getIncomingTreeEdges(H[T]),0<O.length))if(!J)c(E)&&0>mxUtils.indexOf(H,this.model.getTerminal(O[0],!0))&&this.model.setTerminal(O[0],E,!0);else if(0==y.getIncomingTreeEdges(t[T]).length){M=E;if(null==M||M==y.model.getParent(H[T]))M=y.model.getTerminal(O[0],!0);J=this.cloneCell(O[0]);this.addEdge(J,y.getDefaultParent(),M,t[T])}}finally{this.model.endUpdate()}return t};if(null!=x.sidebar){var u=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
+function(H,R,W,J){var V=y.model,U=null;V.beginUpdate();try{if(U=u.apply(this,arguments),c(H))for(var X=0;X<U.length;X++)if(V.isEdge(U[X])&&null==V.getTerminal(U[X],!0)){V.setTerminal(U[X],H,!0);var t=y.getCellGeometry(U[X]);t.points=null;null!=t.getTerminalPoint(!0)&&t.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return U}}var D={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},B=x.onKeyDown;x.onKeyDown=function(H){try{if(y.isEnabled()&&
+!y.isEditing()&&c(y.getSelectionCell())&&1==y.getSelectionCount()){var R=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==H.which?R=mxEvent.isShiftDown(H)?k(y.getSelectionCell()):l(y.getSelectionCell()):13==H.which&&(R=g(y.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=R&&0<R.length)1==R.length&&y.model.isEdge(R[0])?y.setSelectionCell(y.model.getTerminal(R[0],!1)):y.setSelectionCell(R[R.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(y.view.getState(y.getSelectionCell())),
+y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var W=D[H.keyCode];null!=W&&(W.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(H))}}catch(J){x.handleError(J)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var C=y.connectVertex;y.connectVertex=function(H,R,W,J,V,U,X){var t=y.getIncomingTreeEdges(H);if(c(H)){var E=d(H),M=E==mxConstants.DIRECTION_EAST||E==mxConstants.DIRECTION_WEST,T=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return E==R||0==t.length?l(H,R):M==T?k(H):g(H,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return C.apply(this,arguments)};y.getSubtree=function(H){var R=
+[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(W,J){var V=null!=J&&y.isTreeEdge(J);V&&0>mxUtils.indexOf(R,J)&&R.push(J);(null==J||V)&&0>mxUtils.indexOf(R,W)&&R.push(W);return null==J||V});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
-this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var P=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){P.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,S){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
+this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){I.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,R){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
function(){var n=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");n.vertex=!0;var v=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);n.insert(g);n.insert(v);n.insert(d);return sb.createVertexTemplateFromCells([n],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var n=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
n.vertex=!0;var v=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
@@ -13076,27 +13078,27 @@ l.geometry.relative=!0;l.edge=!0;v.insertEdge(l,!0);k.insertEdge(l,!1);n.insert(
v.geometry.setTerminalPoint(new mxPoint(0,0),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);return sb.createVertexTemplateFromCells([n,v],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree sub sections",function(){var n=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");n.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
v.geometry.setTerminalPoint(new mxPoint(110,-40),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");g.geometry.setTerminalPoint(new mxPoint(110,-40),!0);g.geometry.relative=
!0;g.edge=!0;d.insertEdge(g,!1);return sb.createVertexTemplateFromCells([v,g,n,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(C,E){if(EditorUi.windowed){var G=C.editor.graph;G.popupMenuHandler.hideMenu();if(null==C.formatWindow){E="1"==urlParams.sketch?Math.max(10,C.diagramContainer.clientWidth-241):Math.max(10,C.diagramContainer.clientWidth-248);var P="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);C.formatWindow=new n(C,mxResources.get("format"),E,P,240,G,function(F){var H=
-C.createFormat(F);H.init();C.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});C.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.formatWindow.window.fit()}));C.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else C.formatWindow.window.setVisible(null!=E?E:!C.formatWindow.window.isVisible())}else{if(null==C.formatElt){C.formatElt=m();var J=C.createFormat(C.formatElt);J.init();C.formatElt.style.border="none";C.formatElt.style.width=
-"240px";C.formatElt.style.borderLeft="1px solid gray";C.formatElt.style.right="0px";C.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}))}G=C.diagramContainer.parentNode;null!=C.formatElt.parentNode?(C.formatElt.parentNode.removeChild(C.formatElt),G.style.right="0px"):(G.parentNode.appendChild(C.formatElt),G.style.right=C.formatElt.style.width)}}function e(C,E){function G(H,S){var V=C.menus.get(H);H=F.addMenu(S,mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));H.style.cssText=
-"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";E.appendChild(H);return H}var P=document.createElement("div");P.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;";P.className="geTitle";var J=document.createElement("span");J.style.fontSize="18px";J.style.marginRight="5px";
-J.innerHTML="+";P.appendChild(J);mxUtils.write(P,mxResources.get("moreShapes"));E.appendChild(P);mxEvent.addListener(P,"click",function(){C.actions.get("shapes").funct()});var F=new Menubar(C,E);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?P.style.bottom="0":null!=C.actions.get("newLibrary")?(P=document.createElement("div"),P.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-P.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("newLibrary")),P.appendChild(J),E.appendChild(P),mxEvent.addListener(P,"click",C.actions.get("newLibrary").funct),P=document.createElement("div"),P.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;",P.className="geTitle",J=document.createElement("span"),
-J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("openLibrary")),P.appendChild(J),E.appendChild(P),mxEvent.addListener(P,"click",C.actions.get("openLibrary").funct)):(P=G("newLibrary",mxResources.get("newLibrary")),P.style.boxSizing="border-box",P.style.paddingRight="6px",P.style.paddingLeft="6px",P.style.height="32px",P.style.left="0",P=G("openLibraryFrom",mxResources.get("openLibraryFrom")),P.style.borderLeft="1px solid lightgray",P.style.boxSizing="border-box",P.style.paddingRight=
-"6px",P.style.paddingLeft="6px",P.style.height="32px",P.style.left="50%");E.appendChild(C.sidebar.container);E.style.overflow="hidden"}function f(C,E){if(EditorUi.windowed){var G=C.editor.graph;G.popupMenuHandler.hideMenu();if(null==C.sidebarWindow){E=Math.min(G.container.clientWidth-10,218);var P="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);C.sidebarWindow=new n(C,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-P)/2):56,E-6,P-6,function(J){e(C,J)});C.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.sidebarWindow.window.fit()}));C.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);C.sidebarWindow.window.setVisible(!0);C.getLocalData("sidebar",function(J){C.sidebar.showEntries(J,null,!0)});C.restoreLibraries()}else C.sidebarWindow.window.setVisible(null!=E?E:!C.sidebarWindow.window.isVisible())}else null==
-C.sidebarElt&&(C.sidebarElt=m(),e(C,C.sidebarElt),C.sidebarElt.style.border="none",C.sidebarElt.style.width="210px",C.sidebarElt.style.borderRight="1px solid gray"),G=C.diagramContainer.parentNode,null!=C.sidebarElt.parentNode?(C.sidebarElt.parentNode.removeChild(C.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(C.sidebarElt),G.style.left=C.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(C){}var m=function(){var C=document.createElement("div");C.className="geSidebarContainer";C.style.position="absolute";C.style.width="100%";C.style.height="100%";C.style.border="1px solid whiteSmoke";C.style.overflowX="hidden";C.style.overflowY="auto";return C},n=function(C,E,G,P,J,F,H){var S=m();H(S);this.window=new mxWindow(E,S,G,P,J,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(V,M){var W=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;V=Math.max(0,Math.min(V,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));M=Math.max(0,Math.min(M,W-U.clientHeight-2));this.getX()==V&&this.getY()==M||mxWindow.prototype.setLocation.apply(this,
-arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(V){null==V&&(V=window.event);return null!=V&&C.isSelectionAllowed(V)}))};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;
+EditorUi.initMinimalTheme=function(){function b(B,C){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.formatWindow){C="1"==urlParams.sketch?Math.max(10,B.diagramContainer.clientWidth-241):Math.max(10,B.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);B.formatWindow=new n(B,mxResources.get("format"),C,N,240,G,function(F){var H=
+B.createFormat(F);H.init();B.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});B.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.formatWindow.window.fit()}));B.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else B.formatWindow.window.setVisible(null!=C?C:!B.formatWindow.window.isVisible())}else{if(null==B.formatElt){B.formatElt=m();var I=B.createFormat(B.formatElt);I.init();B.formatElt.style.border="none";B.formatElt.style.width=
+"240px";B.formatElt.style.borderLeft="1px solid gray";B.formatElt.style.right="0px";B.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}))}G=B.diagramContainer.parentNode;null!=B.formatElt.parentNode?(B.formatElt.parentNode.removeChild(B.formatElt),G.style.right="0px"):(G.parentNode.appendChild(B.formatElt),G.style.right=B.formatElt.style.width)}}function e(B,C){function G(H,R){var W=B.menus.get(H);H=F.addMenu(R,mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));H.style.cssText=
+"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";C.appendChild(H);return H}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";
+I.innerHTML="+";N.appendChild(I);mxUtils.write(N,mxResources.get("moreShapes"));C.appendChild(N);mxEvent.addListener(N,"click",function(){B.actions.get("shapes").funct()});var F=new Menubar(B,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=B.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+N.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),N.appendChild(I),C.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",I=document.createElement("span"),
+I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),N.appendChild(I),C.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("openLibrary").funct)):(N=G("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=G("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight=
+"6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");C.appendChild(B.sidebar.container);C.style.overflow="hidden"}function f(B,C){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.sidebarWindow){C=Math.min(G.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);B.sidebarWindow=new n(B,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
+"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-N)/2):56,C-6,N-6,function(I){e(B,I)});B.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.sidebarWindow.window.fit()}));B.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);B.sidebarWindow.window.setVisible(!0);B.getLocalData("sidebar",function(I){B.sidebar.showEntries(I,null,!0)});B.restoreLibraries()}else B.sidebarWindow.window.setVisible(null!=C?C:!B.sidebarWindow.window.isVisible())}else null==
+B.sidebarElt&&(B.sidebarElt=m(),e(B,B.sidebarElt),B.sidebarElt.style.border="none",B.sidebarElt.style.width="210px",B.sidebarElt.style.borderRight="1px solid gray"),G=B.diagramContainer.parentNode,null!=B.sidebarElt.parentNode?(B.sidebarElt.parentNode.removeChild(B.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(B.sidebarElt),G.style.left=B.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
+null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(B){}var m=function(){var B=document.createElement("div");B.className="geSidebarContainer";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.style.border="1px solid whiteSmoke";B.style.overflowX="hidden";B.style.overflowY="auto";return B},n=function(B,C,G,N,I,F,H){var R=m();H(R);this.window=new mxWindow(C,R,G,N,I,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(W,J){var V=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;W=Math.max(0,Math.min(W,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));J=Math.max(0,Math.min(J,V-U.clientHeight-2));this.getX()==W&&this.getY()==J||mxWindow.prototype.setLocation.apply(this,
+arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(W){null==W&&(W=window.event);return null!=W&&B.isSelectionAllowed(W)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(C){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(C);null==urlParams.dark&&(mxSettings.settings.darkMode=C,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var v=document.createElement("link");v.setAttribute("rel","stylesheet");v.setAttribute("href",STYLE_PATH+"/dark.css");v.setAttribute("charset","UTF-8");v.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(C){if(Editor.darkMode!=C){var E=this.editor.graph;Editor.darkMode=C;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";E.view.gridColor=Editor.isDarkMode()?E.view.defaultDarkGridColor:E.view.defaultGridColor;E.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";E.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";E.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";E.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";E.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";E.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";E.loadStylesheet();null!=this.actions.layersWindow&&(C=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,C&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=E.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=E.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=E.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
-E.shapeForegroundColor;Graph.prototype.defaultThemeName=E.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
+EditorUi.prototype.setDarkMode=function(B){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(B);null==urlParams.dark&&(mxSettings.settings.darkMode=B,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var v=document.createElement("link");v.setAttribute("rel","stylesheet");v.setAttribute("href",STYLE_PATH+"/dark.css");v.setAttribute("charset","UTF-8");v.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(B){if(Editor.darkMode!=B){var C=this.editor.graph;Editor.darkMode=B;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";C.view.gridColor=Editor.isDarkMode()?C.view.defaultDarkGridColor:C.view.defaultGridColor;C.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";C.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";C.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";C.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";C.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.loadStylesheet();null!=this.actions.layersWindow&&(B=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,B&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=C.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=C.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=C.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+C.shapeForegroundColor;Graph.prototype.defaultThemeName=C.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==v.parentNode&&document.getElementsByTagName("head")[0].appendChild(v):null!=v.parentNode&&v.parentNode.removeChild(v)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
@@ -13106,155 +13108,155 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var g=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C,
-E){null!=E.shortcut&&900>c&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",E.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+Editor.userImage+")";C.style.backgroundPosition="center center";
-C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";C.style.cssFloat="right";C.setAttribute("title",mxResources.get("changeUser"));if("none"!=C.style.display){C.style.display="inline-block";var E=this.getCurrentFile();if(null!=E&&E.isRealtimeEnabled()&&E.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
-"12px";var P=E.getRealtimeError();E=E.getRealtimeState();var J=mxResources.get("realtimeCollaboration");1==E?(G.src=Editor.syncImage,J+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,J=null!=P&&null!=P.message?J+(" ("+P.message+")"):J+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",J);C.style.paddingRight="4px";C.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var C=
-this.shareButton;C.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+Editor.shareImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var C=document.createElement("div");C.style.display="inline-block";C.style.position="relative";C.style.marginTop="6px";C.style.marginRight="4px";var E=document.createElement("a");E.className="geMenuItem gePrimaryBtn";E.style.marginLeft="8px";E.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(E,G);E.setAttribute("title",G);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));C.appendChild(E)}}else mxUtils.write(E,mxResources.get("save")),E.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),C.appendChild(E),"1"==urlParams.saveAndExit&&(E=document.createElement("a"),
-mxUtils.write(E,mxResources.get("saveAndExit")),E.setAttribute("title",mxResources.get("saveAndExit")),E.className="geMenuItem",E.style.marginLeft="6px",E.style.padding="6px",mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),C.appendChild(E));"1"!=urlParams.noExitBtn&&(E=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(E,G),E.setAttribute("title",G),E.className="geMenuItem",
-E.style.marginLeft="6px",E.style.padding="6px",mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),C.appendChild(E));this.buttonContainer.appendChild(C);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var x=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(C,E){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,C)){var G=mxUtils.getOffset(this.editorUi.picker);
-G.x+=this.editorUi.picker.offsetWidth+4;G.y+=C.offsetTop-E.height/2+16;return G}var P=x.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);P.x+=G.x-16;P.y+=G.y;return P};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(C,E,G){var P=this.editorUi.editor.graph;C.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?P.isEnabled()&&(C.addSeparator(),1==P.getSelectionCount()&&this.addMenuItems(C,["-","lockUnlock"],null,G)):1==P.getSelectionCount()?
-(P.isCellFoldable(P.getSelectionCell())&&this.addMenuItems(C,P.isCellCollapsed(E)?["expand"]:["collapse"],null,G),this.addMenuItems(C,["collapsible","-","lockUnlock","enterGroup"],null,G),C.addSeparator(),this.addSubmenu("layout",C)):P.isSelectionEmpty()&&P.isEnabled()?(C.addSeparator(),this.addMenuItems(C,["editData"],null,G),C.addSeparator(),this.addSubmenu("layout",C),this.addSubmenu("insert",C),this.addMenuItems(C,["-","exitGroup"],null,G)):P.isEnabled()&&this.addMenuItems(C,["-","lockUnlock"],
-null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(C,E,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(C,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(C){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=C?C:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(B,
+C){null!=C.shortcut&&900>c&&!mxClient.IS_IOS?B.firstChild.nextSibling.setAttribute("title",C.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.apply(this,arguments);if(null!=this.userElement){var B=this.userElement;B.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+B.style.display;B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+Editor.userImage+")";B.style.backgroundPosition="center center";
+B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";B.style.cssFloat="right";B.setAttribute("title",mxResources.get("changeUser"));if("none"!=B.style.display){B.style.display="inline-block";var C=this.getCurrentFile();if(null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
+"12px";var N=C.getRealtimeError();C=C.getRealtimeState();var I=mxResources.get("realtimeCollaboration");1==C?(G.src=Editor.syncImage,I+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,I=null!=N&&null!=N.message?I+(" ("+N.message+")"):I+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",I);B.style.paddingRight="4px";B.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var B=
+this.shareButton;B.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+Editor.shareImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var B=document.createElement("div");B.style.display="inline-block";B.style.position="relative";B.style.marginTop="6px";B.style.marginRight="4px";var C=document.createElement("a");C.className="geMenuItem gePrimaryBtn";C.style.marginLeft="8px";C.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(C,G);C.setAttribute("title",G);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));B.appendChild(C)}}else mxUtils.write(C,mxResources.get("save")),C.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),B.appendChild(C),"1"==urlParams.saveAndExit&&(C=document.createElement("a"),
+mxUtils.write(C,mxResources.get("saveAndExit")),C.setAttribute("title",mxResources.get("saveAndExit")),C.className="geMenuItem",C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),B.appendChild(C));"1"!=urlParams.noExitBtn&&(C=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(C,G),C.setAttribute("title",G),C.className="geMenuItem",
+C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),B.appendChild(C));this.buttonContainer.appendChild(B);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var x=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(B,C){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,B)){var G=mxUtils.getOffset(this.editorUi.picker);
+G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-C.height/2+16;return G}var N=x.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=G.x-16;N.y+=G.y;return N};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(B,C,G){var N=this.editorUi.editor.graph;B.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(B.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(B,["-","lockUnlock"],null,G)):1==N.getSelectionCount()?
+(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(B,N.isCellCollapsed(C)?["expand"]:["collapse"],null,G),this.addMenuItems(B,["collapsible","-","lockUnlock","enterGroup"],null,G),B.addSeparator(),this.addSubmenu("layout",B)):N.isSelectionEmpty()&&N.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):N.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],
+null,G)};var z=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(B,C,G){z.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(B,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(B){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=B?B:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
-null);B.apply(this,arguments)};var I=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(C){I.apply(this,arguments);if(C){var E=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=E&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=E||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments);var E=this.editorUi,G=E.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var P=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(J,F){E.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:J?
-"1":null},G.getVerticesAndEdges())},{install:function(J){this.listener=function(){J(Editor.sketchMode)};E.addListener("sketchModeChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});C.appendChild(P)}return C};var t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,arguments);var C=this.editorUi,E=C.editor.graph;C.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";C.actions.get("createShape").label=mxResources.get("shape")+"...";C.actions.get("outline").label=
-mxResources.get("outline")+"...";C.actions.get("layers").label=mxResources.get("layers")+"...";C.actions.get("tags").label=mxResources.get("tags")+"...";C.actions.get("forkme").visible="1"!=urlParams.sketch;C.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;C.actions.get("comments").label=mxResources.get("comments")+"...";var G=C.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(M){C.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});
-G=C.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(M){C.setSketchMode(!Editor.sketchMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=C.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(M){C.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});C.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){E.popupMenuHandler.hideMenu();
-C.showImportCsvDialog()}));C.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var M=new ParseDialog(C,"Insert from Text");C.showDialog(M.container,620,420,!0,!1);M.init()}));C.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var M=new ParseDialog(C,"Insert from Text","formatSql");C.showDialog(M.container,620,420,!0,!1);M.init()}));C.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){f(C)},
-null,null,Editor.ctrlKey+"+Shift+K"));C.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(C)})).shortcut=C.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!C.isOffline()&&C.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var M=new ParseDialog(C,mxResources.get("plantUml")+"...","plantUml");C.showDialog(M.container,620,420,!0,!1);M.init()}));C.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var M=
-new ParseDialog(C,mxResources.get("mermaid")+"...","mermaid");C.showDialog(M.container,620,420,!0,!1);M.init()}));var P=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(M,W){var U=this.editorUi.editor.graph,X=U.getSelectionCell();P.call(this,M,X,null,W);this.addMenuItems(M,["editTooltip"],W);U.model.isVertex(X)&&this.addMenuItems(M,["editGeometry"],W);this.addMenuItems(M,["-","edit"],W)})));this.addPopupMenuCellEditItems=function(M,W,U,X){M.addSeparator();this.addSubmenu("editCell",
-M,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(M,W){var U=C.getCurrentFile();C.menus.addMenuItems(M,["new"],W);C.menus.addSubmenu("openFrom",M,W);isLocalStorage&&this.addSubmenu("openRecent",M,W);M.addSeparator(W);null!=U&&U.constructor==DriveFile?C.menus.addMenuItems(M,["save","rename","makeCopy","moveToFolder"],W):(C.menus.addMenuItems(M,["save","saveAs","-","rename"],W),C.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(M,
-["upload"],W):C.menus.addMenuItems(M,["makeCopy"],W));M.addSeparator(W);null!=U&&(U.isRevisionHistorySupported()&&C.menus.addMenuItems(M,["revisionHistory"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||C.menus.addMenuItems(M,["synchronize"],W));C.menus.addMenuItems(M,["autosave"],W);if(null!=U&&(M.addSeparator(W),U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(M,["showRemoteCursors","shareCursor"],W),U.constructor==DriveFile&&C.menus.addMenuItems(M,
-["share"],W),null!=C.fileNode&&"1"!=urlParams.embedInline)){var X=null!=U.getTitle()?U.getTitle():C.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||!/(\.html)$/i.test(X)&&!/(\.svg)$/i.test(X))&&this.addMenuItems(M,["-","properties"],W)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(M,W){var U=C.getCurrentFile();C.menus.addSubmenu("extras",M,W,mxResources.get("preferences"));M.addSeparator(W);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)C.menus.addMenuItems(M,
-"new open - synchronize - save saveAs -".split(" "),W);else if("1"==urlParams.embed||C.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&C.menus.addMenuItems(M,["-","save"],W);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||C.mode==App.MODE_ATLAS)C.menus.addMenuItems(M,["saveAndExit"],W),null!=U&&U.isRevisionHistorySupported()&&C.menus.addMenuItems(M,["revisionHistory"],W);M.addSeparator(W)}else C.mode==App.MODE_ATLAS?C.menus.addMenuItems(M,
-["save","synchronize","-"],W):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(C.menus.addMenuItems(M,["new"],W),C.menus.addSubmenu("openFrom",M,W),isLocalStorage&&this.addSubmenu("openRecent",M,W),M.addSeparator(W),null!=U&&(U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(M,["showRemoteCursors","shareCursor"],W),U.constructor==DriveFile&&C.menus.addMenuItems(M,["share"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||C.menus.addMenuItems(M,["synchronize"],
-W)),M.addSeparator(W),C.menus.addSubmenu("save",M,W)):C.menus.addSubmenu("file",M,W));C.menus.addSubmenu("exportAs",M,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?C.menus.addMenuItems(M,["import"],W):"1"!=urlParams.noFileMenu&&C.menus.addSubmenu("importFrom",M,W);M.addSeparator(W);"1"!=urlParams.sketch&&C.menus.addMenuItems(M,["outline"],W);C.commentsSupported()&&C.menus.addMenuItems(M,["comments"],W);C.menus.addMenuItems(M,"- findReplace outline layers tags - pageSetup".split(" "),W);"1"==urlParams.noFileMenu||
-mxClient.IS_IOS&&navigator.standalone||C.menus.addMenuItems(M,["print"],W);"1"!=urlParams.sketch&&null!=U&&null!=C.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():C.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(M,["-","properties"]));M.addSeparator(W);C.menus.addSubmenu("help",M,W);"1"==urlParams.embed||C.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||C.mode==App.MODE_ATLAS)&&C.menus.addMenuItems(M,["-","exit"],W):"1"!=urlParams.noFileMenu&&
-C.menus.addMenuItems(M,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(M,W){var U=C.getCurrentFile();null!=U&&U.constructor==DriveFile?C.menus.addMenuItems(M,["save","makeCopy","-","rename","moveToFolder"],W):(C.menus.addMenuItems(M,["save","saveAs","-","rename"],W),C.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(M,["upload"],W):C.menus.addMenuItems(M,["makeCopy"],W));C.menus.addMenuItems(M,["-","autosave"],W);null!=U&&U.isRevisionHistorySupported()&&
-C.menus.addMenuItems(M,["-","revisionHistory"],W)})));var J=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(M,W){J.funct(M,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||C.menus.addMenuItems(M,["publishLink"],W);C.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(M.addSeparator(W),C.menus.addSubmenu("embed",M,W))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(M,W){C.menus.addInsertTableCellItem(M,W)})));if("1"==urlParams.sketch){var H=
-this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(M,W){H.funct(M,W);this.addMenuItems(M,["-","pageScale","-","ruler"],W)})))}this.put("extras",new Menu(mxUtils.bind(this,function(M,W){null!=F&&C.menus.addSubmenu("language",M,W);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&C.mode!=App.MODE_ATLAS&&C.menus.addSubmenu("theme",M,W);C.menus.addSubmenu("units",M,W);M.addSeparator(W);"1"!=urlParams.sketch&&C.menus.addMenuItems(M,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),
-W);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&C.mode!=App.MODE_ATLAS&&C.menus.addMenuItems(M,["-","showStartScreen","search","scratchpad"],W);M.addSeparator(W);"1"==urlParams.sketch?C.menus.addMenuItems(M,"configuration - copyConnect collapseExpand tooltips -".split(" "),W):(C.mode!=App.MODE_ATLAS&&C.menus.addMenuItem(M,"configuration",W),!C.isOfflineApp()&&isLocalStorage&&C.mode!=App.MODE_ATLAS&&C.menus.addMenuItem(M,"plugins",
-W),M.addSeparator(W),C.mode!=App.MODE_ATLAS&&this.addMenuItems(M,["fullscreen"],W));("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(M,["toggleDarkMode"],W);M.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(M,W){C.menus.addMenuItems(M,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var M=this.get("insert"),W=M.funct;M.funct=function(U,
-X){"1"==urlParams.sketch?(C.insertTemplateEnabled&&!C.isOffline()&&C.menus.addMenuItems(U,["insertTemplate"],X),C.menus.addMenuItems(U,["insertImage","insertLink","-"],X),C.menus.addSubmenu("insertLayout",U,X,mxResources.get("layout")),C.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced"))):(W.apply(this,arguments),C.menus.addSubmenu("table",U,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),V=function(M,W,U,X){M.addItem(U,
-null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(C,U,X);C.showDialog(u.container,620,420,!0,!1);u.init()}),W)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(M,W){for(var U=0;U<S.length;U++)"-"==S[U]?M.addSeparator(W):V(M,W,mxResources.get(S[U])+"...",S[U])})))};EditorUi.prototype.installFormatToolbar=function(C){var E=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-E.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(P,J){0<E.getSelectionCount()?(C.appendChild(G),G.innerHTML="Selected: "+E.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width=
-"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(da,
-ca,la){var ia=F.menus.get(da),ma=M.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),V);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(da));F.menus.menuCreated(ia,ma,"geMenuItem");null!=la?
-(ma.style.backgroundImage="url("+la+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ca||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function E(da,ca,la,ia,ma,ra){var pa=document.createElement("a");pa.className="1"==urlParams.sketch?"geToolbarButton":
-"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing="border-box";pa.style.height="30px";pa.style.padding="6px";pa.style.position="relative";pa.style.verticalAlign="top";pa.style.top="0px";"1"==urlParams.sketch&&(pa.style.borderStyle="none",pa.style.boxShadow="none",pa.style.padding="6px",pa.style.margin="0px");null!=F.statusContainer?S.insertBefore(pa,F.statusContainer):S.appendChild(pa);null!=ra?(pa.style.backgroundImage="url("+ra+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat=
+null);A.apply(this,arguments)};var K=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){K.apply(this,arguments);if(B){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=C&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=C||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var P=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=P.apply(this,arguments);var C=this.editorUi,G=C.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(I,F){C.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:I?
+"1":null},G.getVerticesAndEdges())},{install:function(I){this.listener=function(){I(Editor.sketchMode)};C.addListener("sketchModeChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});B.appendChild(N)}return B};var L=Menus.prototype.init;Menus.prototype.init=function(){L.apply(this,arguments);var B=this.editorUi,C=B.editor.graph;B.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";B.actions.get("createShape").label=mxResources.get("shape")+"...";B.actions.get("outline").label=
+mxResources.get("outline")+"...";B.actions.get("layers").label=mxResources.get("layers")+"...";B.actions.get("tags").label=mxResources.get("tags")+"...";B.actions.get("forkme").visible="1"!=urlParams.sketch;B.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;B.actions.get("comments").label=mxResources.get("comments")+"...";var G=B.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(J){B.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});
+G=B.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(J){B.setSketchMode(!Editor.sketchMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=B.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(J){B.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});B.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){C.popupMenuHandler.hideMenu();
+B.showImportCsvDialog()}));B.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var J=new ParseDialog(B,"Insert from Text");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var J=new ParseDialog(B,"Insert from Text","formatSql");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){f(B)},
+null,null,Editor.ctrlKey+"+Shift+K"));B.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(B)})).shortcut=B.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!B.isOffline()&&B.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var J=new ParseDialog(B,mxResources.get("plantUml")+"...","plantUml");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var J=
+new ParseDialog(B,mxResources.get("mermaid")+"...","mermaid");B.showDialog(J.container,620,420,!0,!1);J.init()}));var N=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(J,V){var U=this.editorUi.editor.graph,X=U.getSelectionCell();N.call(this,J,X,null,V);this.addMenuItems(J,["editTooltip"],V);U.model.isVertex(X)&&this.addMenuItems(J,["editGeometry"],V);this.addMenuItems(J,["-","edit"],V)})));this.addPopupMenuCellEditItems=function(J,V,U,X){J.addSeparator();this.addSubmenu("editCell",
+J,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(J,V){var U=B.getCurrentFile();B.menus.addMenuItems(J,["new"],V);B.menus.addSubmenu("openFrom",J,V);isLocalStorage&&this.addSubmenu("openRecent",J,V);J.addSeparator(V);null!=U&&U.constructor==DriveFile?B.menus.addMenuItems(J,["save","rename","makeCopy","moveToFolder"],V):(B.menus.addMenuItems(J,["save","saveAs","-","rename"],V),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(J,
+["upload"],V):B.menus.addMenuItems(J,["makeCopy"],V));J.addSeparator(V);null!=U&&(U.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["revisionHistory"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||B.menus.addMenuItems(J,["synchronize"],V));B.menus.addMenuItems(J,["autosave"],V);if(null!=U&&(J.addSeparator(V),U.constructor==DriveFile&&B.menus.addMenuItems(J,["share"],V),null!=B.fileNode&&"1"!=urlParams.embedInline)){var X=null!=U.getTitle()?U.getTitle():
+B.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||!/(\.html)$/i.test(X)&&!/(\.svg)$/i.test(X))&&this.addMenuItems(J,["-","properties"],V)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(J,V){var U=B.getCurrentFile();B.menus.addSubmenu("extras",J,V,mxResources.get("preferences"));J.addSeparator(V);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)B.menus.addMenuItems(J,"new open - synchronize - save saveAs -".split(" "),V);else if("1"==urlParams.embed||B.mode==
+App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&B.menus.addMenuItems(J,["-","save"],V);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||B.mode==App.MODE_ATLAS)B.menus.addMenuItems(J,["saveAndExit"],V),null!=U&&U.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["revisionHistory"],V);J.addSeparator(V)}else B.mode==App.MODE_ATLAS?B.menus.addMenuItems(J,["save","synchronize","-"],V):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(B.menus.addMenuItems(J,
+["new"],V),B.menus.addSubmenu("openFrom",J,V),isLocalStorage&&this.addSubmenu("openRecent",J,V),J.addSeparator(V),null!=U&&(U.constructor==DriveFile&&B.menus.addMenuItems(J,["share"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||B.menus.addMenuItems(J,["synchronize"],V)),J.addSeparator(V),B.menus.addSubmenu("save",J,V)):B.menus.addSubmenu("file",J,V));B.menus.addSubmenu("exportAs",J,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?B.menus.addMenuItems(J,["import"],V):
+"1"!=urlParams.noFileMenu&&B.menus.addSubmenu("importFrom",J,V);J.addSeparator(V);"1"!=urlParams.sketch&&B.menus.addMenuItems(J,["outline"],V);B.commentsSupported()&&B.menus.addMenuItems(J,["comments"],V);B.menus.addMenuItems(J,"- findReplace outline layers tags - pageSetup".split(" "),V);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||B.menus.addMenuItems(J,["print"],V);"1"!=urlParams.sketch&&null!=U&&null!=B.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():
+B.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(J,["-","properties"]));J.addSeparator(V);B.menus.addSubmenu("help",J,V);"1"==urlParams.embed||B.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||B.mode==App.MODE_ATLAS)&&B.menus.addMenuItems(J,["-","exit"],V):"1"!=urlParams.noFileMenu&&B.menus.addMenuItems(J,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(J,V){var U=B.getCurrentFile();null!=U&&U.constructor==DriveFile?B.menus.addMenuItems(J,["save",
+"makeCopy","-","rename","moveToFolder"],V):(B.menus.addMenuItems(J,["save","saveAs","-","rename"],V),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(J,["upload"],V):B.menus.addMenuItems(J,["makeCopy"],V));B.menus.addMenuItems(J,["-","autosave"],V);null!=U&&U.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["-","revisionHistory"],V)})));var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(J,V){I.funct(J,V);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||B.menus.addMenuItems(J,["publishLink"],V);B.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(J.addSeparator(V),B.menus.addSubmenu("embed",J,V))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(J,V){B.menus.addInsertTableCellItem(J,V)})));if("1"==urlParams.sketch){var H=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(J,V){H.funct(J,V);this.addMenuItems(J,["-","pageScale","-","ruler"],V)})))}this.put("extras",new Menu(mxUtils.bind(this,
+function(J,V){null!=F&&B.menus.addSubmenu("language",J,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&B.mode!=App.MODE_ATLAS&&B.menus.addSubmenu("theme",J,V);B.menus.addSubmenu("units",J,V);J.addSeparator(V);"1"!=urlParams.sketch&&B.menus.addMenuItems(J,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),V);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItems(J,["-",
+"showStartScreen","search","scratchpad"],V);J.addSeparator(V);"1"==urlParams.sketch?B.menus.addMenuItems(J,"configuration - copyConnect collapseExpand tooltips -".split(" "),V):(B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"configuration",V),!B.isOfflineApp()&&isLocalStorage&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"plugins",V));var U=B.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(J,["-","showRemoteCursors","shareCursor","-"],V);J.addSeparator(V);
+"1"!=urlParams.sketch&&B.mode!=App.MODE_ATLAS&&this.addMenuItems(J,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(J,["toggleDarkMode"],V);J.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(J,V){B.menus.addMenuItems(J,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var J=this.get("insert"),V=J.funct;J.funct=function(U,
+X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(U,["insertTemplate"],X),B.menus.addMenuItems(U,["insertImage","insertLink","-"],X),B.menus.addSubmenu("insertLayout",U,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced"))):(V.apply(this,arguments),B.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(J,V,U,X){J.addItem(U,
+null,mxUtils.bind(this,function(){var t=new CreateGraphDialog(B,U,X);B.showDialog(t.container,620,420,!0,!1);t.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(J,V){for(var U=0;U<R.length;U++)"-"==R[U]?J.addSeparator(V):W(J,V,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(B){var C=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+C.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,I){0<C.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+C.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var u=!1;EditorUi.prototype.initFormatWindow=function(){if(!u&&null!=this.formatWindow){u=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width=
+"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(da,
+ca,la){var ia=F.menus.get(da),ma=J.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),W);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(da));F.menus.menuCreated(ia,ma,"geMenuItem");null!=la?
+(ma.style.backgroundImage="url("+la+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ca||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function C(da,ca,la,ia,ma,ra){var pa=document.createElement("a");pa.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing="border-box";pa.style.height="30px";pa.style.padding="6px";pa.style.position="relative";pa.style.verticalAlign="top";pa.style.top="0px";"1"==urlParams.sketch&&(pa.style.borderStyle="none",pa.style.boxShadow="none",pa.style.padding="6px",pa.style.margin="0px");null!=F.statusContainer?R.insertBefore(pa,F.statusContainer):R.appendChild(pa);null!=ra?(pa.style.backgroundImage="url("+ra+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat=
"no-repeat",pa.style.backgroundSize="24px 24px",pa.style.width="34px"):mxUtils.write(pa,da);mxEvent.addListener(pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(na){na.preventDefault()}));mxEvent.addListener(pa,"click",function(na){"disabled"!=pa.getAttribute("disabled")&&ca(na);mxEvent.consume(na)});null==la&&(pa.style.marginRight="4px");null!=ia&&pa.setAttribute("title",ia);null!=ma&&(da=function(){ma.isEnabled()?(pa.removeAttribute("disabled"),pa.style.cursor="pointer"):
(pa.setAttribute("disabled","disabled"),pa.style.cursor="default")},ma.addListener("stateChanged",da),H.addListener("enabledChanged",da),da());return pa}function G(da,ca,la){la=document.createElement("div");la.className="geMenuItem";la.style.display="inline-block";la.style.verticalAlign="top";la.style.marginRight="6px";la.style.padding="0 4px 0 4px";la.style.height="30px";la.style.position="relative";la.style.top="0px";"1"==urlParams.sketch&&(la.style.boxShadow="none");for(var ia=0;ia<da.length;ia++)null!=
-da[ia]&&("1"==urlParams.sketch&&(da[ia].style.padding="10px 8px",da[ia].style.width="30px"),da[ia].style.margin="0px",da[ia].style.boxShadow="none",la.appendChild(da[ia]));null!=ca&&mxUtils.setOpacity(la,ca);null!=F.statusContainer&&"1"!=urlParams.sketch?S.insertBefore(la,F.statusContainer):S.appendChild(la);return la}function P(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>N.offsetTop-N.offsetHeight/2?"70px":"10px");else{for(var da=S.firstChild;null!=da;){var ca=da.nextSibling;
-"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}V=S.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var la=null;da||(la=C("diagram"));ca=da?C("diagram",null,Editor.drawLogoImage):null;null!=ca&&(la=ca);G([la,E(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),da?Editor.shapesImage:null),E(mxResources.get("format"),
-F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=C("insert",!0,da?K:null);G([ca,E(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(G([Na,Ga],60),520<=c&&G([oa,640<=c?E("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):
-null,640<=c?E("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",qa,Editor.zoomOutImage):null],60))}null!=la&&(mxEvent.disableContextMenu(la),mxEvent.addGestureListeners(la,mxUtils.bind(this,function(ia){(mxEvent.isShiftDown(ia)||mxEvent.isAltDown(ia)||mxEvent.isMetaDown(ia)||mxEvent.isControlDown(ia)||mxEvent.isPopupTrigger(ia))&&F.appIconClicked(ia)}),null,null));ca=F.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?
-(null==ya&&(ca=M.addMenu("",ca.funct),ca.setAttribute("title",mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",S.appendChild(ca),
-ya=ca),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}L.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var J=document.createElement("div");J.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-J.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(J);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,
+da[ia]&&("1"==urlParams.sketch&&(da[ia].style.padding="10px 8px",da[ia].style.width="30px"),da[ia].style.margin="0px",da[ia].style.boxShadow="none",la.appendChild(da[ia]));null!=ca&&mxUtils.setOpacity(la,ca);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(la,F.statusContainer):R.appendChild(la);return la}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>O.offsetTop-O.offsetHeight/2?"70px":"10px");else{for(var da=R.firstChild;null!=da;){var ca=da.nextSibling;
+"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}W=R.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var la=null;da||(la=B("diagram"));ca=da?B("diagram",null,Editor.drawLogoImage):null;null!=ca&&(la=ca);G([la,C(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),da?Editor.shapesImage:null),C(mxResources.get("format"),
+F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=B("insert",!0,da?M:null);G([ca,C(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(G([Na,Ga],60),520<=c&&G([oa,640<=c?C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):
+null,640<=c?C("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",qa,Editor.zoomOutImage):null],60))}null!=la&&(mxEvent.disableContextMenu(la),mxEvent.addGestureListeners(la,mxUtils.bind(this,function(ia){(mxEvent.isShiftDown(ia)||mxEvent.isAltDown(ia)||mxEvent.isMetaDown(ia)||mxEvent.isControlDown(ia)||mxEvent.isPopupTrigger(ia))&&F.appIconClicked(ia)}),null,null));ca=F.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?
+(null==ya&&(ca=J.addMenu("",ca.funct),ca.setAttribute("title",mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(ca),
+ya=ca),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}D.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+I.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(I);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,
!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),la=F.embedViewport.x+F.embedViewport.width,ia=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),ra=F.embedViewport.y+
F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(da,la-ca))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(ia,ra-ma))+"px";this.div.style.height=Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
-(this.initFormatWindow(),J=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>J)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var H=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var S=document.createElement("div");S.className="geMenubarContainer";var V=null,M=new Menubar(F,
-S);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var W=F.hideCurrentMenu;F.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var da=F.getCurrentFile();
-if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);S.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else S.removeAttribute("title")};F.setStatusText(F.editor.getStatus());S.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-S.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";J=F.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var u=document.createElement("div");u.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(u);J.appendChild(F.titlebar)}var D=
-F.menus.get("viewZoom"),K="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,N="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null;u=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});F.addListener("darkModeChanged",u);F.addListener("sketchModeChanged",u);var R=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Q.style.left=
-"10px",Q.style.top="10px",N.style.left="10px",N.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height=
+(this.initFormatWindow(),I=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>I)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var H=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var W=null,J=new Menubar(F,
+R);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var V=F.hideCurrentMenu;F.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var da=F.getCurrentFile();
+if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);R.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";I=F.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var t=document.createElement("div");t.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(t);I.appendChild(F.titlebar)}var E=
+F.menus.get("viewZoom"),M="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null;t=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});F.addListener("darkModeChanged",t);F.addListener("sketchModeChanged",t);var S=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Q.style.left=
+"10px",Q.style.top="10px",O.style.left="10px",O.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height=
"";else{var da=F.diagramContainer.getAttribute("data-bounds");if(null!=da){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var ca=H.getGraphBounds();da=da.split(" ");F.diagramContainer.style.top=da[0];F.diagramContainer.style.left=da[1];F.diagramContainer.style.width=ca.width+50+"px";F.diagramContainer.style.height=ca.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+"px";Q.style.top=F.diagramContainer.offsetTop-Q.offsetHeight-4+"px";N.style.display="";N.style.left=F.diagramContainer.offsetLeft-N.offsetWidth-4+"px";N.style.top=F.diagramContainer.offsetTop+"px";T.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=Q.style.top;T.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
+rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+"px";Q.style.top=F.diagramContainer.offsetTop-Q.offsetHeight-4+"px";O.style.display="";O.style.left=F.diagramContainer.offsetLeft-O.offsetWidth-4+"px";O.style.top=F.diagramContainer.offsetTop+"px";T.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=Q.style.top;T.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=
-F.bottomResizer.style.visibility;S.style.display="none";Q.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Fa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";R()});u=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+
-da.width+4,da.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",u);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",u);F.addListener("editInlineStop",mxUtils.bind(this,function(da){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";N.style.display="none"}));if(null!=
-F.hoverIcons){var ba=F.hoverIcons.update;F.hoverIcons.update=function(){H.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=H.freehand){var ea=H.freehand.createStyle;H.freehand.createStyle=function(da){return ea.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){N.className="geToolbarContainer";T.className="geToolbarContainer";Q.className="geToolbarContainer";S.className="geToolbarContainer";F.picker=N;var Z=!1;"1"!=urlParams.embed&&(mxEvent.addListener(S,"mouseenter",function(){F.statusContainer.style.display=
-"inline-block"}),mxEvent.addListener(S,"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var fa=mxUtils.bind(this,function(da){null!=F.notificationBtn&&(null!=da?F.notificationBtn.setAttribute("title",da):F.notificationBtn.removeAttribute("title"))});S.style.visibility=20>S.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed)if(F.statusContainer.style.display="inline-block",Z=!0,
-1==F.statusContainer.children.length&&""==F.editor.getStatus())S.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var da=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();fa(da);var ca=F.getCurrentFile();
-ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",fa(null),Z=!0;S.style.visibility=20>S.clientWidth&&!Z?"hidden":""}}));ka=C("diagram",null,Editor.menuImage);
+F.bottomResizer.style.visibility;R.style.display="none";Q.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Fa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";S()});t=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+
+da.width+4,da.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",t);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",t);F.addListener("editInlineStop",mxUtils.bind(this,function(da){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";O.style.display="none"}));if(null!=
+F.hoverIcons){var ba=F.hoverIcons.update;F.hoverIcons.update=function(){H.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=H.freehand){var ea=H.freehand.createStyle;H.freehand.createStyle=function(da){return ea.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";T.className="geToolbarContainer";Q.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=O;var Z=!1;"1"!=urlParams.embed&&(mxEvent.addListener(R,"mouseenter",function(){F.statusContainer.style.display=
+"inline-block"}),mxEvent.addListener(R,"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var fa=mxUtils.bind(this,function(da){null!=F.notificationBtn&&(null!=da?F.notificationBtn.setAttribute("title",da):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed)if(F.statusContainer.style.display="inline-block",Z=!0,
+1==F.statusContainer.children.length&&""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var da=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();fa(da);var ca=F.getCurrentFile();
+ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",fa(null),Z=!0;R.style.visibility=20>R.clientWidth&&!Z?"hidden":""}}));ka=B("diagram",null,Editor.menuImage);
ka.style.boxShadow="none";ka.style.padding="6px";ka.style.margin="0px";Q.appendChild(ka);mxEvent.disableContextMenu(ka);mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";
F.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";F.statusContainer.style.display="inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var aa=document.createElement("a");aa.style.padding="0px";aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){N.innerHTML="";if(!va){var da=function(ia,ma,ra){ia=E("",ia.funct,null,ma,ia,ra);ia.style.width="40px";ia.style.opacity="0.7";return ca(ia,null,"pointer")},ca=function(ia,ma,ra){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=ra?ra:"default";ia.style.margin="2px 0px";N.appendChild(ia);mxUtils.br(N);
+"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){O.innerHTML="";if(!va){var da=function(ia,ma,ra){ia=C("",ia.funct,null,ma,ia,ra);ia.style.width="40px";ia.style.opacity="0.7";return ca(ia,null,"pointer")},ca=function(ia,ma,ra){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=ra?ra:"default";ia.style.margin="2px 0px";O.appendChild(ia);mxUtils.br(O);
return ia};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ca(F.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));ca(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ca(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ia=new mxCell("",new mxGeometry(0,0,H.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
ia.geometry.setTerminalPoint(new mxPoint(0,0),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,0),!1);ia.geometry.points=[];ia.geometry.relative=!0;ia.edge=!0;ca(F.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,ia.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ia=ia.clone();ia.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ia.geometry.width=H.defaultEdgeLength+20;ia.geometry.setTerminalPoint(new mxPoint(0,
20),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,20),!1);ia=ca(F.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ia.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ia.style.paddingBottom="14px";ia.style.marginBottom="14px"})();da(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var la=F.actions.get("toggleShapes");da(la,mxResources.get("shapes")+
-" ("+la.shortcut+")",K);ka=C("table",null,Editor.calendarImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer");ka=C("insert",null,Editor.plusImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer")}"1"!=urlParams.embedInline&&N.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(N.style,
-"transform","translate(0, -50%)"),N.style.padding="8px 6px 4px",N.style.top="50%",N.style.bottom="",N.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),va=!1,ja()):(N.innerHTML="",N.appendChild(aa),mxUtils.setPrefixedStyle(N.style,"transform","translate(0, 0)"),N.style.top="",N.style.bottom="12px",N.style.padding="0px",N.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
-"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",va=!0)}));ja();F.addListener("darkModeChanged",ja);F.addListener("sketchModeChanged",ja)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=D){var Ba=function(da){H.popupMenuHandler.hideMenu();mxEvent.isAltDown(da)||mxEvent.isShiftDown(da)?F.actions.get("customZoom").funct():F.actions.get("smartFit").funct()},Da=F.actions.get("zoomIn"),
-qa=F.actions.get("zoomOut"),Ca=F.actions.get("resetView");u=F.actions.get("fullscreen");var Aa=F.actions.get("undo"),Ha=F.actions.get("redo"),Na=E("",Aa.funct,null,mxResources.get("undo")+" ("+Aa.shortcut+")",Aa,Editor.undoImage),Ga=E("",Ha.funct,null,mxResources.get("redo")+" ("+Ha.shortcut+")",Ha,Editor.redoImage),Fa=E("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=T){D=function(){ta.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?
-"inline-block":"none"};Ca=function(){ta.innerHTML="";if(null!=F.currentPage){mxUtils.write(ta,F.currentPage.getName());var da=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var la=F.currentPage.getId();ta.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=la?" ["+la+"]":""))}};Fa.parentNode.removeChild(Fa);var Ea=F.actions.get("delete"),La=E("",Ea.funct,null,mxResources.get("delete"),Ea,Editor.trashImage);La.style.opacity="0.1";Q.appendChild(La);
+" ("+la.shortcut+")",M);ka=B("table",null,Editor.calendarImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer");ka=B("insert",null,Editor.plusImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer")}"1"!=urlParams.embedInline&&O.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(O.style,
+"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),va=!1,ja()):(O.innerHTML="",O.appendChild(aa),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",O.style.padding="0px",O.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
+"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",va=!0)}));ja();F.addListener("darkModeChanged",ja);F.addListener("sketchModeChanged",ja)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=E){var Ba=function(da){H.popupMenuHandler.hideMenu();mxEvent.isAltDown(da)||mxEvent.isShiftDown(da)?F.actions.get("customZoom").funct():F.actions.get("smartFit").funct()},Da=F.actions.get("zoomIn"),
+qa=F.actions.get("zoomOut"),Ca=F.actions.get("resetView");t=F.actions.get("fullscreen");var Aa=F.actions.get("undo"),Ha=F.actions.get("redo"),Na=C("",Aa.funct,null,mxResources.get("undo")+" ("+Aa.shortcut+")",Aa,Editor.undoImage),Ga=C("",Ha.funct,null,mxResources.get("redo")+" ("+Ha.shortcut+")",Ha,Editor.redoImage),Fa=C("",t.funct,null,mxResources.get("fullscreen"),t,Editor.fullscreenImage);if(null!=T){E=function(){ta.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?
+"inline-block":"none"};Ca=function(){ta.innerHTML="";if(null!=F.currentPage){mxUtils.write(ta,F.currentPage.getName());var da=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var la=F.currentPage.getId();ta.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=la?" ["+la+"]":""))}};Fa.parentNode.removeChild(Fa);var Ea=F.actions.get("delete"),La=C("",Ea.funct,null,mxResources.get("delete"),Ea,Editor.trashImage);La.style.opacity="0.1";Q.appendChild(La);
Ea.addListener("stateChanged",function(){La.style.opacity=Ea.enabled?"":"0.1"});var za=function(){Na.style.display=0<F.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Ga.style.display=Na.style.display;Na.style.opacity=Aa.enabled?"":"0.1";Ga.style.opacity=Ha.enabled?"":"0.1"};Q.appendChild(Na);Q.appendChild(Ga);Aa.addListener("stateChanged",za);Ha.addListener("stateChanged",za);za();var ta=this.createPageMenuTab(!1,!0);ta.style.display="none";ta.style.position="";ta.style.marginLeft=
"";ta.style.top="";ta.style.left="";ta.style.height="100%";ta.style.lineHeight="";ta.style.borderStyle="none";ta.style.padding="3px 0";ta.style.margin="0px";ta.style.background="";ta.style.border="";ta.style.boxShadow="none";ta.style.verticalAlign="top";ta.style.width="auto";ta.style.maxWidth="160px";ta.style.position="relative";ta.style.padding="6px";ta.style.textOverflow="ellipsis";ta.style.opacity="0.8";T.appendChild(ta);F.editor.addListener("pagesPatched",Ca);F.editor.addListener("pageSelected",
-Ca);F.editor.addListener("pageRenamed",Ca);F.editor.addListener("fileLoaded",Ca);Ca();F.addListener("fileDescriptorChanged",D);F.addListener("pagesVisibleChanged",D);F.editor.addListener("pagesPatched",D);D();D=E("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",qa,Editor.zoomOutImage);T.appendChild(D);var ka=document.createElement("div");ka.innerHTML="100%";ka.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");ka.style.display=
-"inline-block";ka.style.cursor="pointer";ka.style.textAlign="center";ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.verticalAlign="top";ka.style.padding="6px 0";ka.style.fontSize="14px";ka.style.width="40px";ka.style.opacity="0.4";T.appendChild(ka);mxEvent.addListener(ka,"click",Ba);Ba=E("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);T.appendChild(Ba);u.visible&&(T.appendChild(Fa),mxEvent.addListener(document,
-"fullscreenchange",function(){Fa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(u=F.actions.get("exit"),T.appendChild(E("",u.funct,null,mxResources.get("exit"),u,Editor.closeImage)));F.tabContainer.style.visibility="hidden";S.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-Q.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(Q);X.appendChild(T);N.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(N.style.touchAction="none");X.appendChild(N);window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var oa=E("",Ba,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ca,Editor.zoomFitImage);S.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ka=M.addMenu("100%",
-D.funct);ka.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.textDecoration="none";ka.style.overflow="hidden";ka.style.visibility="hidden";ka.style.textAlign="center";ka.style.cursor="pointer";ka.style.height=parseInt(F.tabContainerHeight)-1+"px";ka.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ka.style.position="absolute";ka.style.display="block";ka.style.fontSize="12px";ka.style.width=
+Ca);F.editor.addListener("pageRenamed",Ca);F.editor.addListener("fileLoaded",Ca);Ca();F.addListener("fileDescriptorChanged",E);F.addListener("pagesVisibleChanged",E);F.editor.addListener("pagesPatched",E);E();E=C("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",qa,Editor.zoomOutImage);T.appendChild(E);var ka=document.createElement("div");ka.innerHTML="100%";ka.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");ka.style.display=
+"inline-block";ka.style.cursor="pointer";ka.style.textAlign="center";ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.verticalAlign="top";ka.style.padding="6px 0";ka.style.fontSize="14px";ka.style.width="40px";ka.style.opacity="0.4";T.appendChild(ka);mxEvent.addListener(ka,"click",Ba);Ba=C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);T.appendChild(Ba);t.visible&&(T.appendChild(Fa),mxEvent.addListener(document,
+"fullscreenchange",function(){Fa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(t=F.actions.get("exit"),T.appendChild(C("",t.funct,null,mxResources.get("exit"),t,Editor.closeImage)));F.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+Q.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(Q);X.appendChild(T);O.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(O.style.touchAction="none");X.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var oa=C("",Ba,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ca,Editor.zoomFitImage);R.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ka=J.addMenu("100%",
+E.funct);ka.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.textDecoration="none";ka.style.overflow="hidden";ka.style.visibility="hidden";ka.style.textAlign="center";ka.style.cursor="pointer";ka.style.height=parseInt(F.tabContainerHeight)-1+"px";ka.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ka.style.position="absolute";ka.style.display="block";ka.style.fontSize="12px";ka.style.width=
"59px";ka.style.right="0px";ka.style.bottom="0px";ka.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ka.style.backgroundPosition="right 6px center";ka.style.backgroundRepeat="no-repeat";X.appendChild(ka)}(function(da){var ca=mxUtils.bind(this,function(){da.innerHTML="";mxUtils.write(da,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);F.editor.addListener("resetGraphView",ca);F.editor.addListener("pageSelected",ca)})(ka);var sa=
-F.setGraphEnabled;F.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(ka.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}X.appendChild(S);X.appendChild(F.diagramContainer);J.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&X.appendChild(F.tabContainer);
-var ya=null;P();mxEvent.addListener(window,"resize",function(){P();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";N.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),F.sendEmbeddedSvgExport())});J=document.createElement("div");J.style.position="absolute";J.style.width="10px";J.style.height="10px";J.style.borderRadius="5px";J.style.border="1px solid gray";J.style.background="#ffffff";J.style.cursor=
-"row-resize";F.diagramContainer.parentNode.appendChild(J);F.bottomResizer=J;var wa=null,ua=null,xa=null,ha=null;mxEvent.addGestureListeners(J,function(da){ha=parseInt(F.diagramContainer.style.height);ua=mxEvent.getClientY(da);H.popupMenuHandler.hideMenu();mxEvent.consume(da)});J=J.cloneNode(!1);J.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(J);F.rightResizer=J;mxEvent.addGestureListeners(J,function(da){xa=parseInt(F.diagramContainer.style.width);wa=mxEvent.getClientX(da);H.popupMenuHandler.hideMenu();
-mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=wa&&(F.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(da)-wa)+"px",ca=!0);null!=ua&&(F.diagramContainer.style.height=Math.max(20,ha+mxEvent.getClientY(da)-ua)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),R(),F.refresh())},function(da){null==wa&&null==
-ua||mxEvent.consume(da);ua=wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";N.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,m,n,v){var d=m.y,g=m.x,k=!1,l=!1;if(null!=this.states&&null!=c&&null!=m){var p=this,q=new mxCellState,x=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=c.x+g;q.y=c.y+d;q.width=c.width;q.height=c.height;for(var A=[],B=[],I=0;I<this.states.length;I++){var O=this.states[I];O instanceof mxCellState&&(v||!this.graph.isCellSelected(O.cell))&&((q.x>=O.x&&q.x<=O.x+O.width||O.x>=q.x&&O.x<=q.x+q.width)&&(q.y>
-O.y+O.height+4||q.y+q.height+4<O.y)?A.push(O):(q.y>=O.y&&q.y<=O.y+O.height||O.y>=q.y&&O.y<=q.y+q.height)&&(q.x>O.x+O.width+4||q.x+q.width+4<O.x)&&B.push(O))}var t=0,z=0,L=O=0,C=0,E=0,G=0,P=0,J=5*x;if(1<A.length){A.push(q);A.sort(function(V,M){return V.y-M.y});var F=!1;I=q==A[0];x=q==A[A.length-1];if(!I&&!x)for(I=1;I<A.length-1;I++)if(q==A[I]){x=A[I-1];I=A[I+1];O=z=L=(I.y-x.y-x.height-q.height)/2;break}for(I=0;I<A.length-1;I++){x=A[I];var H=A[I+1],S=q==x||q==H;H=H.y-x.y-x.height;F|=q==x;if(0==z&&0==
-t)z=H,t=1;else if(Math.abs(z-H)<=(S||1==I&&F?y:0))t+=1;else if(1<t&&F){A=A.slice(0,I+1);break}else if(3<=A.length-I&&!F)t=0,O=z=0!=L?L:0,A.splice(0,0==I?1:I),I=-1;else break;0!=O||S||(z=O=H)}3==A.length&&A[1]==q&&(O=0)}if(1<B.length){B.push(q);B.sort(function(V,M){return V.x-M.x});F=!1;I=q==B[0];x=q==B[B.length-1];if(!I&&!x)for(I=1;I<B.length-1;I++)if(q==B[I]){x=B[I-1];I=B[I+1];G=E=P=(I.x-x.x-x.width-q.width)/2;break}for(I=0;I<B.length-1;I++){x=B[I];H=B[I+1];S=q==x||q==H;H=H.x-x.x-x.width;F|=q==x;
-if(0==E&&0==C)E=H,C=1;else if(Math.abs(E-H)<=(S||1==I&&F?y:0))C+=1;else if(1<C&&F){B=B.slice(0,I+1);break}else if(3<=B.length-I&&!F)C=0,G=E=0!=P?P:0,B.splice(0,0==I?1:I),I=-1;else break;0!=G||S||(E=G=H)}3==B.length&&B[1]==q&&(G=0)}y=function(V,M,W,U){var X=[];if(U){U=J;var u=0}else U=0,u=J;X.push(new mxPoint(V.x-U,V.y-u));X.push(new mxPoint(V.x+U,V.y+u));X.push(V);X.push(M);X.push(new mxPoint(M.x-U,M.y-u));X.push(new mxPoint(M.x+U,M.y+u));if(null!=W)return W.points=X,W;V=new mxPolyline(X,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);V.dialect=mxConstants.DIALECT_SVG;V.pointerEvents=!1;V.init(p.graph.getView().getOverlayPane());return V};E=function(V,M){if(V&&null!=p.guidesArrHor)for(V=0;V<p.guidesArrHor.length;V++)p.guidesArrHor[V].node.style.visibility="hidden";if(M&&null!=p.guidesArrVer)for(V=0;V<p.guidesArrVer.length;V++)p.guidesArrVer[V].node.style.visibility="hidden"};if(1<C&&C==B.length-1){C=[];P=p.guidesArrHor;k=[];g=0;I=B[0]==q?1:0;F=B[I].y+B[I].height;if(0<G)for(I=0;I<B.length-1;I++)x=
-B[I],H=B[I+1],q==x?(g=H.x-x.width-G,k.push(new mxPoint(g+x.width+J,F)),k.push(new mxPoint(H.x-J,F))):q==H?(k.push(new mxPoint(x.x+x.width+J,F)),g=x.x+x.width+G,k.push(new mxPoint(g-J,F))):(k.push(new mxPoint(x.x+x.width+J,F)),k.push(new mxPoint(H.x-J,F)));else x=B[0],I=B[2],g=x.x+x.width+(I.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+J,F)),k.push(new mxPoint(g-J,F)),k.push(new mxPoint(g+q.width+J,F)),k.push(new mxPoint(I.x-J,F));for(I=0;I<k.length;I+=2)B=k[I],G=k[I+1],B=y(B,G,null!=P?
-P[I/2]:null),B.node.style.visibility="visible",B.redraw(),C.push(B);for(I=k.length/2;null!=P&&I<P.length;I++)P[I].destroy();p.guidesArrHor=C;g-=c.x;k=!0}else E(!0);if(1<t&&t==A.length-1){C=[];P=p.guidesArrVer;l=[];d=0;I=A[0]==q?1:0;t=A[I].x+A[I].width;if(0<O)for(I=0;I<A.length-1;I++)x=A[I],H=A[I+1],q==x?(d=H.y-x.height-O,l.push(new mxPoint(t,d+x.height+J)),l.push(new mxPoint(t,H.y-J))):q==H?(l.push(new mxPoint(t,x.y+x.height+J)),d=x.y+x.height+O,l.push(new mxPoint(t,d-J))):(l.push(new mxPoint(t,x.y+
-x.height+J)),l.push(new mxPoint(t,H.y-J)));else x=A[0],I=A[2],d=x.y+x.height+(I.y-x.y-x.height-q.height)/2,l.push(new mxPoint(t,x.y+x.height+J)),l.push(new mxPoint(t,d-J)),l.push(new mxPoint(t,d+q.height+J)),l.push(new mxPoint(t,I.y-J));for(I=0;I<l.length;I+=2)B=l[I],G=l[I+1],B=y(B,G,null!=P?P[I/2]:null,!0),B.node.style.visibility="visible",B.redraw(),C.push(B);for(I=l.length/2;null!=P&&I<P.length;I++)P[I].destroy();p.guidesArrVer=C;d-=c.y;l=!0}else E(!1,!0)}if(k||l)return q=new mxPoint(g,d),A=b.call(this,
-c,q,n,v),k&&!l?q.y=A.y:l&&!k&&(q.x=A.x),A.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;E(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!=
-n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var E=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(E,G)},z);P&&t.apply(E,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+F.setGraphEnabled;F.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(ka.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}X.appendChild(R);X.appendChild(F.diagramContainer);I.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&X.appendChild(F.tabContainer);
+var ya=null;N();mxEvent.addListener(window,"resize",function(){N();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";O.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),F.sendEmbeddedSvgExport())});I=document.createElement("div");I.style.position="absolute";I.style.width="10px";I.style.height="10px";I.style.borderRadius="5px";I.style.border="1px solid gray";I.style.background="#ffffff";I.style.cursor=
+"row-resize";F.diagramContainer.parentNode.appendChild(I);F.bottomResizer=I;var wa=null,ua=null,xa=null,ha=null;mxEvent.addGestureListeners(I,function(da){ha=parseInt(F.diagramContainer.style.height);ua=mxEvent.getClientY(da);H.popupMenuHandler.hideMenu();mxEvent.consume(da)});I=I.cloneNode(!1);I.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(I);F.rightResizer=I;mxEvent.addGestureListeners(I,function(da){xa=parseInt(F.diagramContainer.style.width);wa=mxEvent.getClientX(da);H.popupMenuHandler.hideMenu();
+mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=wa&&(F.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(da)-wa)+"px",ca=!0);null!=ua&&(F.diagramContainer.style.height=Math.max(20,ha+mxEvent.getClientY(da)-ua)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),S(),F.refresh())},function(da){null==wa&&null==
+ua||mxEvent.consume(da);ua=wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";O.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,m,n,v){var d=m.y,g=m.x,k=!1,l=!1;if(null!=this.states&&null!=c&&null!=m){var p=this,q=new mxCellState,x=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=c.x+g;q.y=c.y+d;q.width=c.width;q.height=c.height;for(var z=[],A=[],K=0;K<this.states.length;K++){var P=this.states[K];P instanceof mxCellState&&(v||!this.graph.isCellSelected(P.cell))&&((q.x>=P.x&&q.x<=P.x+P.width||P.x>=q.x&&P.x<=q.x+q.width)&&(q.y>
+P.y+P.height+4||q.y+q.height+4<P.y)?z.push(P):(q.y>=P.y&&q.y<=P.y+P.height||P.y>=q.y&&P.y<=q.y+q.height)&&(q.x>P.x+P.width+4||q.x+q.width+4<P.x)&&A.push(P))}var L=0,u=0,D=P=0,B=0,C=0,G=0,N=0,I=5*x;if(1<z.length){z.push(q);z.sort(function(W,J){return W.y-J.y});var F=!1;K=q==z[0];x=q==z[z.length-1];if(!K&&!x)for(K=1;K<z.length-1;K++)if(q==z[K]){x=z[K-1];K=z[K+1];P=u=D=(K.y-x.y-x.height-q.height)/2;break}for(K=0;K<z.length-1;K++){x=z[K];var H=z[K+1],R=q==x||q==H;H=H.y-x.y-x.height;F|=q==x;if(0==u&&0==
+L)u=H,L=1;else if(Math.abs(u-H)<=(R||1==K&&F?y:0))L+=1;else if(1<L&&F){z=z.slice(0,K+1);break}else if(3<=z.length-K&&!F)L=0,P=u=0!=D?D:0,z.splice(0,0==K?1:K),K=-1;else break;0!=P||R||(u=P=H)}3==z.length&&z[1]==q&&(P=0)}if(1<A.length){A.push(q);A.sort(function(W,J){return W.x-J.x});F=!1;K=q==A[0];x=q==A[A.length-1];if(!K&&!x)for(K=1;K<A.length-1;K++)if(q==A[K]){x=A[K-1];K=A[K+1];G=C=N=(K.x-x.x-x.width-q.width)/2;break}for(K=0;K<A.length-1;K++){x=A[K];H=A[K+1];R=q==x||q==H;H=H.x-x.x-x.width;F|=q==x;
+if(0==C&&0==B)C=H,B=1;else if(Math.abs(C-H)<=(R||1==K&&F?y:0))B+=1;else if(1<B&&F){A=A.slice(0,K+1);break}else if(3<=A.length-K&&!F)B=0,G=C=0!=N?N:0,A.splice(0,0==K?1:K),K=-1;else break;0!=G||R||(C=G=H)}3==A.length&&A[1]==q&&(G=0)}y=function(W,J,V,U){var X=[];if(U){U=I;var t=0}else U=0,t=I;X.push(new mxPoint(W.x-U,W.y-t));X.push(new mxPoint(W.x+U,W.y+t));X.push(W);X.push(J);X.push(new mxPoint(J.x-U,J.y-t));X.push(new mxPoint(J.x+U,J.y+t));if(null!=V)return V.points=X,V;W=new mxPolyline(X,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);W.dialect=mxConstants.DIALECT_SVG;W.pointerEvents=!1;W.init(p.graph.getView().getOverlayPane());return W};C=function(W,J){if(W&&null!=p.guidesArrHor)for(W=0;W<p.guidesArrHor.length;W++)p.guidesArrHor[W].node.style.visibility="hidden";if(J&&null!=p.guidesArrVer)for(W=0;W<p.guidesArrVer.length;W++)p.guidesArrVer[W].node.style.visibility="hidden"};if(1<B&&B==A.length-1){B=[];N=p.guidesArrHor;k=[];g=0;K=A[0]==q?1:0;F=A[K].y+A[K].height;if(0<G)for(K=0;K<A.length-1;K++)x=
+A[K],H=A[K+1],q==x?(g=H.x-x.width-G,k.push(new mxPoint(g+x.width+I,F)),k.push(new mxPoint(H.x-I,F))):q==H?(k.push(new mxPoint(x.x+x.width+I,F)),g=x.x+x.width+G,k.push(new mxPoint(g-I,F))):(k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(H.x-I,F)));else x=A[0],K=A[2],g=x.x+x.width+(K.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(g-I,F)),k.push(new mxPoint(g+q.width+I,F)),k.push(new mxPoint(K.x-I,F));for(K=0;K<k.length;K+=2)A=k[K],G=k[K+1],A=y(A,G,null!=N?
+N[K/2]:null),A.node.style.visibility="visible",A.redraw(),B.push(A);for(K=k.length/2;null!=N&&K<N.length;K++)N[K].destroy();p.guidesArrHor=B;g-=c.x;k=!0}else C(!0);if(1<L&&L==z.length-1){B=[];N=p.guidesArrVer;l=[];d=0;K=z[0]==q?1:0;L=z[K].x+z[K].width;if(0<P)for(K=0;K<z.length-1;K++)x=z[K],H=z[K+1],q==x?(d=H.y-x.height-P,l.push(new mxPoint(L,d+x.height+I)),l.push(new mxPoint(L,H.y-I))):q==H?(l.push(new mxPoint(L,x.y+x.height+I)),d=x.y+x.height+P,l.push(new mxPoint(L,d-I))):(l.push(new mxPoint(L,x.y+
+x.height+I)),l.push(new mxPoint(L,H.y-I)));else x=z[0],K=z[2],d=x.y+x.height+(K.y-x.y-x.height-q.height)/2,l.push(new mxPoint(L,x.y+x.height+I)),l.push(new mxPoint(L,d-I)),l.push(new mxPoint(L,d+q.height+I)),l.push(new mxPoint(L,K.y-I));for(K=0;K<l.length;K+=2)A=l[K],G=l[K+1],A=y(A,G,null!=N?N[K/2]:null,!0),A.node.style.visibility="visible",A.redraw(),B.push(A);for(K=l.length/2;null!=N&&K<N.length;K++)N[K].destroy();p.guidesArrVer=B;d-=c.y;l=!0}else C(!1,!0)}if(k||l)return q=new mxPoint(g,d),z=b.call(this,
+c,q,n,v),k&&!l?q.y=z.y:l&&!k&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;C(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!=
+n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var L=b.diagramContainer;p.style.top=L.offsetTop-g+"px";p.style.left=L.offsetLeft-g+"px";p.style.width=(f?0:L.offsetWidth)+g+"px";p.style.height=(f?L.offsetHeight:0)+g+"px"}function n(L,u,D){if(null!=v)return L;var B;return function(){var C=this,G=arguments,N=D&&!B;clearTimeout(B);B=setTimeout(function(){B=null;D||L.apply(C,G)},u);N&&L.apply(C,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
d=window.cancelAnimationFrame||window.mozCancelAnimationFrame,g=this.RULER_THICKNESS,k=this;this.unit=e;var l=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},p=document.createElement("div");p.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){l=Editor.isDarkMode()?
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};p.style.background=l.bkgClr;p.style[f?"borderRight":"borderBottom"]="0.5px solid "+l.strokeClr;p.style.borderLeft="0.5px solid "+l.strokeClr});this.updateStyle();document.body.appendChild(p);mxEvent.disableContextMenu(p);this.editorUiRefresh=b.refresh;b.refresh=
-function(t){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var A=function(t,z,L,C,E){t=Math.round(t);z=Math.round(z);L=Math.round(L);C=Math.round(C);x.beginPath();x.moveTo(t+.5,z+.5);x.lineTo(L+.5,C+.5);x.stroke();E&&(f?(x.save(),x.translate(t,z),
-x.rotate(-Math.PI/2),x.fillText(E,0,0),x.restore()):x.fillText(E,t,z))},B=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var t=y.view.scale,z=y.view.getBackgroundPageBounds(),L=y.view.translate,C=y.pageVisible;L=C?g+(f?z.y-y.container.scrollTop:z.x-y.container.scrollLeft):g+(f?L.y*t-y.container.scrollTop:L.x*t-y.container.scrollLeft);var E=0;C&&(E=y.getPageLayout(),E=f?E.y*y.pageFormat.height:
-E.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var P=G=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;P=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;P=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=t||4<=t?8:16,P=mxConstants.PIXELS_PER_INCH/G,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=P;2<=t?F=P/(2*Math.floor(t/2)):.5>=t&&(F=P*Math.floor(1/t/2)*(k.unit==
-mxConstants.MILLIMETERS?2:1));P=null;z=C?Math.min(L+(f?z.height:z.width),f?q.height:q.width):f?q.height:q.width;if(C)if(x.fillStyle=l.outBkgClr,f){var H=L-g;0<H&&x.fillRect(0,g,g,H);z<q.height&&x.fillRect(0,z,g,q.height)}else H=L-g,0<H&&x.fillRect(g,0,H,g),z<q.width&&x.fillRect(z,0,q.width,g);x.fillStyle=l.fontClr;for(C=C?L:L%(F*t);C<=z;C+=F*t)if(H=Math.round((C-L)/t/F),!(C<g||H==P)){P=H;var S=null;0==H%G&&(S=k.formatText(E+H*F)+"");f?A(g-J[Math.abs(H)%G],C,g,C,S):A(C,g-J[Math.abs(H)%G],C,g,S)}x.lineWidth=
-1;A(f?0:g,f?g:0,g,g);x.fillStyle=l.cornerClr;x.fillRect(0,0,g,g)},I=-1,O=function(){null!=v?(null!=d&&d(I),I=v(B)):B()};this.drawRuler=O;this.sizeListener=e=n(function(){var t=y.container;f?(t=t.offsetHeight+g,q.height!=t&&(q.height=t,p.style.height=t+"px",O())):(t=t.offsetWidth+g,q.width!=t&&(q.width=t,p.style.width=t+"px",O()))},10);this.pageListener=function(){O()};this.scrollListener=c=n(function(){var t=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=t&&(k.lastScroll=t,O())},10);
-this.unitListener=function(t,z){k.setUnit(z.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(t){l=t;p.style.background=l.bkgClr;B()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(t,z,L,C){if(f&&4<t.height||
-!f&&4<t.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(U){}var E=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=t.y+E.y+g-this.graph.container.scrollTop;var P=0;var J=G+t.height/2;var F=g/2;var H=G+t.height;var S=0;var V=x.getImageData(P,G-1,g,
-3);A(P,G,g,G);G--;var M=x.getImageData(F,J-1,g,3);A(F,J,g,J);J--;var W=x.getImageData(S,H-1,g,3);A(S,H,g,H);H--}else G=0,P=t.x+E.x+g-this.graph.container.scrollLeft,J=g/2,F=P+t.width/2,H=0,S=P+t.width,V=x.getImageData(P-1,G,3,g),A(P,G,P,g),P--,M=x.getImageData(F-1,J,3,g),A(F,J,F,g),F--,W=x.getImageData(S-1,H,3,g),A(S,H,S,g),S--;if(null==k.guidePart||k.guidePart.x1!=P||k.guidePart.y1!=G)k.guidePart={imgData1:V,x1:P,y1:G,imgData2:M,x2:F,y2:J,imgData3:W,x3:S,y3:H}}catch(U){}}else E=k.origGuideMove.apply(this,
-arguments);return E};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var t=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(z){}return t}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+function(L){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var z=function(L,u,D,B,C){L=Math.round(L);u=Math.round(u);D=Math.round(D);B=Math.round(B);x.beginPath();x.moveTo(L+.5,u+.5);x.lineTo(D+.5,B+.5);x.stroke();C&&(f?(x.save(),x.translate(L,u),
+x.rotate(-Math.PI/2),x.fillText(C,0,0),x.restore()):x.fillText(C,L,u))},A=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var L=y.view.scale,u=y.view.getBackgroundPageBounds(),D=y.view.translate,B=y.pageVisible;D=B?g+(f?u.y-y.container.scrollTop:u.x-y.container.scrollLeft):g+(f?D.y*L-y.container.scrollTop:D.x*L-y.container.scrollLeft);var C=0;B&&(C=y.getPageLayout(),C=f?C.y*y.pageFormat.height:
+C.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var N=G=10;var I=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=L||4<=L?8:16,N=mxConstants.PIXELS_PER_INCH/G,I=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=N;2<=L?F=N/(2*Math.floor(L/2)):.5>=L&&(F=N*Math.floor(1/L/2)*(k.unit==
+mxConstants.MILLIMETERS?2:1));N=null;u=B?Math.min(D+(f?u.height:u.width),f?q.height:q.width):f?q.height:q.width;if(B)if(x.fillStyle=l.outBkgClr,f){var H=D-g;0<H&&x.fillRect(0,g,g,H);u<q.height&&x.fillRect(0,u,g,q.height)}else H=D-g,0<H&&x.fillRect(g,0,H,g),u<q.width&&x.fillRect(u,0,q.width,g);x.fillStyle=l.fontClr;for(B=B?D:D%(F*L);B<=u;B+=F*L)if(H=Math.round((B-D)/L/F),!(B<g||H==N)){N=H;var R=null;0==H%G&&(R=k.formatText(C+H*F)+"");f?z(g-I[Math.abs(H)%G],B,g,B,R):z(B,g-I[Math.abs(H)%G],B,g,R)}x.lineWidth=
+1;z(f?0:g,f?g:0,g,g);x.fillStyle=l.cornerClr;x.fillRect(0,0,g,g)},K=-1,P=function(){null!=v?(null!=d&&d(K),K=v(A)):A()};this.drawRuler=P;this.sizeListener=e=n(function(){var L=y.container;f?(L=L.offsetHeight+g,q.height!=L&&(q.height=L,p.style.height=L+"px",P())):(L=L.offsetWidth+g,q.width!=L&&(q.width=L,p.style.width=L+"px",P()))},10);this.pageListener=function(){P()};this.scrollListener=c=n(function(){var L=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=L&&(k.lastScroll=L,P())},10);
+this.unitListener=function(L,u){k.setUnit(u.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(L){l=L;p.style.background=l.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(L,u,D,B){if(f&&4<L.height||
+!f&&4<L.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(U){}var C=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=L.y+C.y+g-this.graph.container.scrollTop;var N=0;var I=G+L.height/2;var F=g/2;var H=G+L.height;var R=0;var W=x.getImageData(N,G-1,g,
+3);z(N,G,g,G);G--;var J=x.getImageData(F,I-1,g,3);z(F,I,g,I);I--;var V=x.getImageData(R,H-1,g,3);z(R,H,g,H);H--}else G=0,N=L.x+C.x+g-this.graph.container.scrollLeft,I=g/2,F=N+L.width/2,H=0,R=N+L.width,W=x.getImageData(N-1,G,3,g),z(N,G,N,g),N--,J=x.getImageData(F-1,I,3,g),z(F,I,F,g),F--,V=x.getImageData(R-1,H,3,g),z(R,H,R,g),R--;if(null==k.guidePart||k.guidePart.x1!=N||k.guidePart.y1!=G)k.guidePart={imgData1:W,x1:N,y1:G,imgData2:J,x2:F,y2:I,imgData3:V,x3:R,y3:H}}catch(U){}}else C=k.origGuideMove.apply(this,
+arguments);return C};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var L=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(u){}return L}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var m=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(n){m=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,function(n){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(n)||mxEvent.isPopupTrigger(n))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!m){var v=new mxPopupMenu(mxUtils.bind(this,function(k,l){b.menus.addMenuItems(k,["points","inches","millimeters","meters"],l)}));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=
!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);b.resetCurrentMenu();v.destroy()});var d=mxEvent.getClientX(n),g=mxEvent.getClientY(n);v.popup(d,g,null,n);b.setCurrentMenu(v,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,A=!0,B=!1,I={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(J){g=J};this.setAutoClose=function(J){k=J};this.setAutoInsert=
-function(J){l=J};this.setAutoScroll=function(J){p=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){B=J};this.setSmoothing=function(J){f=J};this.setPerfectFreehandMode=function(J){O=J};this.setBrushSize=function(J){I.size=J};this.getBrushSize=function(){return I.size};var t=function(J){y=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
-this.startDrawing=function(){t(!0)};this.isDrawing=function(){return y};var z=mxUtils.bind(this,function(J){if(c){var F=d.length,H=A&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(J)}}),L=new mxCell;L.edge=!0;var C=function(){var J=b.getCurrentCellStyle(L);J=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
-J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var J=[],F=0;F<v.length;F++)null!=v[F]&&J.push([v[F].x,v[F].y]);J=PerfectFreehand.getStroke(J,I);v=[];for(F=0;F<J.length;F++)v.push({x:J[F][0],y:J[F][1]});v.push(null)}J=v[0].x;var H=v[0].x,S=v[0].y,V=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(J=Math.max(J,v[F].x),H=Math.min(H,v[F].x),S=Math.max(S,
-v[F].y),V=Math.min(V,v[F].y));J-=H;S-=V;if(0<J&&0<S){var M=100/J,W=100/S;v.map(function(K){if(null==K)return K;K.x=(K.x-H)*M;K.y=(K.y-V)*W;return K});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<v.length;F++){var u=v[F];if(null==u){u=!1;X=v[X];var D=v[F-1];!g&&k&&(u=X.x-D.x,D=X.y-D.y,u=Math.sqrt(u*u+D*D)<=b.tolerance);if(g||u)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(q||g||u?"<fillstroke/>":"<stroke/>");X=F+1}else U=F==X?U+('<path><move x="'+u.x.toFixed(2)+
-'" y="'+u.y.toFixed(2)+'"/>'):U+('<line x="'+u.x.toFixed(2)+'" y="'+u.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(H/U-X.x,V/U-X.y,J/U,S/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}B&&
-b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}t(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,F){J=F.getProperty("eventName");F=F.getProperty("event");J==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(J=F.getEvent(),y&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var H=
-parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var S=C();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",O?S:"none");c.setAttribute("stroke",S);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(S=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",S=S.split(" ").map(function(V){return parseFloat(V)*H}).join(" "),c.setAttribute("stroke-dasharray",S));x=[];J=E(J);G(J);
-n="M"+J.x+" "+J.y;v.push(J);d=[];c.setAttribute("d",O?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],I):n);e.appendChild(c);F.consume()}}),mouseMove:mxUtils.bind(this,function(J,F){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=F.getEvent();J=E(J);G(J);var H=P(0);if(H)if(v.push(H),O){var S=[];for(H=0;H<v.length;H++)S.push([v[H].x,v[H].y]);d=[];for(var V=2;V<x.length;V+=2)H=P(V),S.push([H.x,H.y]),d.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(S,I))}else{n+=" L"+
-H.x+" "+H.y;S="";d=[];for(V=2;V<x.length;V+=2)H=P(V),S+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+S)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(J,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(z(F.getEvent()),F.consume())})});var E=function(J){return mxUtils.convertPoint(b.container,mxEvent.getClientX(J),mxEvent.getClientY(J))},G=function(J){for(x.push(J);x.length>f;)x.shift()},P=
-function(J){var F=x.length;if(1===F%2||F>=f){var H=0,S=0,V,M=0;for(V=J;V<F;V++)M++,J=x[V],H+=J.x,S+=J.y;return{x:H/M,y:S/M}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(M,W){if(!P){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(W=JSON.stringify({from:z,id:A,type:M,sessionId:e.clientId,userId:U.id,username:U.displayName,data:W,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),J&&"cursor"!=M&&EditorUi.debug("P2PCollab: sending to socket server",[W]),A++,M=!J&&("cursor"==M||"selectionChange"==M),E&&!M&&V("message",W),M))for(p2pId in C)C[p2pId].send(W)}}function m(M){if(b.shareCursorPosition&&!l.isMouseDown){var W=
-mxUtils.getOffset(l.container),U=l.view.translate,X=l.view.scale,u=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:u,x:Math.round((M.getX()-W.x+l.container.scrollLeft)/X-U.x),y:Math.round((M.getY()-W.y+l.container.scrollTop)/X-U.y)})}}function n(M,W){var U=null!=b.currentPage?b.currentPage.getId():null;if(null!=M&&null!=M.cursor&&null!=M.lastCursor)if(null!=M.lastCursor.hide||!b.isShowRemoteCursors()||null!=M.lastCursor.pageId&&M.lastCursor.pageId!=U)M.cursor.style.display="none";
-else{U=function(){var N=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-M.cursor.clientWidth,D)),Q=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-M.cursor.clientHeight,K));T.style.opacity=N!=D||Q!=K?0:1;M.cursor.style.left=N+"px";M.cursor.style.top=Q+"px";M.cursor.style.display=""};var X=l.view.translate,u=l.view.scale,D=(X.x+M.lastCursor.x)*u+8,K=(X.y+M.lastCursor.y)*u-12,T=M.cursor.getElementsByTagName("img")[0];
-W?(mxUtils.setPrefixedStyle(M.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(M.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(M,W){function U(){if(null==y[u]){var Y=t[u];null==Y&&(Y=p%x.length,t[u]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[u]={cursor:document.createElement("div"),color:ba,selection:{}};I[W]=u;D=y[u].cursor;D.style.pointerEvents=
-"none";D.style.position="absolute";D.style.display="none";D.style.opacity="0.9";D.style.zIndex=5E3;var ea=document.createElement("img");mxUtils.setPrefixedStyle(ea.style,"transform","rotate(-45deg)translateX(-14px)");ea.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);ea.style.width="10px";D.appendChild(ea);ea=document.createElement("div");ea.style.backgroundColor=ba;ea.style.color=Y;ea.style.fontSize="9pt";ea.style.padding=
-"3px 7px";ea.style.marginTop="8px";ea.style.borderRadius="10px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";mxUtils.write(ea,X);D.appendChild(ea);b.diagramContainer.appendChild(D)}else D=y[u].cursor;K=y[u].selection}if(!P){M=JSON.parse(M);J&&"cursor"!=M.type&&EditorUi.debug("P2PCollab: msg received",[M]);if(null!=W){if(M.from==z||B[M.from]>=M.id){EditorUi.debug("P2PCollab: Dropped Message",M,z,B[M.from]);return}B[M.from]=M.id}var X=
-M.username?M.username:"Anonymous",u=M.sessionId,D,K;null!=y[u]&&(clearTimeout(y[u].inactiveTO),y[u].inactiveTO=setTimeout(function(){g(null,u)},12E4));var T=M.data;switch(M.type){case "cursor":U();y[u].lastCursor=T;n(y[u],!0);break;case "diff":try{M=e.stringToObject(decodeURIComponent(T.patch)),e.receiveRemoteChanges(M.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var N=null!=b.currentPage?b.currentPage.getId():null;if(null==
-N||null!=T.pageId&&T.pageId==N){U();for(N=0;N<T.removed.length;N++){var Q=T.removed[N];if(null!=Q){var R=K[Q];delete K[Q];null!=R&&R.destroy()}}for(N=0;N<T.added.length;N++)Q=T.added[N],null!=Q&&(R=l.model.getCell(Q),null!=R&&(K[Q]=l.highlightCell(R,y[u].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",M))}}function d(M,W){if(!J&&SimplePeer.WEBRTC_SUPPORT){var U=new SimplePeer({initiator:W,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});U.on("signal",function(X){V("sendSignal",
-{to:M,from:z,signal:X})});U.on("error",function(X){delete L[M];EditorUi.debug("P2PCollab: p2p socket error",X);!P&&W&&U.destroyed&&O[M]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",M),d(M,!0))});U.on("connect",function(){delete L[M];null==C[M]||C[M].destroyed?(C[M]=U,O[M]=!0,EditorUi.debug("P2PCollab: p2p socket connected",M)):(U.noP2PMapDel=!0,U.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",M))});U.on("close",function(){U.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
-M),k(I[M]),delete C[M])});U.on("data",v);return L[M]=U}}function g(M,W){k(W||I[M]);null!=M&&(delete I[M],O[M]=!1)}function k(M){var W=y[M];if(null!=W){var U=W.selection,X;for(X in U)null!=U[X]&&U[X].destroy();null!=W.cursor&&null!=W.cursor.parentNode&&W.cursor.parentNode.removeChild(W.cursor);clearTimeout(W.inactiveTO);delete y[M]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
-y={},A=1,B={},I={},O={},t={},z,L={},C={},E=!0,G=!1,P=!1,J="0"!=urlParams["no-p2p"],F=!1,H=0,S=null,V=mxUtils.bind(this,function(M,W){if(!P)try{null!=q?(q.send(JSON.stringify({action:M,msg:W})),J||EditorUi.debug("P2PCollab: sending to socket server",[M],[W])):this.joinFile(!0)}catch(U){S=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(M){this.sendMessage("diff",{patch:M})};this.getState=
-function(){return null!=q?q.readyState:3};this.getLastError=function(){return S};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(M,W){},mouseMove:function(M,W){var U,X=-1;return function(){clearTimeout(U);var u=this,D=arguments,K=function(){U=null;X=Date.now();M.apply(u,D)};Date.now()-X>W?K():U=setTimeout(K,W)}}(function(M,W){m(W)},200),mouseUp:function(M,W){m(W)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
-c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(M,W){M=function(u){return null!=u?u.id:null};var U=null!=b.currentPage?b.currentPage.getId():null,X=W.getProperty("added");W=W.getProperty("removed");c("selectionChange",{pageId:U,removed:X?X.map(M):[],added:W?W.map(M):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var M in y)n(y[M])});
-mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(M){if(!P)try{F&&(EditorUi.debug("P2PCollab: joinInProgress on",F),S="busy");F=++H;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
-q.joinId),q.close(1E3),q=null)}catch(X){EditorUi.debug("P2PCollab: closing socket error",X)}var W=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);W.addEventListener("open",function(X){q=W;q.joinId=F;F=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);M&&e.scheduleCleanup()});W.addEventListener("message",mxUtils.bind(this,function(X){J||EditorUi.debug("P2PCollab: msg received",[X]);var u=JSON.parse(X.data);J&&"message"!=u.action&&EditorUi.debug("P2PCollab: msg received",
-[X]);switch(u.action){case "message":v(u.msg,u.from);break;case "clientsList":X=u.msg;z=X.cId;G=!0;for(u=0;u<X.list.length;u++)d(X.list[u],!0);break;case "signal":X=u.msg;J||(L[X.from]?u=L[X.from]:(u=d(X.from,!1),E=!0),u.signal(X.signal));break;case "newClient":E=!0;break;case "clientLeft":g(u.msg);break;case "sendSignalFailed":X=u.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",X),delete L[X.to],O[X.to]=!1}}));var U=!1;W.addEventListener("close",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket closed",
-W.joinId,"reconnecting",X.code,X.reason);EditorUi.debug("P2PCollab: closing socket on",W.joinId);P||1E3==X.code||H!=W.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",W.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",W.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));W.addEventListener("error",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",X);EditorUi.debug("P2PCollab: error socket on",
-W.joinId);P||H!=W.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",W.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",W.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(X){S=X,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!P){EditorUi.debug("P2PCollab: destroyed");P=!0;for(sessionId in y)k(sessionId);null!=
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,z=!0,A=!1,K={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},P=!1;this.setClosedPath=function(I){g=I};this.setAutoClose=function(I){k=I};this.setAutoInsert=
+function(I){l=I};this.setAutoScroll=function(I){p=I};this.setOpenFill=function(I){q=I};this.setStopClickEnabled=function(I){z=I};this.setSelectInserted=function(I){A=I};this.setSmoothing=function(I){f=I};this.setPerfectFreehandMode=function(I){P=I};this.setBrushSize=function(I){K.size=I};this.getBrushSize=function(){return K.size};var L=function(I){y=I;b.getRubberband().setEnabled(!I);b.graphHandler.setSelectEnabled(!I);b.graphHandler.setMoveEnabled(!I);b.container.style.cursor=I?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
+this.startDrawing=function(){L(!0)};this.isDrawing=function(){return y};var u=mxUtils.bind(this,function(I){if(c){var F=d.length,H=z&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(I)}}),D=new mxCell;D.edge=!0;var B=function(){var I=b.getCurrentCellStyle(D);I=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(I,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
+I&&(I=b.shapeForegroundColor);return I};this.createStyle=function(I){var F=";fillColor=none;";P&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+I+F};this.stopDrawing=function(){if(0<m.length){if(P){for(var I=[],F=0;F<v.length;F++)null!=v[F]&&I.push([v[F].x,v[F].y]);I=PerfectFreehand.getStroke(I,K);v=[];for(F=0;F<I.length;F++)v.push({x:I[F][0],y:I[F][1]});v.push(null)}I=v[0].x;var H=v[0].x,R=v[0].y,W=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(I=Math.max(I,v[F].x),H=Math.min(H,v[F].x),R=Math.max(R,
+v[F].y),W=Math.min(W,v[F].y));I-=H;R-=W;if(0<I&&0<R){var J=100/I,V=100/R;v.map(function(M){if(null==M)return M;M.x=(M.x-H)*J;M.y=(M.y-W)*V;return M});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<v.length;F++){var t=v[F];if(null==t){t=!1;X=v[X];var E=v[F-1];!g&&k&&(t=X.x-E.x,E=X.y-E.y,t=Math.sqrt(t*t+E*E)<=b.tolerance);if(g||t)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(q||g||t?"<fillstroke/>":"<stroke/>");X=F+1}else U=F==X?U+('<path><move x="'+t.x.toFixed(2)+
+'" y="'+t.y.toFixed(2)+'"/>'):U+('<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(H/U-X.x,W/U-X.y,I/U,R/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}A&&
+b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}L(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,F){I=F.getProperty("eventName");F=F.getProperty("event");I==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(I,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(I=F.getEvent(),y&&!mxEvent.isPopupTrigger(I)&&!mxEvent.isMultiTouchEvent(I))){var H=
+parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var R=B();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",P?R:"none");c.setAttribute("stroke",R);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(W){return parseFloat(W)*H}).join(" "),c.setAttribute("stroke-dasharray",R));x=[];I=C(I);G(I);
+n="M"+I.x+" "+I.y;v.push(I);d=[];c.setAttribute("d",P?PerfectFreehand.getSvgPathFromStroke([[I.x,I.y]],K):n);e.appendChild(c);F.consume()}}),mouseMove:mxUtils.bind(this,function(I,F){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){I=F.getEvent();I=C(I);G(I);var H=N(0);if(H)if(v.push(H),P){var R=[];for(H=0;H<v.length;H++)R.push([v[H].x,v[H].y]);d=[];for(var W=2;W<x.length;W+=2)H=N(W),R.push([H.x,H.y]),d.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,K))}else{n+=" L"+
+H.x+" "+H.y;R="";d=[];for(W=2;W<x.length;W+=2)H=N(W),R+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+R)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(I.x-H.x,I.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(I,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u(F.getEvent()),F.consume())})});var C=function(I){return mxUtils.convertPoint(b.container,mxEvent.getClientX(I),mxEvent.getClientY(I))},G=function(I){for(x.push(I);x.length>f;)x.shift()},N=
+function(I){var F=x.length;if(1===F%2||F>=f){var H=0,R=0,W,J=0;for(W=I;W<F;W++)J++,I=x[W],H+=I.x,R+=I.y;return{x:H/J,y:R/J}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(J,V){if(!N){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(V=JSON.stringify({from:u,id:z,type:J,sessionId:e.clientId,userId:U.id,username:U.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),I&&"cursor"!=J&&EditorUi.debug("P2PCollab: sending to socket server",[V]),z++,J=!I&&("cursor"==J||"selectionChange"==J),C&&!J&&W("message",V),J))for(p2pId in B)B[p2pId].send(V)}}function m(J){if(b.shareCursorPosition&&!l.isMouseDown){var V=
+mxUtils.getOffset(l.container),U=l.view.translate,X=l.view.scale,t=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:t,x:Math.round((J.getX()-V.x+l.container.scrollLeft)/X-U.x),y:Math.round((J.getY()-V.y+l.container.scrollTop)/X-U.y)})}}function n(J,V){var U=null!=b.currentPage?b.currentPage.getId():null;if(null!=J&&null!=J.cursor&&null!=J.lastCursor)if(null!=J.lastCursor.hide||!b.isShowRemoteCursors()||null!=J.lastCursor.pageId&&J.lastCursor.pageId!=U)J.cursor.style.display="none";
+else{U=function(){var O=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-J.cursor.clientWidth,E)),Q=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-J.cursor.clientHeight,M));T.style.opacity=O!=E||Q!=M?0:1;J.cursor.style.left=O+"px";J.cursor.style.top=Q+"px";J.cursor.style.display=""};var X=l.view.translate,t=l.view.scale,E=(X.x+J.lastCursor.x)*t+8,M=(X.y+J.lastCursor.y)*t-12,T=J.cursor.getElementsByTagName("img")[0];
+V?(mxUtils.setPrefixedStyle(J.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(J.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(J,V){function U(){if(null==y[t]){var Y=L[t];null==Y&&(Y=p%x.length,L[t]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[t]={cursor:document.createElement("div"),color:ba,selection:{}};K[V]=t;E=y[t].cursor;E.style.pointerEvents=
+"none";E.style.position="absolute";E.style.display="none";E.style.opacity="0.9";E.style.zIndex=5E3;var ea=document.createElement("img");mxUtils.setPrefixedStyle(ea.style,"transform","rotate(-45deg)translateX(-14px)");ea.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);ea.style.width="10px";E.appendChild(ea);ea=document.createElement("div");ea.style.backgroundColor=ba;ea.style.color=Y;ea.style.fontSize="9pt";ea.style.padding=
+"3px 7px";ea.style.marginTop="8px";ea.style.borderRadius="10px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";mxUtils.write(ea,X);E.appendChild(ea);b.diagramContainer.appendChild(E)}else E=y[t].cursor;M=y[t].selection}if(!N){J=JSON.parse(J);I&&"cursor"!=J.type&&EditorUi.debug("P2PCollab: msg received",[J]);if(null!=V){if(J.from==u||A[J.from]>=J.id){EditorUi.debug("P2PCollab: Dropped Message",J,u,A[J.from]);return}A[J.from]=J.id}var X=
+J.username?J.username:"Anonymous",t=J.sessionId,E,M;null!=y[t]&&(clearTimeout(y[t].inactiveTO),y[t].inactiveTO=setTimeout(function(){g(null,t)},12E4));var T=J.data;switch(J.type){case "cursor":U();y[t].lastCursor=T;n(y[t],!0);break;case "diff":try{J=e.stringToObject(decodeURIComponent(T.patch)),e.receiveRemoteChanges(J.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var O=null!=b.currentPage?b.currentPage.getId():null;if(null==
+O||null!=T.pageId&&T.pageId==O){U();for(O=0;O<T.removed.length;O++){var Q=T.removed[O];if(null!=Q){var S=M[Q];delete M[Q];null!=S&&S.destroy()}}for(O=0;O<T.added.length;O++)Q=T.added[O],null!=Q&&(S=l.model.getCell(Q),null!=S&&(M[Q]=l.highlightCell(S,y[t].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",J))}}function d(J,V){if(!I&&SimplePeer.WEBRTC_SUPPORT){var U=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});U.on("signal",function(X){W("sendSignal",
+{to:J,from:u,signal:X})});U.on("error",function(X){delete D[J];EditorUi.debug("P2PCollab: p2p socket error",X);!N&&V&&U.destroyed&&P[J]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",J),d(J,!0))});U.on("connect",function(){delete D[J];null==B[J]||B[J].destroyed?(B[J]=U,P[J]=!0,EditorUi.debug("P2PCollab: p2p socket connected",J)):(U.noP2PMapDel=!0,U.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",J))});U.on("close",function(){U.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
+J),k(K[J]),delete B[J])});U.on("data",v);return D[J]=U}}function g(J,V){k(V||K[J]);null!=J&&(delete K[J],P[J]=!1)}function k(J){var V=y[J];if(null!=V){var U=V.selection,X;for(X in U)null!=U[X]&&U[X].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete y[J]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
+y={},z=1,A={},K={},P={},L={},u,D={},B={},C=!0,G=!1,N=!1,I="0"!=urlParams["no-p2p"],F=!1,H=0,R=null,W=mxUtils.bind(this,function(J,V){if(!N)try{null!=q?(q.send(JSON.stringify({action:J,msg:V})),I||EditorUi.debug("P2PCollab: sending to socket server",[J],[V])):this.joinFile(!0)}catch(U){R=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(J){this.sendMessage("diff",{patch:J})};this.getState=
+function(){return null!=q?q.readyState:3};this.getLastError=function(){return R};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,V){},mouseMove:function(J,V){var U,X=-1;return function(){clearTimeout(U);var t=this,E=arguments,M=function(){U=null;X=Date.now();J.apply(t,E)};Date.now()-X>V?M():U=setTimeout(M,V)}}(function(J,V){m(V)},200),mouseUp:function(J,V){m(V)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
+c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(J,V){J=function(t){return null!=t?t.id:null};var U=null!=b.currentPage?b.currentPage.getId():null,X=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:U,removed:X?X.map(J):[],added:V?V.map(J):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var J in y)n(y[J])});
+mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(J){if(!N)try{F&&(EditorUi.debug("P2PCollab: joinInProgress on",F),R="busy");F=++H;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
+q.joinId),q.close(1E3),q=null)}catch(X){EditorUi.debug("P2PCollab: closing socket error",X)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(X){q=V;q.joinId=F;F=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);J&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(X){I||EditorUi.debug("P2PCollab: msg received",[X]);var t=JSON.parse(X.data);I&&"message"!=t.action&&EditorUi.debug("P2PCollab: msg received",
+[X]);switch(t.action){case "message":v(t.msg,t.from);break;case "clientsList":X=t.msg;u=X.cId;G=!0;for(t=0;t<X.list.length;t++)d(X.list[t],!0);break;case "signal":X=t.msg;I||(D[X.from]?t=D[X.from]:(t=d(X.from,!1),C=!0),t.signal(X.signal));break;case "newClient":C=!0;break;case "clientLeft":g(t.msg);break;case "sendSignalFailed":X=t.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",X),delete D[X.to],P[X.to]=!1}}));var U=!1;V.addEventListener("close",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket closed",
+V.joinId,"reconnecting",X.code,X.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);N||1E3==X.code||H!=V.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",X);EditorUi.debug("P2PCollab: error socket on",
+V.joinId);N||H!=V.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(X){R=X,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!N){EditorUi.debug("P2PCollab: destroyed");N=!0;for(sessionId in y)k(sessionId);null!=
this.mouseListeners&&l.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&l.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(l.container,"scroll",this.cursorHandler),l.getView().removeListener(mxEvent.SCALE,this.cursorHandler),l.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),l.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,
-this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=q&&(q.close(1E3),q=null);for(var M in C)null!=C[M]&&C[M].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};
+this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=q&&(q.close(1E3),q=null);for(var J in B)null!=B[J]&&B[J].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};